SMTP Enhanced Status Code
What is SMTP Enhanced Status Code?
An SMTP enhanced status code, defined in RFC 3463, is a three-part class.subject.detail code such as 5.1.1 that a mail server adds to its 3-digit reply, telling software exactly why a message succeeded, was deferred, or failed. AdminKit's SMTP status code decoder explains both the reply code and the enhanced code in a pasted bounce line.
By AdminKit team, Netbase JSC · Updated
An SMTP enhanced status code is the dotted three-part code defined in RFC 3463, written as class.subject.detail, that a mail server places at the start of its reply text to say precisely what happened to a message. The 3-digit reply code that SMTP itself defines, such as 550, only tells a client whether to give up, retry, or carry on; the enhanced code alongside it, such as 5.1.1 (the destination mailbox does not exist) or 4.2.2 (mailbox full), tells software and administrators why. A server signals that it will send these codes by advertising the ENHANCEDSTATUSCODES keyword in its EHLO response, per RFC 2034. The same codes appear in the Status field of a DSN bounce report, and every registered code is listed in IANA’s SMTP Enhanced Status Codes registry, set up by RFC 5248.
How do you read the class and subject of an enhanced status code?
The class is the first digit and must agree with the reply code: 2 means success, 4 a persistent transient failure that may clear on retry, and 5 a permanent failure that resending the same message will not fix. The subject is the second number and names the area of the problem: 0 other or undefined, 1 addressing, 2 mailbox, 3 mail system, 4 network and routing, 5 mail delivery protocol, 6 message content or media, and 7 security or policy. The detail narrows it further within that subject. Many rejections caused by sender authentication or reputation checks fall under the 5.7.x security or policy subject. Large mail providers document the codes their own servers return: Microsoft’s Exchange Online NDR reference lists codes such as 5.1.1 and 5.7.1 with their likely causes in that service.
To decode a real bounce line, paste it into AdminKit’s SMTP status code decoder. SMTP enhanced status codes are part of AdminKit’s email authentication cluster; the full AdminKit glossary lists other related terms.
Frequently asked questions
What do the three numbers in an enhanced status code like 5.1.1 mean?
The first is the class (2 success, 4 persistent transient failure, 5 permanent failure), the second is the subject (for example 1 for addressing, 2 for mailbox, 7 for security or policy), and the third is the detail within that subject. RFC 3463 defines 5.1.1 as a bad destination mailbox address: the mailbox does not exist.
How is an enhanced status code different from the 3-digit SMTP reply code?
The 3-digit reply code from RFC 5321 (such as 550) is what SMTP clients act on; the enhanced code is extra, more specific information carried at the start of the reply text. Its class must agree with the reply code, so a 5xx reply carries a 5.x.x enhanced code.
Does every mail server send enhanced status codes?
No. A server advertises support with the ENHANCEDSTATUSCODES keyword in its EHLO response, defined in RFC 2034; only then are its 2xx, 4xx and 5xx replies (other than the greeting and the HELO/EHLO response) prefaced with an enhanced code.
Where is the official list of enhanced status codes kept?
IANA maintains the SMTP Enhanced Status Codes registry, created by RFC 5248, which lists every registered code with its meaning and the document that defines it.
Sources
- RFC 3463 -- Enhanced Mail System Status Codes
- RFC 2034 -- SMTP Service Extension for Returning Enhanced Error Codes
- RFC 5248 -- A Registry for SMTP Enhanced Mail System Status Codes
- IANA -- Simple Mail Transfer Protocol (SMTP) Enhanced Status Codes Registry
- Microsoft Learn -- Email nondelivery reports (NDRs) and SMTP errors in Exchange Online