SMTP 503: bad sequence of commands

503Bad sequence of commandsPermanent: retrying will not help

Example
503 5.5.1 Error: need RCPT command

What it means

RFC 5321 defines 503 as "Bad sequence of commands". SMTP is a strict dialogue: greeting, EHLO, optional STARTTLS and AUTH, then MAIL FROM, one or more RCPT TO, and DATA. A 503 means the client skipped a step or repeated one that may only happen once.

It often appears as a follow on error. If every RCPT TO was rejected (say with 550), a client that sends DATA anyway gets "503 need RCPT command", so the 503 is not the root cause; the earlier rejection is. RFC 4954 also uses 503 when a client sends AUTH after it has already authenticated, or during a mail transaction.

The enhanced code is usually 5.5.1. Unlike 500 and 501 there is nothing wrong with the command itself, only with when it was sent.

Likely causes

  • All recipients were rejected earlier in the session and the client still sent DATA.
  • The client sends MAIL FROM before EHLO, or skips EHLO after STARTTLS (RFC 3207 requires a fresh EHLO).
  • The client sends AUTH twice or after MAIL FROM.
  • Pipelining is misused: the client sends commands before the server advertised PIPELINING.
  • Some servers reply 503 to relay attempts by unauthenticated clients, with text like "this mail server requires authentication".

How to fix it

  1. Read the log lines before the 503. If a RCPT TO was refused, fix that refusal first; the 503 will go away with it.
  2. Ensure the client sends EHLO again after STARTTLS and authenticates before MAIL FROM.
  3. Disable pipelining in the client if the server does not advertise it.
  4. If the text mentions authentication, configure the client to log in on port 587 or 465 instead of relaying unauthenticated.

Checks that apply

  • SMTP Diagnostics Shows the correct order of banner, EHLO, and STARTTLS for the server, plus whether it advertises PIPELINING.
  • MX Lookup Confirms you are talking to the right host, since sending to an MX instead of a submission server can produce 503 on relay attempts.

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

FAQ

Why do I get 503 after a 550?
Because the 550 removed your only recipient, so there is nobody to send DATA for. Fix the cause of the 550 and the 503 disappears.
Is 503 a sign of spam blocking?
Not directly. It is a protocol order error, though some servers use it with authentication wording when you try to relay without logging in.

All 191 bounce codes