SMTP 500: syntax error, command unrecognized

500Syntax error, command unrecognizedPermanent: retrying will not help

Example
500 5.5.2 Error: command not recognized

What it means

RFC 5321 defines 500 as "Syntax error, command unrecognized", and notes that it also covers a command line that is too long. The server read a line from the client and could not parse it as any SMTP command it knows.

This is a protocol level reply, not a judgement on your message, your IP, or your domain. It almost always points at the client: a script that talks SMTP by hand, a device with broken firmware, or a connection where the two sides disagree about whether TLS is in use.

It differs from 501 (the command is known but its arguments are wrong) and 502 (the command is valid SMTP but this server does not implement it). The enhanced code is usually 5.5.2, "Syntax error", or 5.5.1, "Invalid command".

Likely causes

  • A client speaks implicit TLS on port 465 to a server that expects plain SMTP, or the reverse, so the server sees binary garbage.
  • A script or device sends lowercase, misspelt, or non SMTP commands, or uses bare LF line endings the server rejects.
  • A command line exceeds the 512 octet limit from RFC 5321, often a very long RCPT TO or EHLO name.
  • An HTTP request or port scanner hit the SMTP port, which servers log as 500 errors.

How to fix it

  1. Check the port and TLS mode: 465 uses implicit TLS, 587 and 25 use STARTTLS. Make the client setting match the port.
  2. Turn on the client’s SMTP debug log and find the exact line that drew the 500.
  3. Fix the client to send CRLF line endings and standard commands (EHLO, MAIL FROM:<...>, RCPT TO:<...>, DATA).
  4. If the problem device cannot be updated, put a local relay in front of it that speaks clean SMTP to the outside world.

Checks that apply

  • SMTP Diagnostics Opens a clean SMTP session to the server and shows its banner and STARTTLS support, a known good baseline to compare with your client.
  • TCP Port Test Tests which of ports 25, 465, and 587 are open, so you can match the client’s TLS mode to the right one.

The classification runs without network lookups and we never store your paste.

FAQ

Is a 500 error a spam block?
No. It is a syntax problem in the SMTP conversation. Blocks for spam or reputation use 550 or 554 with a 5.7.x code.
Why do I see 500 errors from unknown IPs in my own logs?
Usually scanners or bots sending HTTP or random data to your mail port. They are harmless noise if your server just rejects them.

All 191 bounce codes