RFC 1893

Enhanced Mail System Status Codes

๐Ÿ“… published January 1996, from ietf

Enhanced Mail System Status Codes ๐Ÿ’Œ

Okay bestie, this is RFC 1893 ๐ŸŽ€. It's a Standards Track doc from the Network Working Group, written by G. Vaudreuil of Octel Network Services and dated January 1996 โœจ. The header doesn't list anything it obsoletes or updates, so it's standing on its own ๐Ÿ’….

Status of this Memo

This doc specifies an Internet standards track protocol for the whole Internet community, and it asks for discussion and suggestions to make it better ๐Ÿ’ฌ. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1) ๐Ÿ“‹. Distribution of this memo is unlimited ๐ŸŒˆ.

1. Overview โœจ

Okay so right now there's no real standard way to report mail system errors ๐Ÿ˜ญ. You've only got the tiny set SMTP offers, plus whatever system-specific text people stick in their mail messages. We desperately need a rich, machine-readable status code for delivery status notifications [DSN] ๐Ÿ’…, so this doc proposes a brand new set of status codes just for that ๐Ÿ”ฅ.

SMTP [SMTP] error codes have historically been used for reporting mail system errors. But the SMTP code design has limits, so they aren't suitable for delivery status notifications ๐Ÿ™ˆ. SMTP gives you about 12 useful codes for delivery reports, and most of the codes are protocol-specific response codes, like the 354 response to the SMTP data command. On top of that, each of those 12 useful codes is overloaded to mean several different error conditions ๐Ÿ’€. SMTP also has some scars from history, most notably the unfortunate damage to the reply code extension mechanism from uncontrolled use ๐Ÿ˜ค. This proposal is built for future extensibility: clients interpret unknown error codes according to the theory of codes, and servers have to register new response codes ๐Ÿงš.

The SMTP theory of reply codes is partitioned in the number space in such a way that the remaining available codes won't provide the space needed ๐Ÿ˜ฉ. The most critical example is that only 5 codes are left for mail system errors. The mail system classification covers both host and mailbox error conditions, and the remaining third-digit space would be completely eaten up by MIME and media conversion errors and security system errors ๐Ÿ’”.

A revision to the SMTP theory of reply codes that better distributes the error conditions in the number space would necessarily be incompatible with SMTP ๐Ÿšซ. Plus, using up the remaining reply-code number space for delivery notification reporting would leave fewer codes for new ESMTP extensions ๐Ÿฅฒ.

This proposal is based on the SMTP theory of reply codes ๐ŸŽ€. It keeps the success, permanent error, and transient error semantics of the first value, and adds further description and classification in the second. It also re-distributes the classifications so the error conditions are spread out better, like separating mailbox errors from host errors ๐Ÿ‘‘.

2. Status Codes

This doc defines a new set of status codes for reporting mail system conditions ๐Ÿ’–. They're meant to be media and language independent, so they are not intended for system-specific diagnostics ๐Ÿ™…โ€โ™€๏ธ.

The syntax of the new status codes is defined as:

status-code = class "." subject "." detail
class = "2"/"4"/"5"
subject = 1*3digit
detail = 1*3digit

White-space characters and comments are NOT allowed within a status-code ๐Ÿšซ. Each numeric sub-code within the status-code MUST be expressed without leading zero digits ๐Ÿ”ฅ.

A status code has three numerical fields separated by "." โœจ. The first sub-code tells you whether the delivery attempt was successful. The second sub-code shows the probable source of any delivery anomalies, and the third sub-code shows the precise error condition ๐Ÿง .

The code space is only extensible by standards track documents, so no freelancing ๐Ÿ™…โ€โ™€๏ธ. Mail system specific status codes should be mapped as close as possible to the standard ones. Servers should send only defined, registered status codes, and system-specific errors and diagnostics should be carried by means other than status codes ๐Ÿ“ฆ.

New subject and detail codes will be added over time ๐ŸŒฑ. The number space is large, so published status codes won't ever be redefined or eliminated, which is iconic of them ๐Ÿ’œ. Clients should keep the extensibility of the code space alive by reporting the general error described in the subject sub-code whenever the specific detail is unrecognized ๐Ÿซถ.

The class sub-code gives a broad classification of the status ๐ŸŒˆ. The enumerated class values are:

2.X.X Success ๐Ÿ’š Success means the DSN is reporting a positive delivery action. Detail sub-codes may give notice of transformations required for delivery โœจ.

