Every SMTP command gets a reply that starts with a three digit code. The first digit tells you what to do: 2 means success, 3 means the server wants more input, 4 means a temporary failure so try again later, and 5 means a permanent failure so do not retry the same request. The second and third digits say which part of the system the reply is about and give the specific condition.
This guide lists the codes defined in RFC 5321 plus the ones servers use in practice, explains enhanced status codes such as 5.1.1, and gives a decision rule for retries. If you only need the rule: retry 4xx with backoff, stop on 5xx, and read the text after the code, because it usually names the real cause.
How to read a reply
A reply is a code, a space or hyphen, and human readable text. A hyphen after the code (250-) means more lines follow; a space (250 ) marks the last line. When the server advertises the ENHANCEDSTATUSCODES extension, the text begins with a second code in the form class.subject.detail, defined in RFC 3463.
250 2.1.5 Recipient ok
452 4.2.2 Mailbox full, try again later
550 5.1.1 <[email protected]>: Recipient address rejected: User unknown
554 5.7.1 Message rejected due to local policyThe enhanced class repeats the first digit of the basic code (2, 4 or 5). The subject groups causes: 1 for addressing, 2 for mailbox, 3 for mail system, 4 for network and routing, 5 for protocol, 6 for message content, 7 for security and policy. The detail narrows it. Where the two codes disagree, trust the enhanced code and the text.
2xx and 3xx: success and continue
| Code | Meaning | Where you see it |
|---|---|---|
| 211 | System status or help reply | Reply to a status request |
| 214 | Help message | Reply to HELP |
| 220 | Service ready | Connection banner, and after STARTTLS is accepted |
| 221 | Service closing the channel | Reply to QUIT |
| 235 | Authentication succeeded | Reply to AUTH |
| 250 | Requested action completed | After EHLO, MAIL FROM, RCPT TO, RSET, NOOP and the final dot |
| 251 | User not local, will forward | Rare; forwarding notice |
| 252 | Cannot verify the user but will accept the message | Reply to VRFY, or a server that accepts and checks later |
| 334 | Server challenge | During AUTH, with a base64 challenge |
| 354 | Start mail input, end with a lone dot | Reply to DATA |
A 250 after the final dot of DATA is the one that matters: the receiving server has accepted responsibility for the message. It does not mean the message reached the inbox, only that it was accepted for processing. Filtering and later bounces can still happen.
4xx: temporary failures
| Code | Meaning | Typical cause |
|---|---|---|
| 421 | Service not available, closing the channel | Server busy or shutting down, rate limiting, policy deferral |
| 450 | Mailbox unavailable, temporary | Greylisting, mailbox locked, policy delay |
| 451 | Local error in processing | Server problem, failed lookup, throttling |
| 452 | Insufficient storage or too many recipients | Mailbox full or recipient count limit hit |
| 454 | Temporary authentication failure | Authentication backend unavailable |
| 455 | Server unable to accommodate parameters | Parameter not supported at this time |
Retry these. A well behaved sender keeps the message in a queue and tries again with growing intervals for a period such as several days before giving up and generating a bounce. Hammering a server that has just said 421 or 451 usually makes the deferral last longer. For intervals and strategy see SMTP retry schedules, rate limits and backoff and greylisting explained.
5xx: permanent failures
| Code | Meaning | Typical cause |
|---|---|---|
| 500 | Syntax error, command not recognised | Typo, or a command sent before the connection is ready |
| 501 | Syntax error in parameters or arguments | Missing angle brackets, invalid address |
| 502 | Command not implemented | Disabled command such as VRFY |
| 503 | Bad sequence of commands | RCPT TO before MAIL FROM |
| 504 | Command parameter not implemented | Unsupported authentication mechanism |
| 530 | Authentication required | Submission without AUTH, or STARTTLS required first |
| 535 | Authentication credentials invalid | Wrong username, password or API key |
| 550 | Mailbox unavailable | User unknown, blocked sender, policy rejection |
| 551 | User not local | Rare; forwarding refused |
| 552 | Exceeded storage allocation or message size | Message too large, mailbox over quota |
| 553 | Mailbox name not allowed | Malformed address or sender not permitted |
| 554 | Transaction failed | Message rejected: spam, blocklist, authentication policy |
| 555 | Parameters on MAIL FROM or RCPT TO not recognised | Unsupported parameter |
Do not retry a 5xx unchanged. Instead, find out which side the code points at. 550 and 553 often point at the address or sender, 552 at size, 554 at content or reputation, and 535 at credentials. Follow the links for the individual codes: 550, 552, 553, 554 and 535.
Enhanced status codes you will meet most
| Code | Meaning | Usual action |
|---|---|---|
| 2.0.0 | Message accepted | None |
| 4.2.2 | Mailbox full, temporary | Retry; ask the recipient to free space |
| 4.4.1 | No answer from the destination host | Retry; check the destination later |
| 4.7.0 | Temporary policy or reputation deferral | Retry slowly, check rate and reputation |
| 5.1.1 | Bad destination mailbox address | Remove or correct the address |
| 5.1.2 | Bad destination system address | Check the domain spelling and DNS |
| 5.1.8 | Bad sender system address | Make sure the sender domain resolves |
| 5.2.2 | Mailbox full, permanent | Treat as undeliverable |
| 5.3.4 | Message too big for the system | Reduce size |
| 5.4.4 | Unable to route | Check MX and DNS for the destination |
| 5.7.1 | Delivery not authorised or rejected by policy | Check authentication, reputation and content |
| 5.7.26 | Authentication failure under sender policy (used by Gmail) | Fix SPF, DKIM and DMARC alignment |
The list of enhanced codes is long and providers add their own meanings to the 5.7.x range, so always read the accompanying text. A fuller catalogue is in bounce codes list, and how to read a bounce code walks through a real example.
Using the codes in code and monitoring
- Treat the first digit as the control flow: 2 continue, 3 send data, 4 requeue, 5 fail the recipient.
- Evaluate replies per recipient. A transaction can have some
RCPT TOaccepted and others refused. - Store the full reply text and enhanced code with each attempt; counts of the bare three digit code hide the cause.
- Treat a 4xx that persists beyond your maximum queue time as a final failure and report it as such.
- Suppress addresses that return permanent address errors such as 5.1.1, but do not suppress on content or reputation rejections, which say nothing about the address. See suppression list management.
# Minimal classification of an SMTP reply in Python
def classify(code: int) -> str:
first = code // 100
if first == 2: return "success"
if first == 3: return "need-more-input"
if first == 4: return "retry-later"
if first == 5: return "permanent-failure"
return "unknown"Some receivers return a 5xx for what is really a temporary condition, and some return 4xx for permanent ones. Use the first digit as the default and make exceptions based on the text. Log parsing is covered in reading SMTP logs.
Troubleshooting by symptom
| Symptom | Likely codes | First check |
|---|---|---|
| Mail delayed, no bounce | 421, 450, 451, 4.7.0 | Rate limits, greylisting, reputation |
| Instant bounce for one recipient | 550 5.1.1, 553 | Address typo or non-existent user |
| Every message rejected | 554 5.7.1, 5.7.26 | SPF, DKIM, DMARC and blocklists |
| Cannot log in | 535, 530, 534 | Credentials, TLS, enabled mechanism |
| Large messages fail | 552 5.3.4 | Attachment size and the advertised SIZE limit |
| Connection drops | 421 or no reply | Firewall, TLS settings, idle timeouts |
When to use this reference and next steps
Keep this page open when you are reading a bounce, a queue log or a client error and need to decide quickly whether the fault is yours, the recipient's or temporary. The pattern is always the same: the first digit chooses retry or stop, the enhanced code names the area, and the text gives the provider's reason. Codes beyond those listed here exist, and providers define their own wording, so treat the provider's current documentation as the final word for their messages.
For the commands that produce these replies, read SMTP commands explained. To see how a failed message becomes a bounce report, read delivery status notifications. If you operate a sending system, alert on rising 4xx and 5xx rates per destination domain rather than on single failures, because a sudden change in the mix of codes is the earliest sign of a reputation or configuration problem.
Get clear reply codes in every delivery log See the exact SMTP response for each recipient and receive bounce events by webhook.
References and further reading
Frequently asked questions
What do SMTP 2xx, 4xx and 5xx codes mean?
2xx means the action succeeded, 4xx is a temporary failure to retry later, and 5xx is a permanent failure that should not be retried unchanged.
What does SMTP 250 mean?
It means the requested action completed. After the final dot of DATA it means the server accepted the message for processing, not that it reached the inbox.
Is 354 an error?
No. 354 is the reply to DATA and means the server is ready to receive the message, which ends with a line containing only a period.
What is the difference between 550 and 554?
550 usually refers to a mailbox or recipient problem, while 554 means the whole transaction failed, often from content, reputation or policy rejection. Read the text to be sure.
What are enhanced status codes?
They are codes like 5.1.1 defined in RFC 3463 that follow the basic reply code and describe the cause in more detail.