Read the three fields without inventing a new SMTP code
01An enhanced status code is a dotted class, subject and detail. It describes a mail-system condition; it is not a replacement spelling for an ordinary three-digit SMTP reply.
Separate malformed input 5.02.2 has a leading zero in its subject. Stop at the grammar gate. Do not normalize it silently and then pretend it was a correctly formed code.
Source for this drawing: RFC 3463 · Read RFC section 2 ↗
New to this? Start hereA quick picture + helpful background
The envelope and the letter do different jobs.
Mail transport moves a message between servers. The message format describes its contents. Authentication adds checks; it does not make every message safe.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Syntax, registered meaning and appropriate use are separate checks.
- The class is exactly 2, 4 or 5. Subject and detail each have one to three decimal digits. No whitespace or comments are allowed within the code; numeric sub-codes MUST have no leading zero digits.
- Class describes the delivery outcome, subject the probable source of the condition, and detail a more precise condition within that subject. A detail number has no meaning independent of its subject.
- Passing the grammar alone does not establish that a code is registered or appropriate for that class. This guide decodes selected examples, not every registry entry or its SMTP embedding.
The zero sub-code is written 0, not 00. The X and XXX shown in RFC tables are placeholders, not literal characters to transmit. A Delivery Status Notification (DSN) is a structured delivery report; RFC 3464 defines its format. SMTP extension usage is separately specified, so this is not a complete SMTP reply transcript.
Read the RFC section ↗