4.X.X Persistent Transient Failure ๐Ÿงก A persistent transient failure is one where the message as sent is valid, but some temporary event stops it from being sent successfully. Sending in the future may work ๐Ÿ•ฐ๏ธ.

5.X.X Permanent Failure ๐Ÿ’€ A permanent failure is one that resending the message in its current form isn't likely to fix. Some change to the message or the destination has to be made for delivery to succeed ๐Ÿ› ๏ธ.

A client must recognize and report the class sub-code even when the subsequent subject sub-codes are unrecognized ๐Ÿ”.

The subject sub-code classifies the status ๐ŸŽฏ. This value applies to each of the three classifications. If it's recognized, the subject sub-code must be reported, even when the detail sub-code adds info that isn't recognized. The enumerated subject values are:

X.0.X Other or Undefined Status ๐ŸŒซ๏ธ There's no additional subject information available.

X.1.X Addressing Status ๐Ÿ“ฌ The address status reports on the originator or destination address. It can include address syntax or validity problems. The sender can generally fix these errors and retry ๐Ÿ”.

X.2.X Mailbox Status ๐Ÿ“ฅ Mailbox status means something to do with the mailbox caused this DSN. Mailbox issues are assumed to be under the general control of the recipient ๐Ÿง‘โ€๐Ÿ’ป.

X.3.X Mail System Status ๐Ÿข Mail system status means something to do with the destination system caused this DSN. System issues are assumed to be under the general control of the destination system administrator ๐Ÿง‘โ€๐Ÿ”ง.

X.4.X Network and Routing Status ๐Ÿ›ฐ๏ธ The networking or routing codes report status about the delivery system itself. Those system components include any necessary infrastructure, like directory and routing services. Network issues are assumed to be under the control of the destination or intermediate system administrator ๐Ÿ—บ๏ธ.

X.5.X Mail Delivery Protocol Status ๐Ÿค The mail delivery protocol status codes report failures in the message delivery protocol. These include the full range of problems from implementation errors or an unreliable connection ๐Ÿซ . Protocol issues can be controlled by lots of parties, including the originating system, destination system, or intermediate system administrators ๐Ÿ‘ฅ.

X.6.X Message Content or Media Status ๐Ÿ–ผ๏ธ The message content or media status codes report failures involving the content of the message. These codes cover failures due to translation, transcoding, or otherwise unsupported message media ๐ŸŽž๏ธ. Content and media issues are under the control of both the sender and the receiver, and both of them must support a common set of supported content-types ๐Ÿค“.

X.7.X Security or Policy Status ๐Ÿ” The security or policy status codes report failures involving policies, like per-recipient or per-host filtering, and cryptographic operations ๐Ÿ•ต๏ธโ€โ™€๏ธ. These issues are assumed to be under the control of either or both the sender and recipient. Both must permit the exchange of messages and arrange the exchange of the necessary keys and certificates for cryptographic operations ๐Ÿ—๏ธ.

3. Enumerated Status Codes

This section defines and describes the detail sub-code ๐Ÿ“. The detail value gives more info about the status, and it's defined relative to the subject of the status ๐ŸŽ€.

3.1 Other or Undefined Status

X.0.0 Other undefined Status ๐ŸŒ€ Other undefined status is the only undefined error code. It should be used for all errors where only the class of the error is known ๐Ÿคทโ€โ™€๏ธ.

3.2 Address Status

X.1.0 Other address status ๐Ÿ“ญ Something about the address in the message caused this DSN ๐Ÿง.

X.1.1 Bad destination mailbox address ๐Ÿšท The mailbox in the address doesn't exist. For Internet mail names, this means the address portion to the left of the "@" sign is invalid. This code is only useful for permanent failures ๐Ÿ’….

X.1.2 Bad destination system address ๐Ÿš๏ธ The destination system in the address doesn't exist or can't accept mail. For Internet mail names, this means the address portion to the right of the "@" is invalid for mail. This code is only useful for permanent failures ๐Ÿ™ƒ.

X.1.3 Bad destination mailbox address syntax ๐Ÿงฉ The destination address was syntactically invalid. This can apply to any field in the address. This code is only useful for permanent failures โŒ.

X.1.4 Destination mailbox address ambiguous ๐Ÿ‘ฏ The mailbox address as specified matches one or more recipients on the destination system. This can happen if a heuristic address mapping algorithm is used to map the specified address to a local mailbox name ๐ŸŒ€.

X.1.5 Destination address valid โœ… This mailbox address as specified was valid. This status code should be used for positive delivery reports ๐ŸŽ‰.

