| TOC |
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the “Internet Official Protocol Standards” (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
Copyright © The Internet Society (1996). All Rights Reserved.
| TOC |
3. Framework for the Enhanced Error Statuses Extension
4. The Enhanced-Status-Codes service extension
5. Status Codes and Negotiation
6. Usage Example
7. Security Considerations
8. References (BOILERPLATE)
9. Author Address (BOILERPLATE)
§ Author's Address
§ Intellectual Property and Copyright Statements
This memo defines an extension to the SMTP service [RFC-821, RFC- 1869] whereby an SMTP server augments its responses with the enhanced mail system status codes defined in RFC 1893. These codes can then be used to provide more informative explanations of error conditions, especially in the context of the delivery status notifications format defined in RFC 1894.
Although SMTP is widely and robustly deployed, various extensions have been requested by parts of the Internet community. In particular, in the modern, international, and multilingual Internet a need exists to assign codes to specific error conditions that can be translated into different languages. RFC 1893 defines such a set of status codes and RFC 1894 defines a mechanism to send such coded material to users. However, in many cases the agent creating the RFC 1894 delivery status notification is doing so in response to errors it received from a remote SMTP server.
As such, remote servers need a mechanism for embedding enhanced status codes in their responses as well as a way to indicate to a client when they are in fact doing this. This memo uses the SMTP extension mechanism described in RFC 1869 to define such a mechanism.
The enhanced error statuses transport extension is laid out as follows:
(1) the name of the SMTP service extension defined here is Enhanced-Status-Codes;
(2) the EHLO keyword value associated with the extension is ENHANCEDSTATUSCODES;
(3) no parameter is used with the ENHANCEDSTATUSCODES EHLO keyword;
(4) the text part of all 2xx, 4xx, and 5xx SMTP responses other than the initial greeting and any response to HELO or EHLO are prefaced with a status code as defined in RFC 1893. This status code is always followed by one or more spaces.
(5) no additional SMTP verbs are defined by this extension; and,
(6) the next section specifies how support for the extension affects the behavior of a server and client SMTP.
Servers supporting the Enhanced-Status-Codes extension must preface the text part of almost all response lines with a status code. As in RFC 1893, the syntax of these status codes is given by the ABNF:
status-code ::= class "." subject "." detail class ::= "2" / "4" / "5" subject ::= 1*3digit detail ::= 1*3digit
These codes must appear in all 2xx, 4xx, and 5xx response lines other than initial greeting and any response to HELO or EHLO. Note that 3xx responses are NOT included in this list.
All status codes returned by the server must agree with the primary response code, that is, a 2xx response must incorporate a 2.X.X code, a 4xx response must incorporate a 4.X.X code, and a 5xx response must incorporate a 5.X.X code. When responses are continued across multiple lines the same status code must appear at the beginning of the text in each line of the response.
Servers supporting this extension must attach enhanced status codes to their responses regardless of whether or not EHLO is employed by the client.
This specification does not provide a means for clients to request that status codes be returned or that they not be returned; a compliant server includes these codes in the responses it sends regardless of whether or not the client expects them. This is somewhat different from most other SMTP extensions, where generally speaking a client must specifically make a request before the extended server behaves any differently than an unextended server. The omission of client negotiation in this case is entirely intentional: Given the generally poor state of SMTP server error code implementation it is felt that any step taken towards more comprehensible error codes is something that all clients, extended or not, should benefit from.
IMPORTANT NOTE: The use of this approach in this extension should be seen as a very special case. It MUST NOT be taken as a license for future SMTP extensions to dramatically change the nature of SMTP client-server interaction without proper announcement from the server and a corresponding enabling command from the client.
The following dialogue illustrates the use of enhanced status codes by a server:
S: <wait for connection on TCP port 25> C: <open connection to server> S: 220 dbc.mtview.ca.us SMTP service ready C: EHLO ymir.claremont.edu S: 250-dbc.mtview.ca.us says hello S: 250 ENHANCEDSTATUSCODES C: MAIL FROM:<email@example.com> S: 250 2.1.0 Originator <firstname.lastname@example.org> ok C: RCPT TO:<email@example.com> S: 250 2.1.5 Recipient <firstname.lastname@example.org> ok C: RCPT TO:<email@example.com> S: 550 5.1.1 Mailbox "nosuchuser" does not exist C: RCPT TO:<firstname.lastname@example.org> S: 551-5.7.1 Forwarding to remote hosts disabled S: 551 5.7.1 Select another host to act as your forwarder C: DATA S: 354 Send message, ending in CRLF.CRLF. ... C: . S: 250 2.6.0 Message accepted C: QUIT S: 221 2.0.0 Goodbye
The client that receives these responses might then send a nondelivery notification of the general form:
Date: Mon, 11 Mar 1996 09:21:47 -0400 From: Mail Delivery Subsystem <email@example.com> Subject: Returned mail To: <firstname.lastname@example.org> MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="JAA13167.773673707/YMIR.CLAREMONT.EDU" --JAA13167.773673707/YMIR.CLAREMONT.EDU content-type: text/plain; charset=us-ascii ----- Mail was successfully relayed to the following addresses ----- <email@example.com> ----- The following addresses had delivery problems ----- <firstname.lastname@example.org> (Mailbox "nosuchuser" does not exist) <email@example.com> (Forwarding to remote hosts disabled) --JAA13167.773673707/YMIR.CLAREMONT.EDU content-type: message/delivery-status Reporting-MTA: dns; ymir.claremont.edu Original-Recipient: rfc822;firstname.lastname@example.org Final-Recipient: rfc822;email@example.com Action: relayed Status: 2.1.5 (Destination address valid) Diagnostic-Code: smtp; 250 Recipient <firstname.lastname@example.org> ok Remote-MTA: dns; dbc.mtview.ca.us Original-Recipient: rfc822;email@example.com Final-Recipient: rfc822;firstname.lastname@example.org Action: failed Status: 5.1.1 (Bad destination mailbox address) Diagnostic-Code: smtp; 550 Mailbox "nosuchuser" does not exist Remote-MTA: dns; dbc.mtview.ca.us Original-Recipient: rfc822;email@example.com Final-Recipient: rfc822;firstname.lastname@example.org Action: failed Status: 5.7.1 (Delivery not authorized, message refused) Diagnostic-Code: smtp; 551 Forwarding to remote hosts disabled Select another host to act as your forwarder Remote-MTA: dns; dbc.mtview.ca.us --JAA13167.773673707/YMIR.CLAREMONT.EDU content-type: message/rfc822 [original message goes here] --JAA13167.773673707/YMIR.CLAREMONT.EDU--
Note that in order to reduce clutter the reporting MTA has omitted enhanced status code information from the diagnostic-code fields it has generated.
Additional detail in server responses axiomatically provides additional information about the server. It is conceivable that additional information of this sort may be of assistance in circumventing server security. The advantages of provides additional information must always be weighed against the security implications of doing so.
This RFC contained boilerplate in this section which has been moved to the RFC2223-compliant unnumbered section "References."
This RFC contained boilerplate in this section which has been moved to the RFC2223-compliant unnumbered section "Author's Address."
|Innosoft International, Inc.|
|1050 East Garvey Avenue South|
|Phone:||+1 818 919 3600 fax: +1 818 919 3614|
Copyright © The Internet Society (1996). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an “AS IS” basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP 11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification can be obtained from the IETF Secretariat.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director.