504 means the server supports the command but not the parameter asked for — most often an AUTH mechanism it does not offer. A mail client then tries a mechanism the server listed in its EHLO reply.
| Code | 504 |
| Meaning | Command parameter not implemented |
| Kind | Permanent failure — the sender gives up |
| Sent in reply to | AUTH most often; also EHLO, VRFY, EXPN, HELP |
| What the sender does | Tries another mechanism or parameter |
| Defined in | RFC 5321, section 4.2; RFC 4954 |
Paste your bounce
Paste the line with the code — or the whole bounce: we explain each code in it, say whether the sender will try again, and link the service’s own page where it has one. It is read in your browser; nothing is sent.
What to do
- Use a login method the server offers — for Gmail and Microsoft 365, OAuth (XOAUTH2).
- At Postfix: give the full host name in HELO, and full addresses.
What each provider means by it
| Who | What they say |
|---|---|
| Gmail | 504 for an unrecognised authentication type, and “XOAUTH is no longer supported” — use OAuth 2.0 (XOAUTH2). |
| Postfix | Uses 504 to refuse a HELO name, sender or recipient that is not fully qualified (non_fqdn_reject_code). |
| Exim | Rejects AUTH with no matching advertised mechanism with 504. |
Sources
Checked on 27 September 2026 against these official sources:
- RFC 5321: Simple Mail Transfer Protocol — rfc-editor.org
- RFC 4954: SMTP Service Extension for Authentication — rfc-editor.org
- Simple Mail Transfer Protocol (SMTP) Enhanced Status Codes Registry — iana.org
- Gmail SMTP errors and codes — knowledge.workspace.google.com
- Postfix Configuration Parameters — postfix.org
- 33. SMTP authentication — exim.org