X.1.6 Destination mailbox has moved, No forwarding address ๐Ÿƒโ€โ™€๏ธ The mailbox address was valid at one point, but mail is no longer accepted for it. This code is only useful for permanent failures ๐Ÿ˜ข.

X.1.7 Bad sender's mailbox address syntax โœ๏ธ The sender's address was syntactically invalid. This can apply to any field in the address ๐Ÿซฃ.

X.1.8 Bad sender's system address ๐Ÿ—๏ธ The sender's system in the address doesn't exist or can't accept return mail. For domain names, this means the address portion to the right of the "@" is invalid for mail ๐Ÿ“ฎ.

3.3 Mailbox Status

X.2.0 Other or undefined mailbox status ๐Ÿ“ซ The mailbox exists, but something about the destination mailbox has caused this DSN to be sent ๐Ÿ‘€.

X.2.1 Mailbox disabled, not accepting messages ๐Ÿ”• The mailbox exists but isn't accepting messages. This can be a permanent error if the mailbox will never be re-enabled, or a transient error if the mailbox is only temporarily disabled โณ.

X.2.2 Mailbox full

Okay so the mailbox is full ๐Ÿ˜ญ because the user went over a per-mailbox admin quota or ran out of actual physical room ๐Ÿ—„๏ธ. The general vibe is that the recipient can delete stuff to free up space ๐Ÿงน. This code should be used as a persistent transient failure ๐ŸŒธ.

X.2.3 Message length exceeds administrative limit

Oof, the admin set a per-mailbox limit on message length and this message went over it ๐Ÿ™…โ€โ™€๏ธ. This status code should be used when the per-mailbox message length limit is smaller than the general system limit ๐Ÿ“. Treat it as a permanent failure ๐Ÿ’€.

X.2.4 Mailing list expansion problem

The mailbox is a mailing list address, and the list couldn't be expanded ๐Ÿ“ฌ. This code may represent a permanent failure or a persistent transient failure ๐Ÿคทโ€โ™€๏ธ.


3.4 Mail system status ๐Ÿ’…

X.3.0 Other or undefined mail system status

The destination system exists and normally accepts mail โœ…, but something about the system caused this DSN to get generated ๐Ÿค”.

X.3.1 Mail system full

Mail system storage has been exceeded ๐Ÿ“ฆ๐Ÿ’ฅ. The general vibe suggests the individual recipient may not be able to delete stuff to make room for more messages ๐Ÿ™ƒ. This is useful only as a persistent transient error โœจ.

X.3.2 System not accepting network messages

The host where the mailbox lives isn't accepting messages ๐Ÿšซ. Examples include an imminent shutdown, excessive load, or system maintenance ๐Ÿ› ๏ธ. This is useful for both permanent and permanent transient errors ๐Ÿค“.

X.3.3 System not capable of selected features

Some selected features specified for the message aren't supported by the destination system ๐Ÿ™…. This can occur in gateways when features from one domain can't be mapped onto the supported feature in another ๐ŸŒ‰.

X.3.4 Message too big for system

The message is larger than the per-message size limit ๐Ÿ“. That limit may be for physical or administrative reasons ๐Ÿข. This is useful only as a permanent error ๐Ÿ’€.

X.3.5 System incorrectly configured

The system isn't set up in a way that lets it accept this message ๐Ÿ”ง.


3.5 Network and Routing Status ๐ŸŒ

X.4.0 Other or undefined network or routing status

Something went wrong with the networking, but it's not clear what, or none of the other detail codes can describe it well ๐ŸŒซ๏ธ.

X.4.1 No answer from host

The outbound connection attempt didn't get an answer, either because the remote system was busy or couldn't take a call ๐Ÿ“ž. This is useful only as a persistent transient error โœจ.

X.4.2 Bad connection

The outbound connection was established, but the message transaction still couldn't finish, either because of a time-out or inadequate connection quality ๐Ÿ“ถ. This is useful only as a persistent transient error ๐ŸŒธ.

X.4.3 Directory server failure

The network system couldn't forward the message because a directory server was unavailable ๐Ÿ“–. This is useful only as a persistent transient error ๐Ÿ”.

Not being able to connect to an Internet DNS server is one example of this directory server failure error ๐ŸŒ.

X.4.4 Unable to route

The mail system couldn't figure out the next hop, because the necessary routing info wasn't available from the directory server ๐Ÿ—บ๏ธ. This is useful for both permanent and persistent transient errors ๐Ÿซถ.

