Skip to content

SMTP error 535 Authentication failed when sending from a cPanel mailbox

A mail client connects but sending fails with "535 Authentication failed" or "Incorrect authentication data." Here is what Exim is actually rejecting and how to fix the credential, the auth setting, or the lock that is blocking it.

A 535 Authentication failed on send means the client reached the server, started a conversation, and was turned away at the password check — Exim is refusing the SMTP AUTH. Receiving may work fine, which throws people off, but incoming and outgoing authenticate separately. The error is almost always one of four things: the username is not the full address, the password is wrong (or recently changed), the client is not actually offering authentication, or something — cPHulk, a suspension, or a demoted password hash — is blocking the login server-side. The fix is to find which, in the logs, before resetting anything blindly.

What’s happening

When a mail client sends, it connects to Exim on the submission port (587 with STARTTLS or 465 with implicit TLS), issues AUTH, and presents the mailbox username and password. Exim validates that against the account’s stored credential (via Dovecot/the cPanel auth chain). If the credential does not match, Exim returns 535 — the SMTP code for “authentication credentials invalid.” The client surfaces it as “535 Authentication failed,” “Incorrect authentication data,” or “Username and Password not accepted.”

The reasons cluster. The username must be the full email address (user@example.com); clients that send only user fail auth even with the right password. The password must match exactly — a recent cPanel-side password change, a saved-but-stale password in the client’s keychain, or a copy-paste with a trailing space all produce 535. The client may not be authenticating at all: if “outgoing server requires authentication” is off, Exim never gets valid AUTH and rejects relay (sometimes as 535, sometimes 550 relay-denied). Server-side, cPHulk can lock an address after repeated bad attempts — so a client retrying a wrong password locks the account, and then even the correct password fails until the lock clears. Finally, a suspended account or a password hash that got demoted (after certain migrations) refuses auth regardless of input. Each leaves a distinct line in the logs.

How to verify

Watch Exim reject the auth in real time while the user tries to send:

# Live view as the client attempts to send
tail -f /var/log/exim_mainlog

# The authentication failures, with the username offered and source IP
grep -i 'authenticator failed\|535\|dovecot_login authenticator' /var/log/exim_mainlog | tail -40

The failed-auth line shows what username the client actually sent — confirm it is the full address, not the bare local part:

# Pull the user= and IP from recent auth failures
grep 'authenticator failed' /var/log/exim_mainlog | tail -20

# Dovecot's side of the auth decision
grep -i 'auth failed\|auth-worker\|passwd-file' /var/log/maillog 2>/dev/null | tail -30

Check for a cPHulk lock or a suspended account — both block a correct password:

# Is this user/IP locked by cPHulk brute-force protection?
whmapi1 get_cphulk_brutes 2>/dev/null
grep -i 'cphulk\|brute' /var/log/exim_mainlog /var/log/maillog 2>/dev/null | tail -20

# Is the account suspended (which also refuses mail auth)?
ls -la /var/cpanel/suspended/ 2>/dev/null

The fix

  1. Set the username to the full email address. The single most common cause: the outgoing-server username in the client is user instead of user@example.com. Open the account’s outgoing/SMTP settings and set the username to the complete address. cPanel authenticates the full address; the bare local part fails even with the right password.
  2. Confirm the password, and reset it if there is any doubt. A stale saved password (the user changed it in webmail but not in the client), a trailing space, or a forgotten change all yield 535. Set a known-good password in cPanel » Email Accounts » Manage » Security » Change Password, then enter that exact value in both the incoming and outgoing settings. Avoid characters the client mangles on paste if the user types it manually.
  3. Turn on “outgoing server requires authentication.” If the client is not authenticating at all, Exim has nothing to accept. In the account’s outgoing server settings, enable “My outgoing server (SMTP) requires authentication” and set it to reuse the same username/password as incoming. This is the fix when receiving works but sending is refused with a relay/535 error — the client simply was not presenting credentials.
  4. Clear a cPHulk lock, then use the right password. If get_cphulk_brutes shows the address or the user’s IP locked, repeated bad attempts tripped brute-force protection — and now even the correct password fails. Remove the entry in WHM » cPHulk Brute Force Protection (or whitelist the user’s IP), have the user stop the client from retrying, then sign in once with the verified password. Re-locking means the password in the client is still wrong.
  5. Use the correct port and encryption so AUTH is allowed. Exim only accepts plaintext AUTH over an encrypted channel. Set outgoing to 587 with STARTTLS or 465 with SSL/TLS; a client trying port 25, or 587 without encryption, can have its AUTH refused. Fixing the port/encryption pair sometimes resolves a 535 that was really “auth not offered on this connection.”
  6. Confirm the account is not suspended. A suspended cPanel account refuses mail authentication. If /var/cpanel/suspended/ lists the user, the mailbox cannot send until the account is unsuspended — resetting the password will not help. Unsuspend in WHM (see the unsuspend runbook) and then re-test the credential.
  7. Rebuild a demoted or broken password hash. After certain migrations or manual edits, a mailbox’s stored password can end up in a form Dovecot/Exim no longer accepts, so auth fails for every input. Re-setting the password through cPanel (step 2) rewrites the hash in the correct format. If a whole domain’s mailboxes fail auth after a move, the password files for that domain are the suspect — re-sync or reset them.
  8. Verify with one clean send and watch the accept line. After the fix, have the user send a single test and watch tail -f /var/log/exim_mainlog for the authenticated <= accept (no “authenticator failed” line) followed by delivery. A successful auth that then fails to deliver is a different problem (relay/recipient), not a 535 — so confirm you are seeing the auth succeed, not just the absence of the old error.

A 535 is resolved when the client authenticates with the full-address username and current password over an encrypted submission port, with no cPHulk lock or suspension in the way. Stack Harbor diagnoses cPanel SMTP authentication failures under cPanel server administration — start a conversation when sending keeps getting rejected.