Get your free beta license ↗
Mail · Dovecot

A mail client cannot log in to a mail account

Last updated 30 Nov 2026
Summary

A mail client keeps rejecting a mail account's password. Dovecot gives the same response for four causes, and a few commands can show you which one applies.

Symptoms

The mail client keeps asking for the password or reports that the login failed. Over IMAP, the server replies with [AUTHENTICATIONFAILED] Authentication failed.

Each attempt produces a line like this in /var/log/maillog on AlmaLinux or /var/log/mail.log on Ubuntu.

Output
imap-login: Disconnected: Connection closed (auth failed, 1 attempts in 2 secs): user=<user@example.com>, method=PLAIN, rip=203.0.113.10, lip=192.0.2.5, secured

Cause

  • The client uses an incomplete username. Login always requires the full email address, user@example.com. A client configured with user fails, and the log entry shows user=<user>.
  • The password is wrong.
  • The mail account's login is turned off in UrbeStack.
  • The customer who owns the domain is suspended. Suspending a customer removes their mail accounts from the list Dovecot reads.

Resolution

  1. Test the email address and password as Dovecot sees them.

    doveadm auth test user@example.com 'the-password'
  2. The command prints one of these two results.

    Output
    passdb: user@example.com auth succeeded
    Output
    passdb: user@example.com auth failed
  3. If the test succeeds, the problem is in the mail client. Set its username to the full email address.

  4. If the test fails, check the mail account. The output shows login_suspended as 1 when the account's login is off.

    urbestack-mail-account-list --name example.com
  5. If the login is off, turn it back on.

    urbestack-mail-account-set --address user@example.com --login on
  6. If the password is wrong, set a new one. The command reads the password from the first line of standard input.

    urbestack-mail-account-set --address user@example.com --password-stdin
  7. If the domain owner is suspended, urbestack-user-list shows the suspension. Reactivate the customer to restore their mail accounts.

    urbestack-user-set --name USER --status active
  8. After making a change, repeat the authentication test and look for the success result above.