A DNS lookup that only returns an SOA (Start of Administration) record for a domain name is one example of this unable to route error ๐Ÿ™ˆ.

X.4.5 Mail system congestion

The mail system couldn't deliver the message because it was congested ๐Ÿšฆ. This is useful only as a persistent transient error ๐ŸŒŠ.

X.4.6 Routing loop detected

A routing loop kept forwarding the message too many times ๐Ÿ”, either because of incorrect routing tables or a user forwarding loop ๐ŸŒ€. This is useful only as a persistent transient error โœจ.

X.4.7 Delivery time expired

The rejecting system considered the message too old ๐Ÿ•ฐ๏ธ, either because it sat on that host too long or because the time-to-live value the sender set got exceeded. If possible, return the code for the actual problem found when delivery was attempted, instead of this one ๐ŸŽฏ. This is useful only as a persistent transient error ๐Ÿ’œ.


3.6 Mail Delivery Protocol Status ๐Ÿ“ฎ

X.5.0 Other or undefined protocol status

Something was wrong with the protocol needed to deliver the message to the next hop, and the problem can't be well expressed with any of the other detail codes ๐Ÿงฉ.

X.5.1 Invalid command

A mail transaction protocol command came in that was either out of sequence or unsupported ๐Ÿ™…โ€โ™€๏ธ. This is useful only as a permanent error ๐Ÿ’€.

X.5.2 Syntax error

A mail transaction protocol command was issued that couldn't be interpreted, either because the syntax was wrong or the command is unrecognized ๐Ÿคจ. This is useful only as a permanent error ๐Ÿ’€.

X.5.3 Too many recipients

More recipients were specified for the message than the protocol could have delivered to ๐Ÿ“จ. This error should normally result in splitting the message into two, with the remaining recipients delivered on a subsequent delivery attempt โœ‚๏ธ. It's included in this list in case that splitting isn't possible ๐Ÿซ .

X.5.4 Invalid command arguments

A valid mail transaction protocol command came with invalid arguments, either because they were out of range or represented unrecognized features ๐Ÿง. This is useful only as a permanent error ๐Ÿ’€.

X.5.5 Wrong protocol version

There was a protocol version mismatch that the communicating parties couldn't resolve automatically ๐Ÿค.


3.7 Message Content or Message Media Status ๐ŸŽจ

X.6.0 Other or undefined media error

Something about the content of the message made it undeliverable, and the problem can't be well expressed with any of the other detail codes ๐Ÿ–ผ๏ธ.

X.6.1 Media not supported

The media of the message isn't supported by either the delivery protocol or the next system in the forwarding path ๐Ÿšซ. This is useful only as a permanent error ๐Ÿ’€.

X.6.2 Conversion required and prohibited

The content has to be converted before it can be delivered, and that conversion isn't permitted ๐Ÿ™…. That prohibition can come from the sender's expression in the message itself, or from the policy of the sending host ๐Ÿ“œ.

X.6.3 Conversion required but not supported

The message content has to be converted to be forwarded, but that conversion isn't possible or practical for a host in the forwarding path ๐Ÿ˜ต. This can happen when an ESMTP gateway supports 8bit transport but can't downgrade the message to 7 bit as the next hop requires ๐Ÿ”ฝ.

X.6.4 Conversion with loss performed

This is a warning sent to the sender ๐Ÿšจ. Delivery was successful, but the conversion lost some data along the way ๐Ÿ’”. This may also be a permanent error if the sender indicated that conversion with loss is prohibited for the message ๐Ÿ™…โ€โ™€๏ธ.

X.6.5 Conversion Failed

A conversion was required but was unsuccessful ๐Ÿ’”. This may be useful as a permanent or persistent temporary notification ๐Ÿ””.


3.8 Security or Policy Status ๐Ÿ”

X.7.0 Other or undefined security status

Something security-related caused the message to be returned, and the problem can't be well expressed with any of the other detail codes ๐Ÿ›ก๏ธ. This status code may also be used when the condition can't be described any further because of security policies in force ๐Ÿค.

X.7.1 Delivery not authorized, message refused

The sender isn't authorized to send to the destination ๐Ÿšท. This can be the result of per-host or per-recipient filtering ๐Ÿงฑ. This memo doesn't discuss the merits of any such filtering, but it provides a mechanism to report it ๐Ÿ“ฃ. This is useful only as a permanent error ๐Ÿ’€.

X.7.2 Mailing list expansion prohibited

