What’s the difference between hard and soft failure codes?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
SMTP response codes fall into two fundamental categories: temporary failures that tell you to retry later, and permanent failures that tell you to stop. Understanding which is which saves you from two opposite mistakes: giving up on a message that would have delivered, or hammering addresses that will never work.
Soft failures (4xx codes) are temporary. The server is saying "not right now" rather than "never." Your sending system should queue the message and retry it later, using increasingly longer wait intervals (exponential backoff). Common 4xx codes include 421 (server temporarily unavailable), 450 and 451 (mailbox temporarily unavailable or server busy), and 452 (insufficient storage). Most of these resolve themselves within hours. Your MTA's queue lifetime setting determines how long it keeps trying before giving up.
Hard failures (5xx codes) are permanent. The server is definitively refusing delivery and you shouldn't retry. These should be treated as hard bounces: remove the address from your active list. Common 5xx codes include 550 (user unknown or mailbox unavailable), 551 (user not local), 553 (mailbox name not allowed), and 554 (transaction failed, often a policy or spam block). Continuing to send to hard-bounced addresses damages your sender reputation.
The full response text after the code almost always contains additional detail that helps diagnose the specific cause. Don't just look at the number. Read the message. "550 5.7.1 The email account that you tried to reach does not exist" is different from "550 5.7.1 Message rejected due to security policy" and requires a completely different fix.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.