New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
SMTP and APIUpdated 4 Nov 2026

SMTP response codes list: 2xx, 3xx, 4xx and 5xx reply codes explained

A reference to SMTP reply codes: what the first digit means, the common 2xx, 3xx, 4xx and 5xx codes, how enhanced status codes like 5.1.1 add detail, and how to decide whether to retry, fix or give up.

SM
Written by Sofia Marino
Technical Support Lead
Reviewed by Tomasz Kowalski
  • Published22 Jul 2024
  • Read time6 min
  • Length1,280 words
Share this guide

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.

2xxThe command succeeded, for example 250 OK
3xxWaiting for more data, for example 354 after DATA
4xxTemporary failure: retry later, usually with backoff
5xxPermanent failure: fix the cause, do not retry unchanged

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 policy

The 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

CodeMeaningWhere you see it
211System status or help replyReply to a status request
214Help messageReply to HELP
220Service readyConnection banner, and after STARTTLS is accepted
221Service closing the channelReply to QUIT
235Authentication succeededReply to AUTH
250Requested action completedAfter EHLO, MAIL FROM, RCPT TO, RSET, NOOP and the final dot
251User not local, will forwardRare; forwarding notice
252Cannot verify the user but will accept the messageReply to VRFY, or a server that accepts and checks later
334Server challengeDuring AUTH, with a base64 challenge
354Start mail input, end with a lone dotReply 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

CodeMeaningTypical cause
421Service not available, closing the channelServer busy or shutting down, rate limiting, policy deferral
450Mailbox unavailable, temporaryGreylisting, mailbox locked, policy delay
451Local error in processingServer problem, failed lookup, throttling
452Insufficient storage or too many recipientsMailbox full or recipient count limit hit
454Temporary authentication failureAuthentication backend unavailable
455Server unable to accommodate parametersParameter 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

CodeMeaningTypical cause
500Syntax error, command not recognisedTypo, or a command sent before the connection is ready
501Syntax error in parameters or argumentsMissing angle brackets, invalid address
502Command not implementedDisabled command such as VRFY
503Bad sequence of commandsRCPT TO before MAIL FROM
504Command parameter not implementedUnsupported authentication mechanism
530Authentication requiredSubmission without AUTH, or STARTTLS required first
535Authentication credentials invalidWrong username, password or API key
550Mailbox unavailableUser unknown, blocked sender, policy rejection
551User not localRare; forwarding refused
552Exceeded storage allocation or message sizeMessage too large, mailbox over quota
553Mailbox name not allowedMalformed address or sender not permitted
554Transaction failedMessage rejected: spam, blocklist, authentication policy
555Parameters on MAIL FROM or RCPT TO not recognisedUnsupported 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

CodeMeaningUsual action
2.0.0Message acceptedNone
4.2.2Mailbox full, temporaryRetry; ask the recipient to free space
4.4.1No answer from the destination hostRetry; check the destination later
4.7.0Temporary policy or reputation deferralRetry slowly, check rate and reputation
5.1.1Bad destination mailbox addressRemove or correct the address
5.1.2Bad destination system addressCheck the domain spelling and DNS
5.1.8Bad sender system addressMake sure the sender domain resolves
5.2.2Mailbox full, permanentTreat as undeliverable
5.3.4Message too big for the systemReduce size
5.4.4Unable to routeCheck MX and DNS for the destination
5.7.1Delivery not authorised or rejected by policyCheck authentication, reputation and content
5.7.26Authentication 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

  1. Treat the first digit as the control flow: 2 continue, 3 send data, 4 requeue, 5 fail the recipient.
  2. Evaluate replies per recipient. A transaction can have some RCPT TO accepted and others refused.
  3. Store the full reply text and enhanced code with each attempt; counts of the bare three digit code hide the cause.
  4. Treat a 4xx that persists beyond your maximum queue time as a final failure and report it as such.
  5. 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

SymptomLikely codesFirst check
Mail delayed, no bounce421, 450, 451, 4.7.0Rate limits, greylisting, reputation
Instant bounce for one recipient550 5.1.1, 553Address typo or non-existent user
Every message rejected554 5.7.1, 5.7.26SPF, DKIM, DMARC and blocklists
Cannot log in535, 530, 534Credentials, TLS, enabled mechanism
Large messages fail552 5.3.4Attachment size and the advertised SIZE limit
Connection drops421 or no replyFirewall, 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.

Explore the SMTP relay

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.

Topics#smtp#reply codes#errors#logs#rfc 5321
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales