SMTP Response Codes: Complete Reference for Troubleshooting Email Delivery

SMTP Protocol

Every SMTP command receives a three-digit numeric response code. These codes are the protocol’s way of communicating success, failure, or temporary conditions between servers. Understanding them is essential for troubleshooting delivery issues.

Response Code Structure

SMTP response codes follow a consistent format:

ddd[ -]text
  • The first digit indicates the class (success, information, etc.).
  • The second digit indicates the category (syntax, connection, etc.).
  • The third digit provides further specificity within the category.
  • A dash (-) after the code means more lines follow; a space means this is the final line.

First Digit (Class)

Class Meaning Behaviour
2xx Success The command was accepted and completed.
3xx Intermediate More information is needed (e.g., DATA content).
4xx Temporary Failure Try again later — the condition may resolve.
5xx Permanent Failure The command was rejected — do not retry.

Second Digit (Category)

Digit Category
x0x Syntax / system
x1x Information / help
x2x Connection / transmission
x3x Authentication / security
x5x Mail system / recipient status

Common Response Codes

2xx — Success

Code Meaning Context
211 System status help Response to HELP.
220 Service Ready The server is ready. Sent at connection start.
235 Authentication Succeeded The AUTH command completed successfully.
250 Request Completed The command (e.g., MAIL FROM, RCPT TO) succeeded.
251 User Not Local The recipient is not local, but the server will forward the message.
252 Cannot Verify User The server cannot validate the recipient but will attempt delivery.

3xx — Intermediate

Code Meaning Context
334 Server Challenge The server is challenging the client during SASL authentication.
354 Start Mail Input The server is ready to receive the message body after DATA.

4xx — Temporary Failure (Retry Later)

When a server returns a 4xx code, the sending MTA should queue the message and retry. If delivery still fails after a configured retry period (typically 2–5 days), the message is bounced.

Code Meaning Common Cause
421 Service Not Available The server is shutting down, overloaded, or temporarily unavailable.
450 Mailbox Unavailable The recipient’s mailbox is temporarily locked or busy.
451 Local Error The server encountered a temporary processing error.
452 Insufficient Storage The server’s disk or mail store is full.
453 TLS Not Available The server cannot negotiate TLS as required.

5xx — Permanent Failure (Do Not Retry)

A 5xx response means the command was rejected. The sending MTA should not retry — it should generate a bounce immediately.

Code Meaning Common Cause
500 Syntax Error The command was not recognised or was malformed.
501 Syntax Error in Parameters The arguments to the command were invalid.
502 Command Not Implemented The server does not support this command.
503 Bad Sequence of Commands The client issued commands in the wrong order (e.g., DATA before RCPT TO).
504 Parameter Not Implemented The server supports the command but not this particular parameter.
521 Server Does Not Accept Mail The host does not accept mail at all (e.g., a firewall or relay blocker).
523 Encrypted Connection Required The configured policy requires TLS but the connection is unencrypted.
530 Authentication Required The server requires authentication before accepting mail.
535 Authentication Failed The provided credentials were rejected.
550 Mailbox Not Found The recipient address does not exist. Hard failure.
551 User Not Local The server is not the final destination — try a different server.
552 Mailbox Full / Exceeded Quota The recipient’s mailbox has exceeded its storage limit.
553 Mailbox Name Not Allowed The recipient address format is invalid or the domain is not accepted.
554 Transaction Failed Generic failure — the message was rejected (often used by spam filters).

Enhanced Status Codes (RFC 5248 / RFC 2034)

In addition to the three-digit numeric code, SMTP servers may include an enhanced status code — a structured, dot-delimited code that provides finer granularity:

250 2.1.5 Recipient OK
550 5.1.1 The email account does not exist

The enhanced code format is c.x.y:

Component Meaning Example
c Class (same as above) 2 = success, 4 = temp fail, 5 = perm fail
x Subject 1 = addressing, 2 = mailbox, 3 = mail system, 5 = security
y Detail Further precision within the subject

Common Enhanced Codes

Enhanced Code Meaning
2.1.5 Recipient address accepted.
4.2.1 The mailbox is temporarily unavailable.
4.4.1 Unable to connect to the destination MTA.
4.7.1 Delivery not authorised — policy or security failure.
5.1.0 Other address status — generic addressing failure.
5.1.1 Mailbox does not exist (hard bounce).
5.1.2 Bad syntax in the recipient address.
5.2.2 Mailbox is full.
5.7.1 Delivery not authorised (e.g., SPF failure).
5.7.26 The message requires TLS but the connection was not encrypted.

Error Handling Patterns

Retry Logic for 4xx

When your MTA receives a 4xx response:

  1. Queue the message with a retry timestamp.
  2. Retry with exponential backoff — typical starting intervals are 5–15 minutes, doubling up to a maximum of 4–6 hours.
  3. Set a maximum retry window — commonly 2–5 days.
  4. Bounce on expiry — if the message is still undelivered after the retry window, generate a permanent failure notification to the sender.

Hard Bounce Handling for 5xx

When your MTA receives a 5xx response (especially 550 5.1.1):

  1. Do not retry. The address is invalid.
  2. Generate a bounce to the Return-Path address immediately.
  3. Suppress the address in future mailings if the bounce indicates a non-existent mailbox.
  4. Log the failure with sufficient context for postmaster review.

Multi-Line Responses

Some SMTP responses span multiple lines. The server signals continuation with a dash after the code, and terminates with a space:

250-SIZE 35882577
250-8BITMIME
250-PIPELINING
250 AUTH LOGIN PLAIN

Each line after the first uses code- text, and the final line uses code text. This is standard in EHLO responses listing supported extensions.


Quick Reference Table

Code Meaning Action
220 Service Ready Connection accepted.
235 Auth Success Proceed with MAIL FROM.
250 OK Command succeeded.
354 Start Input Send message body.
421 Not Available Retry later (server issue).
450 Mailbox Busy Retry later (recipient issue).
452 Storage Full Retry later (disk issue).
550 No Such User Bounce immediately.
552 Mailbox Full Bounce (inform sender).
554 Rejected Check spam / policy rules.

Further Reading