Skip to main content

What are SMTP 4xx vs 5xx error codes?

SMTP response codes signal whether failures are temporary or permanent:

4xx codes (Temporary failures):

Indicate conditions that may resolve. Sending server should retry later. Common examples: 421 (service unavailable), 450 (mailbox unavailable), 451 (local error), 452 (insufficient storage).

5xx codes (Permanent failures):

Indicate conditions unlikely to change. Sending server should not retry. Address should typically be suppressed. Common examples: 550 (mailbox not found), 551 (user not local), 552 (message too large), 553 (mailbox name invalid), 554 (transaction failed).

Practical handling:

4xx: Queue and retry according to schedule. 5xx: Log, suppress, do not retry.

4xx says "not right now." 5xx says "not ever." Respect both signals appropriately.