5.5.2: SMTP syntax error
A command from the sending software could not be understood, because its syntax was wrong or the command was not recognised at all.
- Standard
- Provider
- Permanent (5xx)
- Class
- Sources checked
- Author
At a glance
- Code
- 5.5.2
- Provider
- Standard SMTP codes
- Temporary or permanent
- PermanentRefused for good: the message comes back to the sender, and resending it gets the same answer.
- Who has to act
- The sender. The fix is on the sending side: your domain, your server or your list.
- What the server says
5.5.2 Syntax error
What it means
5.5.2 is the protocol-level syntax error: the server could not parse a command. RFC 3463 says it is useful only as a permanent error, and it pairs naturally with reply codes 500 and 501. Two other RFCs give it specific uses. RFC 4954 prescribes 501 5.5.2 when a client's authentication data cannot be decoded from base64. RFC 7208 told receivers to use 550 5.5.2 when the sender's SPF record cannot be interpreted (a permerror), a case RFC 7372 has since given its own code, X.7.24. So when a bounce shows 5.5.2 together with SPF, the SPF record is the thing to check.
Common causes
- Sending software that formats a command wrongly, such as MAIL FROM without its colon.
- Authentication data that is not valid base64.
- An SPF record with a syntax error, reported by receivers that follow the older RFC 7208 advice.
How to fix it
- 01Read the reply text; it often quotes the command that failed.
- 02If SPF is mentioned, check your SPF record with an SPF lookup and correct any syntax error.
- 03If it happens during login, check how your client encodes credentials, or try another authentication method.
- 04Update or replace sending software that writes malformed commands.
Sources
What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.
- RFC 3463, section 3.6: Mail Delivery Protocol Statusrfc-editor.org
- RFC 4954, section 4: The AUTH Commandrfc-editor.org
- RFC 7208, section 8.7: Permerror (SPF)rfc-editor.org
- IANA, SMTP Enhanced Status Codes registry (Enumerated Status Codes)iana.org
Related codes
- 500Command not recognised.The server did not recognise the command it received, or the command line was too long. This is a permanent error in the SMTP conversation.
- 501Syntax error in arguments.The command was recognised, but what came with it was malformed, often an address or a host name the server cannot accept.
- 5.7.24SPF check error.The receiving server could not complete the SPF check for the sender's domain, either because of a temporary DNS problem or because the SPF record is broken.
- 5.5.4Invalid command arguments.A valid SMTP command was sent with an argument the server does not accept, because the value was out of range or named a feature it does not know.
5.5.2 at other providers
- 501 5.5.2Cannot decode response.Gmail could not decode a reply your client sent, which during SMTP sign-in usually means a malformed base64 string in the AUTH exchange.
- 555 5.5.2Syntax error in a command.Gmail could not parse a command or its parameters from your client, usually MAIL FROM or RCPT TO, and refused it.
Further reading
All 105 standard codesEvery code in the wikiPaste your own bounce