SMTP Status Codes

Email server response codes and their meanings for troubleshooting.

SMTP reply codes, the three-digit numbers a mail server sends back at each step of delivering an email, with what each one means and whether it's a success, a temporary failure or a permanent failure. The first digit tells you most: 2 means done, 3 means send more (354 after DATA), 4 means try again later, and 5 means it won't work as sent. Bounce messages and mail logs often add an enhanced code such as 5.1.1 (no such mailbox), defined in RFC 3463, after the main one. The table follows RFC 5321 and RFC 7504. For DNS records that affect delivery, such as MX and SPF, see the DNS Record Types table.

SMTP reply codes

CodeMeaningType
211System status or help replySuccess
214Help messageSuccess
220Service readySuccess
221Service closing the connectionSuccess
250Requested action OK, completedSuccess
251User not local; will forwardSuccess
252Cannot verify the user, but will accept the messageSuccess
354Start mail input; end with <CRLF>.<CRLF>Intermediate
421Service not available, closing the connectionTemporary failure (retry)
450Mailbox unavailable (e.g. busy); try again laterTemporary failure (retry)
451Local error in processing; abortedTemporary failure (retry)
452Insufficient system storageTemporary failure (retry)
455Server unable to accommodate parametersTemporary failure (retry)
500Syntax error, command unrecognizedPermanent failure
501Syntax error in parameters or argumentsPermanent failure
502Command not implementedPermanent failure
503Bad sequence of commandsPermanent failure
504Command parameter not implementedPermanent failure
521Host does not accept mailPermanent failure
550Mailbox unavailable (not found, no access, or rejected by policy)Permanent failure
551User not localPermanent failure
552Exceeded storage allocationPermanent failure
553Mailbox name not allowedPermanent failure
554Transaction failed (often: rejected as spam)Permanent failure
555MAIL FROM/RCPT TO parameters not recognizedPermanent failure
556Domain does not accept mailPermanent failure

Servers often add an enhanced status code such as 5.1.1 (bad mailbox) after the reply code (RFC 3463).

Source: RFC 5321 (SMTP), RFC 7504 (codes 521 and 556).

Common use cases

  • Understand a bounce message or mail log
  • Debug an app or server that sends email
  • Tell temporary failures from permanent ones
  • Explain delivery problems to users

How to use

  1. Find the code from the bounce or log.
  2. Read its meaning and type.
  3. Retry later for 4xx codes; fix the address, content or setup for 5xx codes.

FAQ

What does 550 mean?

The server refused the message permanently, most often because the mailbox doesn't exist, or because the message was rejected as spam or by a security check. The text after the code usually says which.

What's the difference between 4xx and 5xx codes?

4xx codes are temporary: the sending server should keep trying for a while (often several days). 5xx codes are permanent, and the sender gets a bounce straight away.

What are codes like 5.7.1?

Enhanced status codes from RFC 3463. The first digit matches the main code's class, the second is the subject (1 address, 2 mailbox, 7 security or policy) and the third is the detail. 5.7.1 usually means delivery wasn't allowed by policy.