The sender isn't authorized to send a message to the intended mailing list ๐Ÿ“ญ. This is useful only as a permanent error ๐Ÿ’€.

X.7.3 Security conversion required but not possible

A conversion from one secure messaging protocol to another was required for delivery, and that conversion wasn't possible ๐Ÿ”’. This is useful only as a permanent error ๐Ÿ’€.

X.7.4 Security features not supported

A message contained security features, such as secure authentication, that couldn't be supported on the delivery protocol ๐Ÿชช. This is useful only as a permanent error ๐Ÿ’€.

X.7.5 Cryptographic failure

A transport system that's otherwise authorized to validate or decrypt a message in transport couldn't do it, because necessary info such as a key was unavailable or invalid ๐Ÿ”‘.

X.7.6 Cryptographic algorithm not supported

A transport system otherwise authorized to validate or decrypt a message couldn't do it, because the necessary algorithm wasn't supported ๐Ÿงฎ.

X.7.7 Message integrity failure

A transport system otherwise authorized to validate a message couldn't do it, because the message was corrupted or altered ๐Ÿ’”. This may be useful as a permanent, transient persistent, or successful delivery code โœ….


4. References ๐Ÿ“š

[SMTP] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821, USC/Information Sciences Institute, August 1982.

[DSN] Moore, K., and G. Vaudreuil, "An Extensible Message Format for Delivery Status Notifications", RFC 1894, University of Tennessee, Octel Network Services, January 1996.

5. Security Considerations ๐Ÿšจ

Heads up, this one's serious ๐Ÿ˜ฌ This document describes a status code system with increased precision. Use of these status codes may disclose additional information about how an internal mail system is implemented, beyond what's currently available ๐Ÿ•ต๏ธโ€โ™€๏ธ.

6. Acknowledgments ๐Ÿซถ

The author wants to give special thanks to Harald Alvestrand, Marko Kaittola, and Keith Moore for their extensive review and constructive suggestions ๐Ÿ’–.

7. Author's Address ๐Ÿ’Œ

Gregory M. Vaudreuil
Octel Network Services
17060 Dallas Parkway
Suite 214
Dallas, TX 75248-1905

Voice/Fax: +1-214-733-2722
EMail: Greg.Vaudreuil@Octel.com

8. Appendix - Collected Status Codes ๐ŸŒˆ

okay so this is the big list of enhanced status codes, bestie ๐Ÿ’… every one is a three-part code, and the first number is the class, so X.1.x is about addresses, X.2.x is about mailboxes, and so on ๐Ÿฆ‹

       X.1.0     Other address status
       X.1.1     Bad destination mailbox address
       X.1.2     Bad destination system address
       X.1.3     Bad destination mailbox address syntax
       X.1.4     Destination mailbox address ambiguous
       X.1.5     Destination mailbox address valid
       X.1.6     Mailbox has moved
       X.1.7     Bad sender's mailbox address syntax
       X.1.8     Bad sender's system address

       X.2.0     Other or undefined mailbox status
       X.2.1     Mailbox disabled, not accepting messages
       X.2.2     Mailbox full
       X.2.3     Message length exceeds administrative limit.
       X.2.4     Mailing list expansion problem

       X.3.0     Other or undefined mail system status
       X.3.1     Mail system full
       X.3.2     System not accepting network messages
       X.3.3     System not capable of selected features
       X.3.4     Message too big for system

       X.4.0     Other or undefined network or routing status
       X.4.1     No answer from host
       X.4.2     Bad connection
       X.4.3     Routing server failure
       X.4.4     Unable to route
       X.4.5     Network congestion
       X.4.6     Routing loop detected
       X.4.7     Delivery time expired

       X.5.0     Other or undefined protocol status
       X.5.1     Invalid command
       X.5.2     Syntax error
       X.5.3     Too many recipients
       X.5.4     Invalid command arguments
       X.5.5     Wrong protocol version

       X.6.0     Other or undefined media error
       X.6.1     Media not supported
       X.6.2     Conversion required and prohibited
       X.6.3     Conversion required but not supported
       X.6.4     Conversion with loss performed
       X.6.5     Conversion failed
       X.7.0     Other or undefined security status
       X.7.1     Delivery not authorized, message refused
       X.7.2     Mailing list expansion prohibited
       X.7.3     Security conversion required but not possible
       X.7.4     Security features not supported
       X.7.5     Cryptographic failure
       X.7.6     Cryptographic algorithm not supported
       X.7.7     Message integrity failure
๐Ÿ“ฆ where this page comes from