Skip to content
Standard SMTP codes · permanent error

5.5.1: invalid SMTP command

The sending software issued an SMTP command that the server does not support, or sent it at the wrong point in the conversation.

Standard
Provider
Permanent (5xx)
Class
Sources checked
Author

At a glance

Code
5.5.1
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.1 Invalid command

What it means

5.5.1 reports a command that is out of sequence or unsupported, for example message data before any recipient was accepted, or a command the server does not offer. RFC 3463 says it is useful only as a permanent error. The registry lists it with several reply codes, including 500, 503 and 550, with 503 (bad sequence of commands) and 500 the closest fits. People writing ordinary mail rarely cause it: it points to sending software, a script, or a firewall that rewrites SMTP traffic.

Common causes

  • Software that sends DATA before any RCPT TO was accepted.
  • A command or extension the server does not offer, such as one missing from its EHLO reply.
  • A firewall or proxy that alters SMTP commands in transit.

How to fix it

  1. 01Check the session log for the command just before the error.
  2. 02Make sure the software reads the server's EHLO reply and only uses extensions listed there.
  3. 03Update the sending library, or switch to a standard SMTP client.
  4. 04If a firewall inspects SMTP, turn that feature off and test again.

Sources

What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.

  1. 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.StandardPermanent
  2. 502Command not implemented.The server recognises the command but does not implement it, so it will not carry that command out in this session.StandardPermanent
  3. 503Bad sequence of commands.The client sent a command at the wrong point in the conversation, for example message data before any recipient was accepted, or mail before logging in.StandardPermanent
  4. 5.5.2SMTP 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.StandardPermanent

5.5.1 at other providers

  1. 503 5.5.1Command sent out of sequence.Your client sent Gmail an SMTP command at the wrong point in the conversation, such as the message before any recipient, so Gmail refused it.GmailPermanent
  2. 503 5.5.1EHLO or HELO missing.Your client started sending mail commands to Gmail without first greeting it with EHLO or HELO, which SMTP requires.GmailPermanent
  3. 503 5.5.1DATA sent after BDAT.Your client began sending the message in BDAT chunks and then switched to DATA in the same transaction, which the CHUNKING extension does not allow.GmailPermanent
  4. 502 5.5.1Command not recognized.Gmail does not know, or does not support, an SMTP command your client sent, and after too many of them it ends the session.GmailPermanent

All 105 standard codesEvery code in the wikiPaste your own bounce

Beat · paid monitoring

A heartbeat for your email.

Beat runs every check on this site on a schedule: 41 checks, 33 blacklists and real inbox placement. The moment something breaks, it tells you what broke, why it matters, and the exact fix.

example.comWatching
  • SPFpass
  • DKIMpass
  • DMARCp=none
  • Blacklists0 of 33

Illustrative. Your domain, every few hours.

Also from us:Pulse: your own sending infrastructureConsulting: $65/hr, no retainer