< draft-ietf-emailcore-rfc5321bis-02.txt   draft-ietf-emailcore-rfc5321bis-03.txt >
EMAILCORE J. Klensin EMAILCORE J. Klensin
Internet-Draft February 21, 2021 Internet-Draft July 10, 2021
Obsoletes: 5321, 1846, 7504 (if Obsoletes: 5321, 1846, 7504 (if
approved) approved)
Intended status: Standards Track Intended status: Standards Track
Expires: August 25, 2021 Expires: January 11, 2022
Simple Mail Transfer Protocol Simple Mail Transfer Protocol
draft-ietf-emailcore-rfc5321bis-02 draft-ietf-emailcore-rfc5321bis-03
Abstract Abstract
This document is a specification of the basic protocol for Internet This document is a specification of the basic protocol for Internet
electronic mail transport. It consolidates, updates, and clarifies electronic mail transport. It consolidates, updates, and clarifies
several previous documents, making all or parts of most of them several previous documents, making all or parts of most of them
obsolete. It covers the SMTP extension mechanisms and best practices obsolete. It covers the SMTP extension mechanisms and best practices
for the contemporary Internet, but does not provide details about for the contemporary Internet, but does not provide details about
particular extensions. Although SMTP was designed as a mail particular extensions. Although SMTP was designed as a mail
transport and delivery protocol, this specification also contains transport and delivery protocol, this specification also contains
information that is important to its use as a "mail submission" information that is important to its use as a "mail submission"
protocol for "split-UA" (User Agent) mail reading systems and mobile protocol for "split-UA" (User Agent) mail reading systems and mobile
environments. This document replaces the earlier version with the environments. This document replaces the earlier version with the
same title in RFC 5321. same title in RFC 5321.
[[CREF1: Note in Draft: Except for the last sentence, the above is [[CREF1: Note in Draft: Except for the last sentence, the above is
unchanged from 5321 and may need adjusting in the light of RFC 6409 unchanged from 5321 and may need adjusting in the light of RFC 6409
(Message Submission) as an Internet Standard.]] (Message Submission) as an Internet Standard.]]
Note on Reading This Working Draft Notes on Reading This Working Draft
This working draft is extensively annotated with information about This working draft is extensively annotated with information about
changes made over the decade since RFC 5321 appeared, especially when changes made over the decade since RFC 5321 appeared, especially when
those changes might be controversial or should get careful review. those changes might be controversial or should get careful review.
Anything marked in CREF comments with "[5321bis]" is current. In Anything marked in CREF comments with "[5321bis]" is current. In
general, unless those are marked with "[[Note in Draft", in the general, unless those are marked with "[[Note in Draft", in the
contents of an "Editor's note", or are in the "Errata Summary" contents of an "Editor's note", or are in the "Errata Summary"
appendix (Appendix H.1, they are just notes on changes that have appendix (Appendix H.1, they are just notes on changes that have
already been made and where those changes originated. Comments already been made and where those changes originated. As one can
identified as "2821ter" arose after the Last Call on what became tell from the dates (when they are given), this document has been
RFC5321, sometimes before AUTH48 on that document or a bit later. periodically updated over a very long period of time.
Those, of course, should still be reviewed. Surviving comments about
rfc5321bis-00 followed by a letter indicate intermediate working
versions of this draft and can be ignored unless the origin of
changes is important. As one can tell from the dates (when they are
given), this document has been periodically updated over a very long
period of time.
As people review or try to use this document, it may be worth paying As people review or try to use this document, it may be worth paying
special attention to the historical discussion in Section 1.2. The special attention to the historical discussion in Section 1.2. The
decision to merge documents rather than do a complete rewrite was decision to merge documents rather than do a complete rewrite was
motivated by weighing the risks of inadvertently introducing changes motivated by weighing the risks of inadvertently introducing changes
against greater readability and deciding to preserve close against greater readability and deciding to preserve close
approximations to original text and document structures in most approximations to original text and document structures in most
cases. One result is that information may not be be organized as the cases. One result is that information may not be be organized as the
reader might expect. An index is provided to assist in the quest for reader might expect. An index is provided to assist in the quest for
information. information.
This evolving draft should be discussed on the emailcore@ietf.org This evolving draft should be discussed on the emailcore@ietf.org
list. list.
Technology Note: The table of contents would be much easier to use,
especially for locating commands, if the subsections containing the
commands where listed. The source XML is marked up with
"toc=include" attributes to facilitate that. Unfortunately, there is
apparently a bug in the current version of xml2rfc v2, one that also
appeared in the version used ot generate RFC 5321, that prevents
those subsections from appearing in the TOC. The command names can
now be found in the index, but the index is to page numbers, not
section numbers. Both problems have been reported.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 25, 2021. This Internet-Draft will expire on January 11, 2022.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2021 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 12 skipping to change at page 3, line 12
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1. Transport of Electronic Mail . . . . . . . . . . . . . . 6 1.1. Transport of Electronic Mail . . . . . . . . . . . . . . 6
1.2. History and Context for This Document . . . . . . . . . . 7 1.2. History and Context for This Document . . . . . . . . . . 7
1.3. Document Conventions . . . . . . . . . . . . . . . . . . 8 1.3. Document Conventions . . . . . . . . . . . . . . . . . . 8
2. The SMTP Model . . . . . . . . . . . . . . . . . . . . . . . 8 2. The SMTP Model . . . . . . . . . . . . . . . . . . . . . . . 8
2.1. Basic Structure . . . . . . . . . . . . . . . . . . . . . 8 2.1. Basic Structure . . . . . . . . . . . . . . . . . . . . . 9
2.2. The Extension Model . . . . . . . . . . . . . . . . . . . 11 2.2. The Extension Model . . . . . . . . . . . . . . . . . . . 11
2.2.1. Background . . . . . . . . . . . . . . . . . . . . . 11 2.2.1. Background . . . . . . . . . . . . . . . . . . . . . 11
2.2.2. Definition and Registration of Extensions . . . . . . 12 2.2.2. Definition and Registration of Extensions . . . . . . 12
2.2.3. Special Issues with Extensions . . . . . . . . . . . 13 2.2.3. Special Issues with Extensions . . . . . . . . . . . 13
2.3. SMTP Terminology . . . . . . . . . . . . . . . . . . . . 13 2.3. SMTP Terminology . . . . . . . . . . . . . . . . . . . . 13
2.3.1. Mail Objects . . . . . . . . . . . . . . . . . . . . 13 2.3.1. Mail Objects . . . . . . . . . . . . . . . . . . . . 13
2.3.2. Senders and Receivers . . . . . . . . . . . . . . . . 14 2.3.2. Senders and Receivers . . . . . . . . . . . . . . . . 14
2.3.3. Mail Agents and Message Stores . . . . . . . . . . . 14 2.3.3. Mail Agents and Message Stores . . . . . . . . . . . 14
2.3.4. Host . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3.4. Host . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.5. Domain Names . . . . . . . . . . . . . . . . . . . . 14 2.3.5. Domain Names . . . . . . . . . . . . . . . . . . . . 15
2.3.6. Buffer and State Table . . . . . . . . . . . . . . . 16 2.3.6. Buffer and State Table . . . . . . . . . . . . . . . 16
2.3.7. Commands and Replies . . . . . . . . . . . . . . . . 16 2.3.7. Commands and Replies . . . . . . . . . . . . . . . . 16
2.3.8. Lines . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3.8. Lines . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3.9. Message Content and Mail Data . . . . . . . . . . . . 16 2.3.9. Message Content and Mail Data . . . . . . . . . . . . 16
2.3.10. Originator, Delivery, Relay, and Gateway Systems . . 17 2.3.10. Originator, Delivery, Relay, and Gateway Systems . . 17
2.3.11. Mailbox and Address . . . . . . . . . . . . . . . . . 17 2.3.11. Mailbox and Address . . . . . . . . . . . . . . . . . 17
2.4. General Syntax Principles and Transaction Model . . . . . 18 2.4. General Syntax Principles and Transaction Model . . . . . 18
3. The SMTP Procedures: An Overview . . . . . . . . . . . . . . 19 3. The SMTP Procedures: An Overview . . . . . . . . . . . . . . 19
3.1. Session Initiation . . . . . . . . . . . . . . . . . . . 20 3.1. Session Initiation . . . . . . . . . . . . . . . . . . . 20
3.2. Client Initiation . . . . . . . . . . . . . . . . . . . . 20 3.2. Client Initiation . . . . . . . . . . . . . . . . . . . . 20
3.3. Mail Transactions . . . . . . . . . . . . . . . . . . . . 21 3.3. Mail Transactions . . . . . . . . . . . . . . . . . . . . 21
3.4. Forwarding for Address Correction or Updating . . . . . . 23 3.4. Forwarding for Address Correction or Updating . . . . . . 24
3.5. Commands for Debugging Addresses . . . . . . . . . . . . 24 3.5. Commands for Debugging Addresses . . . . . . . . . . . . 24
3.5.1. Overview . . . . . . . . . . . . . . . . . . . . . . 24 3.5.1. Overview . . . . . . . . . . . . . . . . . . . . . . 25
3.5.2. VRFY Normal Response . . . . . . . . . . . . . . . . 27 3.5.2. VRFY Normal Response . . . . . . . . . . . . . . . . 27
3.5.3. Meaning of VRFY or EXPN Success Response . . . . . . 27 3.5.3. Meaning of VRFY or EXPN Success Response . . . . . . 27
3.5.4. Semantics and Applications of EXPN . . . . . . . . . 28 3.5.4. Semantics and Applications of EXPN . . . . . . . . . 28
3.6. Relaying and Mail Routing . . . . . . . . . . . . . . . . 28 3.6. Relaying and Mail Routing . . . . . . . . . . . . . . . . 28
3.6.1. Source Routes and Relaying . . . . . . . . . . . . . 28 3.6.1. Source Routes and Relaying . . . . . . . . . . . . . 28
3.6.2. Mail eXchange Records and Relaying . . . . . . . . . 29 3.6.2. Mail eXchange Records and Relaying . . . . . . . . . 29
3.6.3. Message Submission Servers as Relays . . . . . . . . 29 3.6.3. Message Submission Servers as Relays . . . . . . . . 29
3.7. Mail Gatewaying . . . . . . . . . . . . . . . . . . . . . 30 3.7. Mail Gatewaying . . . . . . . . . . . . . . . . . . . . . 30
3.7.1. Header Fields in Gatewaying . . . . . . . . . . . . . 30 3.7.1. Header Fields in Gatewaying . . . . . . . . . . . . . 31
3.7.2. Received Lines in Gatewaying . . . . . . . . . . . . 31 3.7.2. Received Lines in Gatewaying . . . . . . . . . . . . 31
3.7.3. Addresses in Gatewaying . . . . . . . . . . . . . . . 31 3.7.3. Addresses in Gatewaying . . . . . . . . . . . . . . . 31
3.7.4. Other Header Fields in Gatewaying . . . . . . . . . . 31 3.7.4. Other Header Fields in Gatewaying . . . . . . . . . . 32
3.7.5. Envelopes in Gatewaying . . . . . . . . . . . . . . . 32 3.7.5. Envelopes in Gatewaying . . . . . . . . . . . . . . . 32
3.8. Terminating Sessions and Connections . . . . . . . . . . 32 3.8. Terminating Sessions and Connections . . . . . . . . . . 32
3.9. Mailing Lists and Aliases . . . . . . . . . . . . . . . . 33 3.9. Mailing Lists and Aliases . . . . . . . . . . . . . . . . 33
3.9.1. Alias . . . . . . . . . . . . . . . . . . . . . . . . 33 3.9.1. Alias . . . . . . . . . . . . . . . . . . . . . . . . 34
3.9.2. List . . . . . . . . . . . . . . . . . . . . . . . . 34 3.9.2. List . . . . . . . . . . . . . . . . . . . . . . . . 34
4. The SMTP Specifications . . . . . . . . . . . . . . . . . . . 34 4. The SMTP Specifications . . . . . . . . . . . . . . . . . . . 34
4.1. SMTP Commands . . . . . . . . . . . . . . . . . . . . . . 34 4.1. SMTP Commands . . . . . . . . . . . . . . . . . . . . . . 34
4.1.1. Command Semantics and Syntax . . . . . . . . . . . . 34 4.1.1. Command Semantics and Syntax . . . . . . . . . . . . 34
4.1.2. Command Argument Syntax . . . . . . . . . . . . . . . 42 4.1.2. Command Argument Syntax . . . . . . . . . . . . . . . 43
4.1.3. Address Literals . . . . . . . . . . . . . . . . . . 45 4.1.3. Address Literals . . . . . . . . . . . . . . . . . . 45
4.1.4. Order of Commands . . . . . . . . . . . . . . . . . . 46 4.1.4. Order of Commands . . . . . . . . . . . . . . . . . . 46
4.1.5. Private-Use Commands . . . . . . . . . . . . . . . . 48 4.1.5. Private-Use Commands . . . . . . . . . . . . . . . . 48
4.2. SMTP Replies . . . . . . . . . . . . . . . . . . . . . . 48 4.2. SMTP Replies . . . . . . . . . . . . . . . . . . . . . . 48
4.2.1. Reply Code Severities and Theory . . . . . . . . . . 50 4.2.1. Reply Code Severities and Theory . . . . . . . . . . 50
4.2.2. Reply Codes by Function Groups . . . . . . . . . . . 52 4.2.2. Reply Codes by Function Groups . . . . . . . . . . . 53
4.2.3. Reply Codes in Numeric Order . . . . . . . . . . . . 54 4.2.3. Reply Codes in Numeric Order . . . . . . . . . . . . 54
4.2.4. Some specific code situations and relationships . . . 55 4.2.4. Some specific code situations and relationships . . . 56
4.3. Sequencing of Commands and Replies . . . . . . . . . . . 57 4.3. Sequencing of Commands and Replies . . . . . . . . . . . 57
4.3.1. Sequencing Overview . . . . . . . . . . . . . . . . . 57 4.3.1. Sequencing Overview . . . . . . . . . . . . . . . . . 57
4.3.2. Command-Reply Sequences . . . . . . . . . . . . . . . 58 4.3.2. Command-Reply Sequences . . . . . . . . . . . . . . . 58
4.4. Trace Information . . . . . . . . . . . . . . . . . . . . 60 4.4. Trace Information . . . . . . . . . . . . . . . . . . . . 60
4.5. Additional Implementation Issues . . . . . . . . . . . . 64 4.5. Additional Implementation Issues . . . . . . . . . . . . 64
4.5.1. Minimum Implementation . . . . . . . . . . . . . . . 64 4.5.1. Minimum Implementation . . . . . . . . . . . . . . . 64
4.5.2. Transparency . . . . . . . . . . . . . . . . . . . . 65 4.5.2. Transparency . . . . . . . . . . . . . . . . . . . . 65
4.5.3. Sizes and Timeouts . . . . . . . . . . . . . . . . . 65 4.5.3. Sizes and Timeouts . . . . . . . . . . . . . . . . . 66
4.5.4. Retry Strategies . . . . . . . . . . . . . . . . . . 69 4.5.4. Retry Strategies . . . . . . . . . . . . . . . . . . 70
4.5.5. Messages with a Null Reverse-Path . . . . . . . . . . 71 4.5.5. Messages with a Null Reverse-Path . . . . . . . . . . 72
5. Address Resolution and Mail Handling . . . . . . . . . . . . 72 5. Address Resolution and Mail Handling . . . . . . . . . . . . 72
5.1. Locating the Target Host . . . . . . . . . . . . . . . . 72 5.1. Locating the Target Host . . . . . . . . . . . . . . . . 72
5.2. IPv6 and MX Records . . . . . . . . . . . . . . . . . . . 74 5.2. IPv6 and MX Records . . . . . . . . . . . . . . . . . . . 75
6. Problem Detection and Handling . . . . . . . . . . . . . . . 75 6. Problem Detection and Handling . . . . . . . . . . . . . . . 75
6.1. Reliable Delivery and Replies by Email . . . . . . . . . 75 6.1. Reliable Delivery and Replies by Email . . . . . . . . . 75
6.2. Unwanted, Unsolicited, and "Attack" Messages . . . . . . 76 6.2. Unwanted, Unsolicited, and "Attack" Messages . . . . . . 76
6.3. Loop Detection . . . . . . . . . . . . . . . . . . . . . 77 6.3. Loop Detection . . . . . . . . . . . . . . . . . . . . . 77
6.4. Compensating for Irregularities . . . . . . . . . . . . . 77 6.4. Compensating for Irregularities . . . . . . . . . . . . . 77
7. Security Considerations . . . . . . . . . . . . . . . . . . . 78 7. Security Considerations . . . . . . . . . . . . . . . . . . . 78
7.1. Mail Security and Spoofing . . . . . . . . . . . . . . . 78 7.1. Mail Security and Spoofing . . . . . . . . . . . . . . . 79
7.2. "Blind" Copies . . . . . . . . . . . . . . . . . . . . . 79 7.2. "Blind" Copies . . . . . . . . . . . . . . . . . . . . . 80
7.3. VRFY, EXPN, and Security . . . . . . . . . . . . . . . . 80 7.3. VRFY, EXPN, and Security . . . . . . . . . . . . . . . . 80
7.4. Mail Rerouting Based on the 251 and 551 Response 7.4. Mail Rerouting Based on the 251 and 551 Response
Codes . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Codes . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.5. Information Disclosure in Announcements . . . . . . . . . 81 7.5. Information Disclosure in Announcements . . . . . . . . . 81
7.6. Information Disclosure in Trace Fields . . . . . . . . . 81 7.6. Information Disclosure in Trace Fields . . . . . . . . . 82
7.7. Information Disclosure in Message Forwarding . . . . . . 81 7.7. Information Disclosure in Message Forwarding . . . . . . 82
7.8. Resistance to Attacks . . . . . . . . . . . . . . . . . . 82 7.8. Local Operational Requirement and Resistance to Attacks . 82
7.9. Scope of Operation of SMTP Servers . . . . . . . . . . . 82 7.9. Scope of Operation of SMTP Servers . . . . . . . . . . . 82
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 82 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 83
9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 84 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 84
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 84 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 85
10.1. Normative References . . . . . . . . . . . . . . . . . . 84 10.1. Normative References . . . . . . . . . . . . . . . . . . 85
10.2. Informative References . . . . . . . . . . . . . . . . . 85 10.2. Informative References . . . . . . . . . . . . . . . . . 86
Appendix A. TCP Transport Service . . . . . . . . . . . . . . . 90 Appendix A. TCP Transport Service . . . . . . . . . . . . . . . 91
Appendix B. Generating SMTP Commands from RFC 822 Header Fields 90 Appendix B. Generating SMTP Commands from RFC 822 Header Fields 91
Appendix C. Source Routes . . . . . . . . . . . . . . . . . . . 91 Appendix C. Source Routes . . . . . . . . . . . . . . . . . . . 92
Appendix D. Scenarios . . . . . . . . . . . . . . . . . . . . . 92 Appendix D. Scenarios . . . . . . . . . . . . . . . . . . . . . 93
D.1. A Typical SMTP Transaction Scenario . . . . . . . . . . . 92 D.1. A Typical SMTP Transaction Scenario . . . . . . . . . . . 93
D.2. Aborted SMTP Transaction Scenario . . . . . . . . . . . . 93 D.2. Aborted SMTP Transaction Scenario . . . . . . . . . . . . 94
D.3. Relayed Mail Scenario . . . . . . . . . . . . . . . . . . 94 D.3. Relayed Mail Scenario . . . . . . . . . . . . . . . . . . 95
D.4. Verifying and Sending Scenario . . . . . . . . . . . . . 95 D.4. Verifying and Sending Scenario . . . . . . . . . . . . . 96
Appendix E. Other Gateway Issues . . . . . . . . . . . . . . . . 96 Appendix E. Other Gateway Issues . . . . . . . . . . . . . . . . 97
Appendix F. Deprecated Features of RFC 821 . . . . . . . . . . . 96 Appendix F. Deprecated Features of RFC 821 . . . . . . . . . . . 97
F.1. TURN . . . . . . . . . . . . . . . . . . . . . . . . . . 96 F.1. TURN . . . . . . . . . . . . . . . . . . . . . . . . . . 97
F.2. Source Routing . . . . . . . . . . . . . . . . . . . . . 96 F.2. Source Routing . . . . . . . . . . . . . . . . . . . . . 97
F.3. HELO . . . . . . . . . . . . . . . . . . . . . . . . . . 97 F.3. HELO . . . . . . . . . . . . . . . . . . . . . . . . . . 98
F.4. #-literals . . . . . . . . . . . . . . . . . . . . . . . 97 F.4. #-literals . . . . . . . . . . . . . . . . . . . . . . . 98
F.5. Dates and Years . . . . . . . . . . . . . . . . . . . . . 97 F.5. Dates and Years . . . . . . . . . . . . . . . . . . . . . 98
F.6. Sending versus Mailing . . . . . . . . . . . . . . . . . 97 F.6. Sending versus Mailing . . . . . . . . . . . . . . . . . 98
Appendix G. Other Outstanding Issues . . . . . . . . . . . . . . 98 Appendix G. Other Outstanding Issues . . . . . . . . . . . . . . 99
G.1. IP Address literals . . . . . . . . . . . . . . . . . . . 99 G.1. IP Address literals . . . . . . . . . . . . . . . . . . . 100
G.2. Repeated Use of EHLO . . . . . . . . . . . . . . . . . . 99 G.2. Repeated Use of EHLO . . . . . . . . . . . . . . . . . . 100
G.3. Meaning of "MTA" and Related Terminology . . . . . . . . 99 G.3. Meaning of "MTA" and Related Terminology . . . . . . . . 100
G.4. Originator, or Originating System, Authentication . . . . 100 G.4. Originator, or Originating System, Authentication . . . . 101
G.5. Remove or deprecate the work-around from code 552 to 452 100 G.5. Remove or deprecate the work-around from code 552 to 452 101
G.6. Clarify where the protocol stands with respect to G.6. Clarify where the protocol stands with respect to
submission and TLS issues . . . . . . . . . . . . . . . . 100 submission and TLS issues . . . . . . . . . . . . . . . . 101
G.7. Probably-substantive Discussion Topics Identified in G.7. Probably-substantive Discussion Topics Identified in
Other Ways . . . . . . . . . . . . . . . . . . . . . . . 100 Other Ways . . . . . . . . . . . . . . . . . . . . . . . 101
G.7.1. Issues with 521, 554, and 556 codes . . . . . . . . . 100 G.7.1. Issues with 521, 554, and 556 codes . . . . . . . . . 101
G.7.2. SMTP Model, terminology, and relationship to RFC 5598 101 G.7.2. SMTP Model, terminology, and relationship to RFC 5598 102
G.7.3. Resolvable FQDNs and private domain names . . . . . . 101 G.7.3. Resolvable FQDNs and private domain names . . . . . . 102
G.7.4. Possible clarification about mail transactions and G.7.4. Possible clarification about mail transactions and
transaction state . . . . . . . . . . . . . . . . . . 101 transaction state . . . . . . . . . . . . . . . . . . 102
G.7.5. Issues with mailing lists, aliases, and forwarding . 101 G.7.5. Issues with mailing lists, aliases, and forwarding . 102
G.7.6. Requirements for domain name and/or IP address in G.7.6. Requirements for domain name and/or IP address in
EHLO . . . . . . . . . . . . . . . . . . . . . . . . 101 EHLO . . . . . . . . . . . . . . . . . . . . . . . . 102
G.7.7. Does the 'first digit only' and/or non-listed reply G.7.7. Does the 'first digit only' and/or non-listed reply
code text need clarification? . . . . . . . . . . . . 101 code text need clarification? . . . . . . . . . . . . 102
G.7.8. Size limits . . . . . . . . . . . . . . . . . . . . . 101 G.7.8. Size limits . . . . . . . . . . . . . . . . . . . . . 103
G.7.9. Discussion of 'blind' copies and RCPT . . . . . . . . 102 G.7.9. Discussion of 'blind' copies and RCPT . . . . . . . . 103
G.7.10. Further clarifications needed to source routes? . . . 102 G.7.10. Further clarifications needed to source routes? . . . 103
G.7.11. Should 1yz Be Revisited? . . . . . . . . . . . . . . 102 G.7.11. Should 1yz Be Revisited? . . . . . . . . . . . . . . 103
G.7.12. Review Timeout Specifications . . . . . . . . . . . . 102 G.7.12. Review Timeout Specifications . . . . . . . . . . . . 103
G.7.13. Possible SEND, SAML, SOML Loose End . . . . . . . . . 102 G.7.13. Possible SEND, SAML, SOML Loose End . . . . . . . . . 104
G.8. Enhanced Reply Codes and DSNs . . . . . . . . . . . . . . 102 G.7.14. Abstract Update . . . . . . . . . . . . . . . . . . . 104
G.9. Revisiting Quoted Strings . . . . . . . . . . . . . . . . 103 G.7.15. Informative References to MIME and/or Message
G.10. Internationalization . . . . . . . . . . . . . . . . . . 103 Submission . . . . . . . . . . . . . . . . . . . . . 104
G.11. SMTP Clients, Servers, Senders, and Receivers . . . . . . 104 G.7.16. Mail Transaction Discussion . . . . . . . . . . . . . 104
G.12. Extension Keywords Starting in 'X-' . . . . . . . . . . . 104 G.7.17. Hop-by-hop Authentication and/or Encryption . . . . . 104
G.13. Deprecating HELO . . . . . . . . . . . . . . . . . . . . 104 G.7.18. More Text About 554 Given 521, etc. . . . . . . . . . 104
G.7.19. Minimum Lengths and Quantities . . . . . . . . . . . 104
G.8. Enhanced Reply Codes and DSNs . . . . . . . . . . . . . . 104
G.9. Revisiting Quoted Strings . . . . . . . . . . . . . . . . 105
G.10. Internationalization . . . . . . . . . . . . . . . . . . 105
G.11. SMTP Clients, Servers, Senders, and Receivers . . . . . . 106
G.12. Extension Keywords Starting in 'X-' . . . . . . . . . . . 106
G.13. Deprecating HELO . . . . . . . . . . . . . . . . . . . . 106
G.14. The FOR Clause in Trace Fields: Semantics, Security G.14. The FOR Clause in Trace Fields: Semantics, Security
Considerations, and Other Issues . . . . . . . . . . . . 105 Considerations, and Other Issues . . . . . . . . . . . . 107
Appendix H. RFC 5321 Errata Summary and Tentative Change Log . . 105 G.15. Resistance to Attacks and Operational Necessity . . . . . 107
H.1. RFC 5321 Errata Summary . . . . . . . . . . . . . . . . . 105 Appendix H. RFC 5321 Errata Summary and Tentative Change Log . . 107
H.1. RFC 5321 Errata Summary . . . . . . . . . . . . . . . . . 108
H.2. Changes from RFC 5321 (published October 2008) to the H.2. Changes from RFC 5321 (published October 2008) to the
initial (-00) version of this draft . . . . . . . . . . . 107 initial (-00) version of this draft . . . . . . . . . . . 109
H.3. Changes Among Versions of Rfc5321bis . . . . . . . . . . 108 H.3. Changes Among Versions of Rfc5321bis . . . . . . . . . . 111
H.3.1. Changes from draft-klensin-rfc5321bis-00 (posted H.3.1. Changes from draft-klensin-rfc5321bis-00 (posted
2012-12-02) to -01 . . . . . . . . . . . . . . . . . 108 2012-12-02) to -01 . . . . . . . . . . . . . . . . . 111
H.3.2. Changes from draft-klensin-rfc5321bis-01 (20191203) H.3.2. Changes from draft-klensin-rfc5321bis-01 (20191203)
to -02 . . . . . . . . . . . . . . . . . . . . . . . 108 to -02 . . . . . . . . . . . . . . . . . . . . . . . 111
H.3.3. Changes from draft-klensin-rfc5321bis-02 (2019-12-27) H.3.3. Changes from draft-klensin-rfc5321bis-02 (2019-12-27)
to -03 . . . . . . . . . . . . . . . . . . . . . . . 108 to -03 . . . . . . . . . . . . . . . . . . . . . . . 111
H.3.4. Changes from draft-klensin-rfc5321bis-03 (2020-07-02) H.3.4. Changes from draft-klensin-rfc5321bis-03 (2020-07-02)
to draft-ietf-emailcore-rfc5321bis-00 . . . . . . . . 109 to draft-ietf-emailcore-rfc5321bis-00 . . . . . . . . 112
H.3.5. Changes from draft-ietf-emailcore-rfc5321bis-00 H.3.5. Changes from draft-ietf-emailcore-rfc5321bis-00
(2020-10-06) to -01 . . . . . . . . . . . . . . . . . 109 (2020-10-06) to -01 . . . . . . . . . . . . . . . . . 112
H.3.6. Changes from draft-ietf-emailcore-rfc5321bis-01 H.3.6. Changes from draft-ietf-emailcore-rfc5321bis-01
(2020-12-25) to -02 . . . . . . . . . . . . . . . . . 110 (2020-12-25) to -02 . . . . . . . . . . . . . . . . . 112
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 H.3.7. Changes from draft-ietf-emailcore-rfc5321bis-02
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 112 (2021-02-21) to -03 . . . . . . . . . . . . . . . . . 113
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 116
1. Introduction 1. Introduction
1.1. Transport of Electronic Mail 1.1. Transport of Electronic Mail
The objective of the Simple Mail Transfer Protocol (SMTP) is to The objective of the Simple Mail Transfer Protocol (SMTP) is to
transfer mail reliably and efficiently. transfer mail reliably and efficiently.
SMTP is independent of the particular transmission subsystem and SMTP is independent of the particular transmission subsystem and
requires only a reliable ordered data stream channel. While this requires only a reliable ordered data stream channel. While this
skipping to change at page 6, line 50 skipping to change at page 7, line 12
hosts on the public Internet, the mutually-TCP-accessible hosts on a hosts on the public Internet, the mutually-TCP-accessible hosts on a
firewall-isolated TCP/IP Intranet, or hosts in some other LAN or WAN firewall-isolated TCP/IP Intranet, or hosts in some other LAN or WAN
environment utilizing a non-TCP transport-level protocol. Using environment utilizing a non-TCP transport-level protocol. Using
SMTP, a process can transfer mail to another process on the same SMTP, a process can transfer mail to another process on the same
network or to some other network via a relay or gateway process network or to some other network via a relay or gateway process
accessible to both networks. accessible to both networks.
In this way, a mail message may pass through a number of intermediate In this way, a mail message may pass through a number of intermediate
relay or gateway hosts on its path from sender to ultimate recipient. relay or gateway hosts on its path from sender to ultimate recipient.
The Mail eXchanger mechanisms of the domain name system (RFC 1035 The Mail eXchanger mechanisms of the domain name system (RFC 1035
[4], RFC 974 [15], and Section 5 of this document) are used to [4], RFC 974 [16], and Section 5 of this document) are used to
identify the appropriate next-hop destination for a message being identify the appropriate next-hop destination for a message being
transported. transported.
1.2. History and Context for This Document 1.2. History and Context for This Document
This document is a specification of the basic protocol for the This document is a specification of the basic protocol for the
Internet electronic mail transport. It consolidates, updates and Internet electronic mail transport. It consolidates, updates and
clarifies, but does not add new or change existing functionality of clarifies, but does not add new or change existing functionality of
the following: the following:
o the original SMTP (Simple Mail Transfer Protocol) specification of o the original SMTP (Simple Mail Transfer Protocol) specification of
RFC 821 [3], RFC 821 [3],
o domain name system requirements and implications for mail o domain name system requirements and implications for mail
transport from RFC 1035 [4] and RFC 974 [15], transport from RFC 1035 [4] and RFC 974 [16],
o the clarifications and applicability statements in RFC 1123 [5], o the clarifications and applicability statements in RFC 1123 [5],
o the new error codes added by RFC 1846 [19] and later by RFC 7504 o the new error codes added by RFC 1846 [20] and later by RFC 7504
[48], obsoleting both of those documents, and [48], obsoleting both of those documents, and
o material drawn from the SMTP Extension mechanisms in RFC 1869 o material drawn from the SMTP Extension mechanisms in RFC 1869
[21]. [22].
o Editorial and clarification changes to RFC 2821 [29] to bring that o Editorial and clarification changes to RFC 2821 [30] to bring that
specification to Draft Standard. specification to Draft Standard.
It obsoletes RFC 821, RFC 974, RFC 1869, and RFC 2821 and updates RFC It obsoletes RFC 821, RFC 974, RFC 1869, and RFC 2821 and updates RFC
1123 (replacing the mail transport materials of RFC 1123). However, 1123 (replacing the mail transport materials of RFC 1123). However,
RFC 821 specifies some features that were not in significant use in RFC 821 specifies some features that were not in significant use in
the Internet by the mid-1990s and (in appendices) some additional the Internet by the mid-1990s and (in appendices) some additional
transport models. Those sections are omitted here in the interest of transport models. Those sections are omitted here in the interest of
clarity and brevity; readers needing them should refer to RFC 821. clarity and brevity; readers needing them should refer to RFC 821.
It also includes some additional material from RFC 1123 that required It also includes some additional material from RFC 1123 that required
amplification. This material has been identified in multiple ways, amplification. This material has been identified in multiple ways,
mostly by tracking flaming on various lists and newsgroups and mostly by tracking flaming on various lists and newsgroups and
problems of unusual readings or interpretations that have appeared as problems of unusual readings or interpretations that have appeared as
the SMTP extensions have been deployed. Where this specification the SMTP extensions have been deployed. Where this specification
moves beyond consolidation and actually differs from earlier moves beyond consolidation and actually differs from earlier
documents, it supersedes them technically as well as textually. documents, it supersedes them technically as well as textually.
Although SMTP was designed as a mail transport and delivery protocol, Although SMTP was designed as a mail transport and delivery protocol,
this specification also contains information that is important to its this specification also contains information that is important to its
use as a "mail submission" protocol, as recommended for Post Office use as a "mail submission" protocol, as recommended for Post Office
Protocol (POP) (RFC 937 [13], RFC 1939 [22]) and IMAP (RFC 3501 Protocol (POP) (RFC 937 [14], RFC 1939 [23]) and IMAP (RFC 3501
[36]). In general, the separate mail submission protocol specified [36]). In general, the separate mail submission protocol specified
in RFC 6409 [42] is now preferred to direct use of SMTP; more in RFC 6409 [42] is now preferred to direct use of SMTP; more
discussion of that subject appears in that document. discussion of that subject appears in that document.
Section 2.3 provides definitions of terms specific to this document. Section 2.3 provides definitions of terms specific to this document.
Except when the historical terminology is necessary for clarity, this Except when the historical terminology is necessary for clarity, this
document uses the current 'client' and 'server' terminology to document uses the current 'client' and 'server' terminology to
identify the sending and receiving SMTP processes, respectively. identify the sending and receiving SMTP processes, respectively.
A companion document, RFC 5322 [11], discusses message header A companion document, RFC 5322 [12], discusses message header
sections and bodies and specifies formats and structures for them. sections and bodies and specifies formats and structures for them.
[[CREF2: [rfc5321bis 20210317] Would this be an appropriate place to
mention RFC 2045 (MIME) and/or RFC 6409 (Message Submission)?]]
1.3. Document Conventions 1.3. Document Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [1]. As each document are to be interpreted as described in RFC 2119 [1]. As each
of these terms was intentionally and carefully chosen to improve the of these terms was intentionally and carefully chosen to improve the
interoperability of email, each use of these terms is to be treated interoperability of email, each use of these terms is to be treated
as a conformance requirement. as a conformance requirement.
Because this document has a long history and to avoid the risk of Because this document has a long history and to avoid the risk of
various errors and of confusing readers and documents that point to various errors and of confusing readers and documents that point to
this one, most examples and the domain names they contain are this one, most examples and the domain names they contain are
preserved from RFC 2821. Readers are cautioned that these are preserved from RFC 2821. Readers are cautioned that these are
illustrative examples that should not actually be used in either code illustrative examples that should not actually be used in either code
or configuration files. or configuration files.
2. The SMTP Model 2. The SMTP Model
[[CREF2: [5321bis] [[Editor's Note: There have been extensive and [[CREF3: [5321bis] [[Editor's Note: There have been extensive and
repeated discussions on the SMTP and IETF lists about whether this repeated discussions on the SMTP and IETF lists about whether this
document should say something about hop-by-hop (MTA-to-MTA) SMTP document should say something about hop-by-hop (MTA-to-MTA) SMTP
authentication and, if so, what?? Note that end to end message authentication and, if so, what?? Note that end to end message
authentication is almost certainly out of scope for SMTP.]]]] authentication is almost certainly out of scope for SMTP.]]]]
2.1. Basic Structure 2.1. Basic Structure
The SMTP design can be pictured as: The SMTP design can be pictured as:
+----------+ +----------+ +----------+ +----------+
skipping to change at page 9, line 17 skipping to change at page 9, line 31
SMTP client is to transfer mail messages to one or more SMTP servers, SMTP client is to transfer mail messages to one or more SMTP servers,
or report its failure to do so. or report its failure to do so.
The means by which a mail message is presented to an SMTP client, and The means by which a mail message is presented to an SMTP client, and
how that client determines the identifier(s) ("names") of the how that client determines the identifier(s) ("names") of the
domain(s) to which mail messages are to be transferred, are local domain(s) to which mail messages are to be transferred, are local
matters. They are not addressed by this document. In some cases, matters. They are not addressed by this document. In some cases,
the designated domain(s), or those determined by an SMTP client, will the designated domain(s), or those determined by an SMTP client, will
identify the final destination(s) of the mail message. In other identify the final destination(s) of the mail message. In other
cases, common with SMTP clients associated with implementations of cases, common with SMTP clients associated with implementations of
the POP (RFC 937 [13], RFC 1939 [22]) or IMAP (RFC 3501 [36]) the POP (RFC 937 [14], RFC 1939 [23]) or IMAP (RFC 3501 [36])
protocols, or when the SMTP client is inside an isolated transport protocols, or when the SMTP client is inside an isolated transport
service environment, the domain determined will identify an service environment, the domain determined will identify an
intermediate destination through which all mail messages are to be intermediate destination through which all mail messages are to be
relayed. SMTP clients that transfer all traffic regardless of the relayed. SMTP clients that transfer all traffic regardless of the
target domains associated with the individual messages, or that do target domains associated with the individual messages, or that do
not maintain queues for retrying message transmissions that initially not maintain queues for retrying message transmissions that initially
cannot be completed, may otherwise conform to this specification but cannot be completed, may otherwise conform to this specification but
are not considered fully-capable. Fully-capable SMTP are not considered fully-capable. Fully-capable SMTP
implementations, including the relays used by these less capable implementations, including the relays used by these less capable
ones, and their destinations, are expected to support all of the ones, and their destinations, are expected to support all of the
skipping to change at page 10, line 28 skipping to change at page 10, line 42
copy of the data for all recipients at the same destination (or copy of the data for all recipients at the same destination (or
intermediate relay) host. intermediate relay) host.
The server responds to each command with a reply; replies may The server responds to each command with a reply; replies may
indicate that the command was accepted, that additional commands are indicate that the command was accepted, that additional commands are
expected, or that a temporary or permanent error condition exists. expected, or that a temporary or permanent error condition exists.
Commands specifying the sender or recipients may include server- Commands specifying the sender or recipients may include server-
permitted SMTP service extension requests, as discussed in permitted SMTP service extension requests, as discussed in
Section 2.2. The dialog is purposely lock-step, one-at-a-time, Section 2.2. The dialog is purposely lock-step, one-at-a-time,
although this can be modified by mutually agreed upon extension although this can be modified by mutually agreed upon extension
requests such as command pipelining (RFC 2920 [30]). requests such as command pipelining (RFC 2920 [31]).
Once a given mail message has been transmitted, the client may either Once a given mail message has been transmitted, the client may either
request that the connection be shut down or may initiate other mail request that the connection be shut down or may initiate other mail
transactions. In addition, an SMTP client may use a connection to an transactions. In addition, an SMTP client may use a connection to an
SMTP server for ancillary services such as verification of email SMTP server for ancillary services such as verification of email
addresses or retrieval of mailing list subscriber addresses. addresses or retrieval of mailing list subscriber addresses.
As suggested above, this protocol provides mechanisms for the As suggested above, this protocol provides mechanisms for the
transmission of mail. Historically, this transmission normally transmission of mail. Historically, this transmission normally
occurred directly from the sending user's host to the receiving occurred directly from the sending user's host to the receiving
skipping to change at page 10, line 50 skipping to change at page 11, line 16
service. When they are not connected to the same transport service, service. When they are not connected to the same transport service,
transmission occurs via one or more relay SMTP servers. A very transmission occurs via one or more relay SMTP servers. A very
common case in the Internet today involves submission of the original common case in the Internet today involves submission of the original
message to an intermediate, "message submission" server, which is message to an intermediate, "message submission" server, which is
similar to a relay but has some additional properties; such servers similar to a relay but has some additional properties; such servers
are discussed in Section 2.3.10 and at some length in RFC 6409 [42]. are discussed in Section 2.3.10 and at some length in RFC 6409 [42].
An intermediate host that acts as either an SMTP relay or as a An intermediate host that acts as either an SMTP relay or as a
gateway into some other transmission environment is usually selected gateway into some other transmission environment is usually selected
through the use of the domain name service (DNS) Mail eXchanger through the use of the domain name service (DNS) Mail eXchanger
mechanism. Explicit "source" routing (see Section 5 and Appendix C mechanism. Explicit "source" routing (see Section 5 and Appendix C
and Appendix F.2) SHOULD NOT be used. [[CREF3: [5321bis] JcK and Appendix F.2) SHOULD NOT be used.
20090123 - redundant sentence removed.]]
2.2. The Extension Model 2.2. The Extension Model
2.2.1. Background 2.2.1. Background
In an effort that started in 1990, approximately a decade after RFC In an effort that started in 1990, approximately a decade after RFC
821 was completed, the protocol was modified with a "service 821 was completed, the protocol was modified with a "service
extensions" model that permits the client and server to agree to extensions" model that permits the client and server to agree to
utilize shared functionality beyond the original SMTP requirements. utilize shared functionality beyond the original SMTP requirements.
The SMTP extension mechanism defines a means whereby an extended SMTP The SMTP extension mechanism defines a means whereby an extended SMTP
skipping to change at page 11, line 38 skipping to change at page 12, line 4
some services to be important that were not anticipated when the some services to be important that were not anticipated when the
protocol was first designed. If support for those services is to be protocol was first designed. If support for those services is to be
added, it must be done in a way that permits older implementations to added, it must be done in a way that permits older implementations to
continue working acceptably. The extension framework consists of: continue working acceptably. The extension framework consists of:
o The SMTP command EHLO, superseding the earlier HELO, o The SMTP command EHLO, superseding the earlier HELO,
o a registry of SMTP service extensions, o a registry of SMTP service extensions,
o additional parameters to the SMTP MAIL and RCPT commands, and o additional parameters to the SMTP MAIL and RCPT commands, and
o optional replacements for commands defined in this protocol, such o optional replacements for commands defined in this protocol, such
as for DATA in non-ASCII transmissions (RFC 3030 [32]). as for DATA in non-ASCII transmissions (RFC 3030 [33]).
SMTP's strength comes primarily from its simplicity. Experience with SMTP's strength comes primarily from its simplicity. Experience with
many protocols has shown that protocols with few options tend towards many protocols has shown that protocols with few options tend towards
ubiquity, whereas protocols with many options tend towards obscurity. ubiquity, whereas protocols with many options tend towards obscurity.
Each and every extension, regardless of its benefits, must be Each and every extension, regardless of its benefits, must be
carefully scrutinized with respect to its implementation, deployment, carefully scrutinized with respect to its implementation, deployment,
and interoperability costs. In many cases, the cost of extending the and interoperability costs. In many cases, the cost of extending the
SMTP service will likely outweigh the benefit. SMTP service will likely outweigh the benefit.
2.2.2. Definition and Registration of Extensions 2.2.2. Definition and Registration of Extensions
The IANA maintains a registry of SMTP service extensions. A The IANA maintains a registry of SMTP service extensions [53]. A
corresponding EHLO keyword value is associated with each extension. corresponding EHLO keyword value is associated with each extension.
Each service extension registered with the IANA must be defined in a Each service extension registered with the IANA must be defined in a
formal Standards-Track or IESG-approved Experimental protocol formal Standards-Track or IESG-approved Experimental protocol
document. The definition must include: document. The definition must include:
o the textual name of the SMTP service extension; o the textual name of the SMTP service extension;
o the EHLO keyword value associated with the extension; o the EHLO keyword value associated with the extension;
o the syntax and possible values of parameters associated with the o the syntax and possible values of parameters associated with the
skipping to change at page 13, line 46 skipping to change at page 14, line 5
variations on the reverse-path (originator) address specification variations on the reverse-path (originator) address specification
command (MAIL) could be used to specify alternate delivery modes, command (MAIL) could be used to specify alternate delivery modes,
such as immediate display; those variations have now been deprecated such as immediate display; those variations have now been deprecated
(see Appendix F and Appendix F.6). (see Appendix F and Appendix F.6).
The SMTP content is sent in the SMTP DATA protocol unit and has two The SMTP content is sent in the SMTP DATA protocol unit and has two
parts: the header section and the body. If the content conforms to parts: the header section and the body. If the content conforms to
other contemporary standards, the header section consists of a other contemporary standards, the header section consists of a
collection of header fields, each consisting of a header name, a collection of header fields, each consisting of a header name, a
colon, and data, structured as in the message format specification colon, and data, structured as in the message format specification
(RFC 5322 [11]); the body, if structured, is defined according to (RFC 5322 [12]); the body, if structured, is defined according to
MIME (RFC 2045 [24]). The content is textual in nature, expressed MIME (RFC 2045 [25]). The content is textual in nature, expressed
using the US-ASCII repertoire [2]. Although SMTP extensions (such as using the US-ASCII repertoire [2]. Although SMTP extensions (such as
"8BITMIME", RFC 6152 [47]) may relax this restriction for the content "8BITMIME", RFC 6152 [47]) may relax this restriction for the content
body, the content header fields are always encoded using the US-ASCII body, the content header fields are always encoded using the US-ASCII
repertoire. Two MIME extensions (RFC 2047 [25] and RFC 2231 [28]) repertoire. Two MIME extensions (RFC 2047 [26] and RFC 2231 [29])
define an algorithm for representing header values outside the US- define an algorithm for representing header values outside the US-
ASCII repertoire, while still encoding them using the US-ASCII ASCII repertoire, while still encoding them using the US-ASCII
repertoire. repertoire.
2.3.2. Senders and Receivers 2.3.2. Senders and Receivers
In RFC 821, the two hosts participating in an SMTP transaction were In RFC 821, the two hosts participating in an SMTP transaction were
described as the "SMTP-sender" and "SMTP-receiver". This document described as the "SMTP-sender" and "SMTP-receiver". This document
has been changed to reflect current industry terminology and hence has been changed to reflect current industry terminology and hence
refers to them as the "SMTP client" (or sometimes just "the client") refers to them as the "SMTP client" (or sometimes just "the client")
skipping to change at page 15, line 22 skipping to change at page 15, line 30
of a CNAME RR) or the label of Mail eXchanger records to be used to of a CNAME RR) or the label of Mail eXchanger records to be used to
deliver mail instead of representing a host name. See RFC 1035 [4] deliver mail instead of representing a host name. See RFC 1035 [4]
and Section 5 of this specification. and Section 5 of this specification.
The domain name, as described in this document and in RFC 1035 [4], The domain name, as described in this document and in RFC 1035 [4],
is the entire, fully-qualified name (often referred to as an "FQDN"). is the entire, fully-qualified name (often referred to as an "FQDN").
A domain name that is not in FQDN form is no more than a local alias. A domain name that is not in FQDN form is no more than a local alias.
Local aliases MUST NOT appear in any SMTP transaction. Local aliases MUST NOT appear in any SMTP transaction.
Only resolvable, fully-qualified domain names (FQDNs) are permitted Only resolvable, fully-qualified domain names (FQDNs) are permitted
when domain names are used in SMTP. when domain names are used in SMTP. In other words, names that can
[[CREF4: [[5321bis Editor's Note: does "in the public DNS" or be resolved to MX RRs or address (i.e., A or AAAA) RRs (as discussed
equivalent need to be added to "resolvable"???]]]] in Section 5) are permitted, as are CNAME RRs whose targets can be
In other words, names that can be resolved to MX RRs or address resolved, in turn, to MX or address RRs.
(i.e., A or AAAA) RRs (as discussed in Section 5) are permitted, as [[CREF4: [[5321bis Editor's Note: it is not clear whether "In other
are CNAME RRs whose targets can be resolved, in turn, to MX or
address RRs.
[[CREF5: [[5321bis Editor's Note: it is not clear whether "In other
words" really meant "for example" or it is was intended that the only words" really meant "for example" or it is was intended that the only
labels permitted are those that own records in one of the above RR labels permitted are those that own records in one of the above RR
types]]]] types]]]]
[[CREF6: [[5321bis Editor's Note: More generally, does this section
need work to clarify the relationship to private domain names
(discussed on SMTP list starting 2013-03-26)]]]]
Local nicknames or unqualified names MUST NOT be used. There are two Local nicknames or unqualified names MUST NOT be used. There are two
exceptions to the rule requiring FQDNs: exceptions to the rule requiring FQDNs:
o The domain name given in the EHLO command MUST be either a primary o The domain name given in the EHLO command MUST be either a primary
host name (a domain name that resolves to an address RR) or, if host name (a domain name that resolves to an address RR) or, if
the host has no name, an address literal, as described in the host has no name, an address literal, as described in
Section 4.1.3 and discussed further in the EHLO discussion of Section 4.1.3 and discussed further in the EHLO discussion of
Section 4.1.4. Section 4.1.4.
o The reserved mailbox name "postmaster" may be used in a RCPT o The reserved mailbox name "postmaster" may be used in a RCPT
skipping to change at page 16, line 25 skipping to change at page 16, line 25
SMTP commands and, unless altered by a service extension, message SMTP commands and, unless altered by a service extension, message
data, are transmitted from the sender to the receiver via the data, are transmitted from the sender to the receiver via the
transmission channel in "lines". transmission channel in "lines".
An SMTP reply is an acknowledgment (positive or negative) sent in An SMTP reply is an acknowledgment (positive or negative) sent in
"lines" from receiver to sender via the transmission channel in "lines" from receiver to sender via the transmission channel in
response to a command. The general form of a reply is a numeric response to a command. The general form of a reply is a numeric
completion code (indicating failure or success) usually followed by a completion code (indicating failure or success) usually followed by a
text string. The codes are for use by programs and the text is text string. The codes are for use by programs and the text is
usually intended for human users. RFC 3463 [34], specifies further usually intended for human users. RFC 3463 [7], specifies further
structuring of the reply strings, including the use of supplemental structuring of the reply strings, including the use of supplemental
and more specific completion codes (see also RFC 5248 [46]). and more specific completion codes (see also RFC 5248 [46]).
2.3.8. Lines 2.3.8. Lines
Lines consist of zero or more data characters terminated by the Lines consist of zero or more data characters terminated by the
sequence ASCII character "CR" (hex value 0D) followed immediately by sequence ASCII character "CR" (hex value 0D) followed immediately by
ASCII character "LF" (hex value 0A). This termination sequence is ASCII character "LF" (hex value 0A). This termination sequence is
denoted as <CRLF> in this document. Conforming implementations MUST denoted as <CRLF> in this document. Conforming implementations MUST
NOT recognize or generate any other character or character sequence NOT recognize or generate any other character or character sequence
skipping to change at page 17, line 6 skipping to change at page 17, line 6
sequence. sequence.
2.3.9. Message Content and Mail Data 2.3.9. Message Content and Mail Data
The terms "message content" and "mail data" are used interchangeably The terms "message content" and "mail data" are used interchangeably
in this document to describe the material transmitted after the DATA in this document to describe the material transmitted after the DATA
command is accepted and before the end of data indication is command is accepted and before the end of data indication is
transmitted. Message content includes the message header section and transmitted. Message content includes the message header section and
the possibly structured message body. In the absence of extensions, the possibly structured message body. In the absence of extensions,
both are required to be ASCII (see Section 2.3.1). The MIME both are required to be ASCII (see Section 2.3.1). The MIME
specification (RFC 2045 [24]) provides the standard mechanisms for specification (RFC 2045 [25]) provides the standard mechanisms for
structured message bodies. structured message bodies.
2.3.10. Originator, Delivery, Relay, and Gateway Systems 2.3.10. Originator, Delivery, Relay, and Gateway Systems
This specification makes a distinction among four types of SMTP This specification makes a distinction among four types of SMTP
systems, based on the role those systems play in transmitting systems, based on the role those systems play in transmitting
electronic mail. An "originating" system (sometimes called an SMTP electronic mail. An "originating" system (sometimes called an SMTP
originator) introduces mail into the Internet or, more generally, originator) introduces mail into the Internet or, more generally,
into a transport service environment. A "delivery" SMTP system is into a transport service environment. A "delivery" SMTP system is
one that receives mail from a transport service environment and one that receives mail from a transport service environment and
skipping to change at page 17, line 32 skipping to change at page 17, line 32
further relaying or for delivery. further relaying or for delivery.
A "gateway" SMTP system (usually referred to just as a "gateway") A "gateway" SMTP system (usually referred to just as a "gateway")
receives mail from a client system in one transport environment and receives mail from a client system in one transport environment and
transmits it to a server system in another transport environment. transmits it to a server system in another transport environment.
Differences in protocols or message semantics between the transport Differences in protocols or message semantics between the transport
environments on either side of a gateway may require that the gateway environments on either side of a gateway may require that the gateway
system perform transformations to the message that are not permitted system perform transformations to the message that are not permitted
to SMTP relay systems. For the purposes of this specification, to SMTP relay systems. For the purposes of this specification,
firewalls that rewrite addresses should be considered as gateways, firewalls that rewrite addresses should be considered as gateways,
even if SMTP is used on both sides of them (see RFC 2979 [31]). even if SMTP is used on both sides of them (see RFC 2979 [32]).
[[CREF7: [5321bis] [[Note in draft/Placeholder: There has been a [[CREF5: [5321bis] [[Note in draft/Placeholder: There has been a
request to expand this section, possibly into a more extensive model request to expand this section, possibly into a more extensive model
of Internet mail. Comments from others solicited. In particular, of Internet mail. Comments from others solicited. In particular,
does RFC 5598 make that suggestion OBE?]] ]] does RFC 5598 make that suggestion OBE?]] ]]
2.3.11. Mailbox and Address 2.3.11. Mailbox and Address
As used in this specification, an "address" is a character string As used in this specification, an "address" is a character string
that identifies a user to whom mail will be sent or a location into that identifies a user to whom mail will be sent or a location into
which mail will be deposited. The term "mailbox" refers to that which mail will be deposited. The term "mailbox" refers to that
depository. The two terms are typically used interchangeably unless depository. The two terms are typically used interchangeably unless
skipping to change at page 19, line 34 skipping to change at page 19, line 34
servers. However, it MUST NOT be construed as authorization to servers. However, it MUST NOT be construed as authorization to
transmit unrestricted 8-bit material, nor does 8BITMIME authorize transmit unrestricted 8-bit material, nor does 8BITMIME authorize
transmission of any envelope material in other than ASCII. 8BITMIME transmission of any envelope material in other than ASCII. 8BITMIME
MUST NOT be requested by senders for material with the high bit on MUST NOT be requested by senders for material with the high bit on
that is not in MIME format with an appropriate content-transfer that is not in MIME format with an appropriate content-transfer
encoding; servers MAY reject such messages. encoding; servers MAY reject such messages.
The metalinguistic notation used in this document corresponds to the The metalinguistic notation used in this document corresponds to the
"Augmented BNF" used in other Internet mail system documents. The "Augmented BNF" used in other Internet mail system documents. The
reader who is not familiar with that syntax should consult the ABNF reader who is not familiar with that syntax should consult the ABNF
specification in RFC 5234 [10]. Metalanguage terms used in running specification in RFC 5234 [11]. Metalanguage terms used in running
text are surrounded by pointed brackets (e.g., <CRLF>) for clarity. text are surrounded by pointed brackets (e.g., <CRLF>) for clarity.
The reader is cautioned that the grammar expressed in the The reader is cautioned that the grammar expressed in the
metalanguage is not comprehensive. There are many instances in which metalanguage is not comprehensive. There are many instances in which
provisions in the text constrain or otherwise modify the syntax or provisions in the text constrain or otherwise modify the syntax or
semantics implied by the grammar. semantics implied by the grammar.
3. The SMTP Procedures: An Overview 3. The SMTP Procedures: An Overview
This section contains descriptions of the procedures used in SMTP: This section contains descriptions of the procedures used in SMTP:
session initiation, mail transaction, forwarding mail, verifying session initiation, mail transaction, forwarding mail, verifying
skipping to change at page 21, line 13 skipping to change at page 21, line 13
in the case of EHLO, "and I support service extension requests"). in the case of EHLO, "and I support service extension requests").
3.3. Mail Transactions 3.3. Mail Transactions
There are three steps to SMTP mail transactions. The transaction There are three steps to SMTP mail transactions. The transaction
starts with a MAIL command that gives the sender identification. (In starts with a MAIL command that gives the sender identification. (In
general, the MAIL command may be sent only when no mail transaction general, the MAIL command may be sent only when no mail transaction
is in progress; see Section 4.1.4.) A series of one or more RCPT is in progress; see Section 4.1.4.) A series of one or more RCPT
commands follows, giving the receiver information. Then, a DATA commands follows, giving the receiver information. Then, a DATA
command initiates transfer of the mail data and is terminated by the command initiates transfer of the mail data and is terminated by the
"end of mail" data indicator, which also confirms the transaction. "end of mail" data indicator, which also confirms (and terminates)
the transaction.
Mail transactions are also terminated by the RSET command Mail transactions are also terminated by the RSET command
(Section 4.1.1.5), the sending of an EHLO command (Section 3.2), or (Section 4.1.1.5), the sending of an EHLO command (Section 3.2), or
the sending of a QUIT command (Section 3.8) which terminates both any the sending of a QUIT command (Section 3.8) which terminates both any
active mail transaction and the SMTP connection. active mail transaction and the SMTP connection.
The first step in the procedure is the MAIL command. The first step in the procedure is the MAIL command.
MAIL FROM:<reverse-path> [SP <mail-parameters> ] <CRLF> MAIL FROM:<reverse-path> [SP <mail-parameters> ] <CRLF>
skipping to change at page 22, line 29 skipping to change at page 22, line 31
routes in the forward-path, but they SHOULD ignore the routes or MAY routes in the forward-path, but they SHOULD ignore the routes or MAY
decline to support the relaying they imply. Similarly, servers MAY decline to support the relaying they imply. Similarly, servers MAY
decline to accept mail that is destined for other hosts or systems. decline to accept mail that is destined for other hosts or systems.
These restrictions make a server useless as a relay for clients that These restrictions make a server useless as a relay for clients that
do not support full SMTP functionality. Consequently, restricted- do not support full SMTP functionality. Consequently, restricted-
capability clients MUST NOT assume that any SMTP server on the capability clients MUST NOT assume that any SMTP server on the
Internet can be used as their mail processing (relaying) site. If a Internet can be used as their mail processing (relaying) site. If a
RCPT command appears without a previous MAIL command, the server MUST RCPT command appears without a previous MAIL command, the server MUST
return a 503 "Bad sequence of commands" response. The optional return a 503 "Bad sequence of commands" response. The optional
<rcpt-parameters> are associated with negotiated SMTP service <rcpt-parameters> are associated with negotiated SMTP service
extensions (see Section 2.2). [[CREF8: [5321bis] JcK Note for extensions (see Section 2.2). [[CREF6: [5321bis]: this section would
2821ter (5321bis): this section would be improved by being more be improved by being more specific about where mail transactions
specific about where mail transactions begin and end and then talking begin and end and then talking about "transaction state" here, rather
about "transaction state" here, rather than specific prior commands. than specific prior commands. --JcK]]
--JcK]]
Since it has been a common source of errors, it is worth noting that Since it has been a common source of errors, it is worth noting that
spaces are not permitted on either side of the colon following FROM spaces are not permitted on either side of the colon following FROM
in the MAIL command or TO in the RCPT command. The syntax is exactly in the MAIL command or TO in the RCPT command. The syntax is exactly
as given above. as given above.
The third step in the procedure is the DATA command (or some The third step in the procedure is the DATA command (or some
alternative specified in a service extension). alternative specified in a service extension).
DATA <CRLF> DATA <CRLF>
skipping to change at page 23, line 36 skipping to change at page 23, line 39
other reasons. other reasons.
However, in practice, some servers do not perform recipient However, in practice, some servers do not perform recipient
verification until after the message text is received. These servers verification until after the message text is received. These servers
SHOULD treat a failure for one or more recipients as a "subsequent SHOULD treat a failure for one or more recipients as a "subsequent
failure" and return a mail message as discussed in Section 6 and, in failure" and return a mail message as discussed in Section 6 and, in
particular, in Section 6.1. Using a "550 mailbox not found" (or particular, in Section 6.1. Using a "550 mailbox not found" (or
equivalent) reply code after the data are accepted makes it difficult equivalent) reply code after the data are accepted makes it difficult
or impossible for the client to determine which recipients failed. or impossible for the client to determine which recipients failed.
When the RFC 822 format ([12], [11]) is being used, the mail data When the RFC 822 format ([13], [12]) is being used, the mail data
include the header fields such as those named Date, Subject, To, Cc, include the header fields such as those named Date, Subject, To, Cc,
and From. Server SMTP systems SHOULD NOT reject messages based on and From. Server SMTP systems SHOULD NOT reject messages based on
perceived defects in the RFC 822 or MIME (RFC 2045 [24]) message perceived defects in the RFC 822 or MIME (RFC 2045 [25]) message
header section or message body. In particular, they MUST NOT reject header section or message body. In particular, they MUST NOT reject
messages in which the numbers of Resent-header fields do not match or messages in which the numbers of Resent-header fields do not match or
Resent-to appears without Resent-from and/or Resent-date. Resent-to appears without Resent-from and/or Resent-date.
Mail transaction commands MUST be used in the order discussed above. Mail transaction commands MUST be used in the order discussed above.
3.4. Forwarding for Address Correction or Updating 3.4. Forwarding for Address Correction or Updating
Forwarding support is most often required to consolidate and simplify Forwarding support is most often required to consolidate and simplify
addresses within, or relative to, some enterprise and less frequently addresses within, or relative to, some enterprise and less frequently
skipping to change at page 25, line 36 skipping to change at page 25, line 45
553-Ambiguous; Possibilities 553-Ambiguous; Possibilities
553- <jsmith@foo.com> 553- <jsmith@foo.com>
553- <hsmith@foo.com> 553- <hsmith@foo.com>
553 <dweep@foo.com> 553 <dweep@foo.com>
Under normal circumstances, a client receiving a 553 reply would be Under normal circumstances, a client receiving a 553 reply would be
expected to expose the result to the user. Use of exactly the forms expected to expose the result to the user. Use of exactly the forms
given, and the "user ambiguous" or "ambiguous" keywords, possibly given, and the "user ambiguous" or "ambiguous" keywords, possibly
supplemented by extended reply codes, such as those described in RFC supplemented by extended reply codes, such as those described in RFC
3463 [34], will facilitate automated translation into other languages 3463 [7], will facilitate automated translation into other languages
as needed. Of course, a client that was highly automated or that was as needed. Of course, a client that was highly automated or that was
operating in another language than English might choose to try to operating in another language than English might choose to try to
translate the response to return some other indication to the user translate the response to return some other indication to the user
than the literal text of the reply, or to take some automated action than the literal text of the reply, or to take some automated action
such as consulting a directory service for additional information such as consulting a directory service for additional information
before reporting to the user. before reporting to the user.
For the EXPN command, the string identifies a mailing list, and the For the EXPN command, the string identifies a mailing list, and the
successful (i.e., 250) multiline response MAY include the full name successful (i.e., 250) multiline response MAY include the full name
of the users and MUST give the mailboxes on the mailing list. of the users and MUST give the mailboxes on the mailing list.
skipping to change at page 28, line 29 skipping to change at page 28, line 34
records), for mailboxes (various types of local host aliases), and in records), for mailboxes (various types of local host aliases), and in
various proxying arrangements has made it nearly impossible for these various proxying arrangements has made it nearly impossible for these
strategies to work consistently, and mail systems SHOULD NOT attempt strategies to work consistently, and mail systems SHOULD NOT attempt
them. them.
3.6. Relaying and Mail Routing 3.6. Relaying and Mail Routing
3.6.1. Source Routes and Relaying 3.6.1. Source Routes and Relaying
In general, the availability of Mail eXchanger records in the domain In general, the availability of Mail eXchanger records in the domain
name system (RFC 1035 [4], RFC 974 [15]) makes the use of explicit name system (RFC 1035 [4], RFC 974 [16]) makes the use of explicit
source routes in the Internet mail system unnecessary. Many source routes in the Internet mail system unnecessary. Many
historical problems with the interpretation of explicit source routes historical problems with the interpretation of explicit source routes
have made their use undesirable. SMTP clients SHOULD NOT generate have made their use undesirable. SMTP clients SHOULD NOT generate
explicit source routes except under unusual circumstances. SMTP explicit source routes except under unusual circumstances. SMTP
servers MAY decline to act as mail relays or to accept addresses that servers MAY decline to act as mail relays or to accept addresses that
specify source routes. When route information is encountered, SMTP specify source routes. When route information is encountered, SMTP
servers MAY ignore the route information and simply send to the final servers MAY ignore the route information and simply send to the final
destination specified as the last element in the route and SHOULD do destination specified as the last element in the route and SHOULD do
so. There has been an invalid practice of using names that do not so. There has been an invalid practice of using names that do not
appear in the DNS as destination names, with the senders counting on appear in the DNS as destination names, with the senders counting on
the intermediate hosts specified in source routing to resolve any the intermediate hosts specified in source routing to resolve any
problems. If source routes are stripped, this practice will cause problems. If source routes are stripped, this practice will cause
failures. This is one of several reasons why SMTP clients MUST NOT failures. This is one of several reasons why SMTP clients MUST NOT
generate invalid source routes or depend on serial resolution of generate invalid source routes or depend on serial resolution of
names in such routes. [[CREF9: [5321bis] Jck 20091023: "of names..." names in such routes.
added for clarity"]]
When source routes are not used, the process described in RFC 821 for When source routes are not used, the process described in RFC 821 for
constructing a reverse-path from the forward-path is not applicable constructing a reverse-path from the forward-path is not applicable
and the reverse-path at the time of delivery will simply be the and the reverse-path at the time of delivery will simply be the
address that appeared in the MAIL command. address that appeared in the MAIL command.
3.6.2. Mail eXchange Records and Relaying 3.6.2. Mail eXchange Records and Relaying
A relay SMTP server is usually the target of a DNS MX record that A relay SMTP server is usually the target of a DNS MX record that
designates it, rather than the final delivery system. The relay designates it, rather than the final delivery system. The relay
server may accept or reject the task of relaying the mail in the same server may accept or reject the task of relaying the mail in the same
way it accepts or rejects mail for a local user. If it accepts the way it accepts or rejects mail for a local user. If it accepts the
task, it then becomes an SMTP client, establishes a transmission task, it then becomes an SMTP client, establishes a transmission
channel to the next SMTP server specified in the DNS (according to channel to the next SMTP server specified in the DNS (according to
the rules in Section 5), and sends it the mail. If it declines to the rules in Section 5), and sends it the mail. If it declines to
relay mail to a particular address for policy reasons, a 550 response relay mail to a particular address for policy reasons, a 550 response
SHOULD be returned. SHOULD be returned.
[[CREF7: Proposed replacement for next paragraph (D Crocker
2021-03-17 17:23 email), Cf. Ticket #30: This specification does not
deal with the verification of a return path. Server efforts to
verify a return path are outside the scope of this specification.]]
This specification does not deal with the verification of return This specification does not deal with the verification of return
paths for use in delivery notifications. Recent work, such as that paths for use in delivery notifications. Recent work, such as that
on SPF [41] and DKIM [43] [44], has been done to provide ways to on SPF [41] and DKIM [43] [44], has been done to provide ways to
ascertain that an address is valid or belongs to the person who ascertain that an address is valid or belongs to the person who
actually sent the message. actually sent the message. A server MAY attempt to verify the return
path before using its address for delivery notifications, but methods
of doing so are not defined here nor is any particular method
recommended at this time.
[[5321bis Editor's Note: Proposed erratum (4055) suggests that DKIM [[5321bis Editor's Note: Proposed erratum (4055) suggests that DKIM
and SPF have nothing to do with this and that everything after the and SPF have nothing to do with this and that everything after the
first sentence should be dropped. An alternative would be to tune first sentence in the paragraph above should be dropped. An
the texts. ???]] alternative would be to tune the texts. ???]]
A server MAY attempt to verify the return path before using its
address for delivery notifications, but methods of doing so are not
defined here nor is any particular method recommended at this time.
3.6.3. Message Submission Servers as Relays 3.6.3. Message Submission Servers as Relays
Many mail-sending clients exist, especially in conjunction with Many mail-sending clients exist, especially in conjunction with
facilities that receive mail via POP3 or IMAP, that have limited facilities that receive mail via POP3 or IMAP, that have limited
capability to support some of the requirements of this specification, capability to support some of the requirements of this specification,
such as the ability to queue messages for subsequent delivery such as the ability to queue messages for subsequent delivery
attempts. For these clients, it is common practice to make private attempts. For these clients, it is common practice to make private
arrangements to send all messages to a single server for processing arrangements to send all messages to a single server for processing
and subsequent distribution. SMTP, as specified here, is not ideally and subsequent distribution. SMTP, as specified here, is not ideally
skipping to change at page 30, line 6 skipping to change at page 30, line 15
It is important to note that MX records can point to SMTP servers It is important to note that MX records can point to SMTP servers
that act as gateways into other environments, not just SMTP relays that act as gateways into other environments, not just SMTP relays
and final delivery systems; see Sections 3.7 and 5. and final delivery systems; see Sections 3.7 and 5.
If an SMTP server has accepted the task of relaying the mail and If an SMTP server has accepted the task of relaying the mail and
later finds that the destination is incorrect or that the mail cannot later finds that the destination is incorrect or that the mail cannot
be delivered for some other reason, then it MUST construct an be delivered for some other reason, then it MUST construct an
"undeliverable mail" notification message and send it to the "undeliverable mail" notification message and send it to the
originator of the undeliverable mail (as indicated by the reverse- originator of the undeliverable mail (as indicated by the reverse-
path). Formats specified for non-delivery reports by other standards path). Formats specified for non-delivery reports by other standards
(see, for example, RFC 3461 [33] and RFC 3464 [35]) SHOULD be used if (see, for example, RFC 3461 [34] and RFC 3464 [35]) SHOULD be used if
possible. possible.
This notification message must be from the SMTP server at the relay This notification message must be from the SMTP server at the relay
host or the host that first determines that delivery cannot be host or the host that first determines that delivery cannot be
accomplished. Of course, SMTP servers MUST NOT send notification accomplished. Of course, SMTP servers MUST NOT send notification
messages about problems transporting notification messages. One way messages about problems transporting notification messages. One way
to prevent loops in error reporting is to specify a null reverse-path to prevent loops in error reporting is to specify a null reverse-path
in the MAIL command of a notification message. When such a message in the MAIL command of a notification message. When such a message
is transmitted, the reverse-path MUST be set to null (see is transmitted, the reverse-path MUST be set to null (see
Section 4.5.5 for additional discussion). A MAIL command with a null Section 4.5.5 for additional discussion). A MAIL command with a null
skipping to change at page 31, line 41 skipping to change at page 31, line 48
The gateway SHOULD indicate the environment and protocol in the "via" The gateway SHOULD indicate the environment and protocol in the "via"
clauses of Received header field(s) that it supplies. clauses of Received header field(s) that it supplies.
3.7.3. Addresses in Gatewaying 3.7.3. Addresses in Gatewaying
From the Internet side, the gateway SHOULD accept all valid address From the Internet side, the gateway SHOULD accept all valid address
formats in SMTP commands and in the RFC 822 header section, and all formats in SMTP commands and in the RFC 822 header section, and all
valid RFC 822 messages. Addresses and header fields generated by valid RFC 822 messages. Addresses and header fields generated by
gateways MUST conform to applicable standards (including this one and gateways MUST conform to applicable standards (including this one and
RFC 5322 [11]). Gateways are, of course, subject to the same rules RFC 5322 [12]). Gateways are, of course, subject to the same rules
for handling source routes as those described for other SMTP systems for handling source routes as those described for other SMTP systems
in Section 3.3. in Section 3.3.
3.7.4. Other Header Fields in Gatewaying 3.7.4. Other Header Fields in Gatewaying
The gateway MUST ensure that all header fields of a message that it The gateway MUST ensure that all header fields of a message that it
forwards into the Internet mail environment meet the requirements for forwards into the Internet mail environment meet the requirements for
Internet mail. In particular, all addresses in "From:", "To:", Internet mail. In particular, all addresses in "From:", "To:",
"Cc:", etc., header fields MUST be transformed (if necessary) to "Cc:", etc., header fields MUST be transformed (if necessary) to
satisfy the standard header syntax of RFC 5322 [11], MUST reference satisfy the standard header syntax of RFC 5322 [12], MUST reference
only fully-qualified domain names, and MUST be effective and useful only fully-qualified domain names, and MUST be effective and useful
for sending replies. The translation algorithm used to convert mail for sending replies. The translation algorithm used to convert mail
from the Internet protocols to another environment's protocol SHOULD from the Internet protocols to another environment's protocol SHOULD
ensure that error messages from the foreign mail environment are ensure that error messages from the foreign mail environment are
delivered to the reverse-path from the SMTP envelope, not to an delivered to the reverse-path from the SMTP envelope, not to an
address in the "From:", "Sender:", or similar header fields of the address in the "From:", "Sender:", or similar header fields of the
message. message.
3.7.5. Envelopes in Gatewaying 3.7.5. Envelopes in Gatewaying
skipping to change at page 33, line 21 skipping to change at page 33, line 28
There are circumstances, contrary to the intent of this There are circumstances, contrary to the intent of this
specification, in which an SMTP server may receive an indication that specification, in which an SMTP server may receive an indication that
the underlying TCP connection has been closed or reset. To preserve the underlying TCP connection has been closed or reset. To preserve
the robustness of the mail system, SMTP servers SHOULD be prepared the robustness of the mail system, SMTP servers SHOULD be prepared
for this condition and SHOULD treat it as if a QUIT had been received for this condition and SHOULD treat it as if a QUIT had been received
before the connection disappeared. before the connection disappeared.
3.9. Mailing Lists and Aliases 3.9. Mailing Lists and Aliases
[[CREF10: [5321bis] If "alias and list models" are explained [[CREF8: [5321bis] If "alias and list models" are explained
elsewhere, cross reference". Also note that this section appears to elsewhere, cross reference". Also note that this section appears to
prohibit an exploder from adding List-* headers. That needs to be prohibit an exploder from adding List-* headers. That needs to be
finessed.]] finessed.]]
An SMTP-capable host SHOULD support both the alias and the list An SMTP-capable host SHOULD support both the alias and the list
models of address expansion for multiple delivery. When a message is models of address expansion for multiple delivery. When a message is
delivered or forwarded to each address of an expanded list form, the delivered or forwarded to each address of an expanded list form, the
return address in the envelope ("MAIL FROM:") MUST be changed to be return address in the envelope ("MAIL FROM:") MUST be changed to be
the address of a person or other entity who administers the list. the address of a person or other entity who administers the list.
However, in this case, the message header section (RFC 5322 [11]) However, in this case, the message header section (RFC 5322 [12])
MUST be left unchanged; in particular, the "From" field of the header MUST be left unchanged; in particular, the "From" field of the header
section is unaffected. section is unaffected.
An important mail facility is a mechanism for multi-destination An important mail facility is a mechanism for multi-destination
delivery of a single message, by transforming (or "expanding" or delivery of a single message, by transforming (or "expanding" or
"exploding") a pseudo-mailbox address into a list of destination "exploding") a pseudo-mailbox address into a list of destination
mailbox addresses. When a message is sent to such a pseudo-mailbox mailbox addresses. When a message is sent to such a pseudo-mailbox
(sometimes called an "exploder"), copies are forwarded or (sometimes called an "exploder"), copies are forwarded or
redistributed to each mailbox in the expanded list. Servers SHOULD redistributed to each mailbox in the expanded list. Servers SHOULD
simply utilize the addresses on the list; application of heuristics simply utilize the addresses on the list; application of heuristics
skipping to change at page 36, line 4 skipping to change at page 36, line 13
client MUST issue HELO or EHLO before starting a mail transaction. client MUST issue HELO or EHLO before starting a mail transaction.
These commands, and a "250 OK" reply to one of them, confirm that These commands, and a "250 OK" reply to one of them, confirm that
both the SMTP client and the SMTP server are in the initial state, both the SMTP client and the SMTP server are in the initial state,
that is, there is no transaction in progress and all state tables and that is, there is no transaction in progress and all state tables and
buffers are cleared. buffers are cleared.
Syntax: Syntax:
ehlo = "EHLO" SP ( Domain / address-literal ) CRLF ehlo = "EHLO" SP ( Domain / address-literal ) CRLF
helo = "HELO" SP Domain CRLF helo = "HELO" SP Domain CRLF
Normally, the response to EHLO will be a multiline reply. Each line Normally, the response to EHLO will be a multiline reply. Each line
of the response contains a keyword and, optionally, one or more of the response contains a keyword and, optionally, one or more
parameters. Following the normal syntax for multiline replies, these parameters. Following the normal syntax for multiline replies, these
keywords follow the code (250) and a hyphen for all but the last keywords follow the code (250) and a hyphen for all but the last
line, and the code and a space for the last line. The syntax for a line, and the code and a space for the last line. The syntax for a
positive response, using the ABNF notation and terminal symbols of positive response, using the ABNF notation and terminal symbols of
RFC 5234 [10], is: RFC 5234 [11], is:
ehlo-ok-rsp = ( "250" SP Domain [ SP ehlo-greet ] CRLF ) ehlo-ok-rsp = ( "250" SP Domain [ SP ehlo-greet ] CRLF )
/ ( "250-" Domain [ SP ehlo-greet ] CRLF / ( "250-" Domain [ SP ehlo-greet ] CRLF
*( "250-" ehlo-line CRLF ) *( "250-" ehlo-line CRLF )
"250" SP ehlo-line CRLF ) "250" SP ehlo-line CRLF )
ehlo-greet = 1*(%d0-9 / %d11-12 / %d14-127) ehlo-greet = 1*(%d0-9 / %d11-12 / %d14-127)
; string of any characters other than CR or LF ; string of any characters other than CR or LF
ehlo-line = ehlo-keyword *( SP ehlo-param ) ehlo-line = ehlo-keyword *( SP ehlo-param )
skipping to change at page 39, line 14 skipping to change at page 39, line 25
The mail data are terminated by a line containing only a period, that The mail data are terminated by a line containing only a period, that
is, the character sequence "<CRLF>.<CRLF>", where the first <CRLF> is is, the character sequence "<CRLF>.<CRLF>", where the first <CRLF> is
actually the terminator of the previous line (see Section 4.5.2). actually the terminator of the previous line (see Section 4.5.2).
This is the end of mail data indication. The first <CRLF> of this This is the end of mail data indication. The first <CRLF> of this
terminating sequence is also the <CRLF> that ends the final line of terminating sequence is also the <CRLF> that ends the final line of
the data (message text) or, if there was no mail data, ends the DATA the data (message text) or, if there was no mail data, ends the DATA
command itself (the "no mail data" case does not conform to this command itself (the "no mail data" case does not conform to this
specification since it would require that neither the trace header specification since it would require that neither the trace header
fields required by this specification nor the message header section fields required by this specification nor the message header section
required by RFC 5322 [11] be transmitted). An extra <CRLF> MUST NOT required by RFC 5322 [12] be transmitted). An extra <CRLF> MUST NOT
be added, as that would cause an empty line to be added to the be added, as that would cause an empty line to be added to the
message. The only exception to this rule would arise if the message message. The only exception to this rule would arise if the message
body were passed to the originating SMTP-sender with a final "line" body were passed to the originating SMTP-sender with a final "line"
that did not end in <CRLF>; in that case, the originating SMTP system that did not end in <CRLF>; in that case, the originating SMTP system
MUST either reject the message as invalid or add <CRLF> in order to MUST either reject the message as invalid or add <CRLF> in order to
have the receiving SMTP server recognize the "end of data" condition. have the receiving SMTP server recognize the "end of data" condition.
The custom of accepting lines ending only in <LF>, as a concession to The custom of accepting lines ending only in <LF>, as a concession to
non-conforming behavior on the part of some UNIX systems, has proven non-conforming behavior on the part of some UNIX systems, has proven
to cause more interoperability problems than it solves, and SMTP to cause more interoperability problems than it solves, and SMTP
skipping to change at page 42, line 31 skipping to change at page 42, line 39
The QUIT command may be issued at any time. Any current uncompleted The QUIT command may be issued at any time. Any current uncompleted
mail transaction will be aborted. mail transaction will be aborted.
Syntax: Syntax:
quit = "QUIT" CRLF quit = "QUIT" CRLF
4.1.1.11. Mail-Parameter and Rcpt-Parameter Error Responses 4.1.1.11. Mail-Parameter and Rcpt-Parameter Error Responses
If the server SMTP does not recognize or cannot implement one or more If the server SMTP does not recognize or cannot implement one or more
of the parameters associated with a particular MAIL FROM or RCPT TO of the parameters associated with a particular MAIL or RCPT command,
command, it will return code 555. it will return code 555.
If, for some reason, the server is temporarily unable to accommodate If, for some reason, the server is temporarily unable to accommodate
one or more of the parameters associated with a MAIL FROM or RCPT TO one or more of the parameters associated with a MAIL or RCPT command,
command, and if the definition of the specific parameter does not and if the definition of the specific parameter does not mandate the
mandate the use of another code, it should return code 455. use of another code, it should return code 455.
Errors specific to particular parameters and their values will be Errors specific to particular parameters and their values will be
specified in the parameter's defining RFC. specified in the parameter's defining RFC.
4.1.2. Command Argument Syntax 4.1.2. Command Argument Syntax
The syntax of the argument clauses of the above commands (using the The syntax of the argument clauses of the above commands (using the
syntax specified in RFC 5234 [10] where applicable) is given below. syntax specified in RFC 5234 [11] where applicable) is given below.
Some of the productions given below are used only in conjunction with Some of the productions given below are used only in conjunction with
source routes as described in Appendix C. Some terminals not defined source routes as described in Appendix C. Some terminals not defined
in this document, but are defined elsewhere, specifically: in this document, but are defined elsewhere, specifically:
In the "core" syntax in Appendix B of RFC 5234 [10]: ALPHA , CRLF In the "core" syntax in Appendix B of RFC 5234 [11]: ALPHA , CRLF
, DIGIT , HEXDIG , and SP , DIGIT , HEXDIG , and SP
In the message format syntax in RFC 5322 [11]: atext , CFWS , and
In the message format syntax in RFC 5322 [12]: atext , CFWS , and
FWS . FWS .
Reverse-path = Path / "<>" Reverse-path = Path / "<>"
Forward-path = Path Forward-path = Path
Path = "<" [ A-d-l ":" ] Mailbox ">" Path = "<" [ A-d-l ":" ] Mailbox ">"
A-d-l = At-domain *( "," At-domain ) A-d-l = At-domain *( "," At-domain )
; Note that this form, the so-called "source ; Note that this form, the so-called "source
skipping to change at page 43, line 31 skipping to change at page 43, line 43
Rcpt-parameters = esmtp-param *(SP esmtp-param) Rcpt-parameters = esmtp-param *(SP esmtp-param)
esmtp-param = esmtp-keyword ["=" esmtp-value] esmtp-param = esmtp-keyword ["=" esmtp-value]
esmtp-keyword = (ALPHA / DIGIT) *(ALPHA / DIGIT / "-") esmtp-keyword = (ALPHA / DIGIT) *(ALPHA / DIGIT / "-")
esmtp-value = 1*(%d33-60 / %d62-126) esmtp-value = 1*(%d33-60 / %d62-126)
; any CHAR excluding "=", SP, and control ; any CHAR excluding "=", SP, and control
; characters. If this string is an email address, ; characters. If this string is an email address,
; i.e., a Mailbox, then the "xtext" syntax [33] ; i.e., a Mailbox, then the "xtext" syntax [34]
; SHOULD be used. ; SHOULD be used.
Keyword = Ldh-str Keyword = Ldh-str
Argument = Atom Argument = Atom
Domain = sub-domain *("." sub-domain) Domain = sub-domain *("." sub-domain)
sub-domain = Let-dig [Ldh-str] sub-domain = Let-dig [Ldh-str]
Let-dig = ALPHA / DIGIT Let-dig = ALPHA / DIGIT
Ldh-str = *( ALPHA / DIGIT / "-" ) Let-dig Ldh-str = *( ALPHA / DIGIT / "-" ) Let-dig
address-literal = "[" ( IPv4-address-literal / address-literal = "[" ( IPv4-address-literal /
IPv6-address-literal / IPv6-address-literal /
General-address-literal ) "]" General-address-literal ) "]"
; See Section 4.1.3 ; See Section 4.1.3
Mailbox = Local-part "@" ( Domain / address-literal ) Mailbox = Local-part "@" ( Domain / address-literal )
skipping to change at page 45, line 25 skipping to change at page 45, line 38
communication (and, in particular, communication to report and repair communication (and, in particular, communication to report and repair
the error) is blocked. To bypass this barrier, a special literal the error) is blocked. To bypass this barrier, a special literal
form of the address is allowed as an alternative to a domain name. form of the address is allowed as an alternative to a domain name.
For IPv4 addresses, this form uses four small decimal integers For IPv4 addresses, this form uses four small decimal integers
separated by dots and enclosed by brackets such as [123.255.37.2], separated by dots and enclosed by brackets such as [123.255.37.2],
which indicates an (IPv4) Internet Address in sequence-of-octets which indicates an (IPv4) Internet Address in sequence-of-octets
form. For IPv6 and other forms of addressing that might eventually form. For IPv6 and other forms of addressing that might eventually
be standardized, the form consists of a standardized "tag" that be standardized, the form consists of a standardized "tag" that
identifies the address syntax, a colon, and the address itself, in a identifies the address syntax, a colon, and the address itself, in a
format specified as part of the relevant standards (i.e., RFC 4291 format specified as part of the relevant standards (i.e., RFC 4291
[9] for IPv6). [10] for IPv6).
[[CREF11: [5321bis] Proposed erratum 4315 (2015-03-27) suggests yet [[CREF9: [5321bis] Proposed erratum 4315 (2015-03-27) suggests yet
another modification to the IPv6 address literal syntax, based on another modification to the IPv6 address literal syntax, based on
part on RFC 5952. We should consider whether those, or other, part on RFC 5952. We should consider whether those, or other,
modifications are appropriate and/or whether, given both the issues modifications are appropriate and/or whether, given both the issues
of spam/malware and servers supporting multiple domains, it it time of spam/malware and servers supporting multiple domains, it it time
to deprecate mailboxes containing address literals entirely (EHLO to deprecate mailboxes containing address literals entirely (EHLO
fields may be a different issue). If we are going to allow IPv6 fields may be a different issue). If we are going to allow IPv6
address literals, it may be time to incorporate something by address literals, it may be time to incorporate something by
reference rather than including specific syntax here (RFC 5952 is 14 reference rather than including specific syntax here (RFC 5952 is 14
pages long and does not contain any ABNF).]] pages long and does not contain any ABNF).]]
skipping to change at page 46, line 26 skipping to change at page 46, line 36
/ [ *5( h16 ":" ) h16 ] "::" h16 / [ *5( h16 ":" ) h16 ] "::" h16
/ [ *6( h16 ":" ) h16 ] "::" / [ *6( h16 ":" ) h16 ] "::"
; This definition is consistent with the one for ; This definition is consistent with the one for
; URIs [40]. ; URIs [40].
ls32 = ( h16 ":" h16 ) / IPv4address ls32 = ( h16 ":" h16 ) / IPv4address
; least-significant 32 bits of address ; least-significant 32 bits of address
h16 = 1*4HEXDIG h16 = 1*4HEXDIG
; 16 bits of address represented in hexadecimal ; 16 bits of address represented in hexadecimal
[[CREF12: [5321bis](2821ter) 2821bis Last Call
comment]]
4.1.4. Order of Commands 4.1.4. Order of Commands
There are restrictions on the order in which these commands may be There are restrictions on the order in which these commands may be
used. used.
A session that will contain mail transactions MUST first be A session that will contain mail transactions MUST first be
initialized by the use of the EHLO command. An SMTP server SHOULD initialized by the use of the EHLO command. An SMTP server SHOULD
accept commands for non-mail transactions (e.g., VRFY, EXPN, or NOOP) accept commands for non-mail transactions (e.g., VRFY, EXPN, or NOOP)
without this initialization. without this initialization.
skipping to change at page 47, line 16 skipping to change at page 47, line 25
The SMTP client MUST, if possible, ensure that the domain parameter The SMTP client MUST, if possible, ensure that the domain parameter
to the EHLO command is a primary host name as specified for this to the EHLO command is a primary host name as specified for this
command in Section 2.3.5. If this is not possible (e.g., when the command in Section 2.3.5. If this is not possible (e.g., when the
client's address is dynamically assigned and the client does not have client's address is dynamically assigned and the client does not have
an obvious name), an address literal SHOULD be substituted for the an obvious name), an address literal SHOULD be substituted for the
domain name. domain name.
An SMTP server MAY verify that the domain name argument in the EHLO An SMTP server MAY verify that the domain name argument in the EHLO
command actually corresponds to the IP address of the client. command actually corresponds to the IP address of the client.
[[CREF13: [5321bis] [[Note in draft -- proposed change to "An SMTP [[CREF10: [5321bis] [[Note in draft -- proposed change to "An SMTP
server MAY verify that the domain name argument in the EHLO command server MAY verify that the domain name argument in the EHLO command
has an address record matching the IP address of the client." --David has an address record matching the IP address of the client." ]]
MacQuigg, david_macquigg@yahoo.com, Friday, 20090130 0637 -0700]]]]
However, if the verification fails, the server MUST NOT refuse to However, if the verification fails, the server MUST NOT refuse to
accept a message on that basis. Information captured in the accept a message on that basis. Information captured in the
verification attempt is for logging and tracing purposes. Note that verification attempt is for logging and tracing purposes. Note that
this prohibition applies to the matching of the parameter to its IP this prohibition applies to the matching of the parameter to its IP
address only; see Section 7.9 for a more extensive discussion of address only; see Section 7.9 for a more extensive discussion of
rejecting incoming connections or mail messages. rejecting incoming connections or mail messages.
The NOOP, HELP, EXPN, VRFY, and RSET commands can be used at any time The NOOP, HELP, EXPN, VRFY, and RSET commands can be used at any time
during a session, or without previously initializing a session. SMTP during a session, or without previously initializing a session. SMTP
servers SHOULD process these normally (that is, not return a 503 servers SHOULD process these normally (that is, not return a 503
code) even if no EHLO command has yet been received; clients SHOULD code) even if no EHLO command has yet been received; clients SHOULD
open a session with EHLO before sending these commands. open a session with EHLO before sending these commands.
If these rules are followed, the example in RFC 821 that shows "550 If these rules are followed, the example in RFC 821 that shows "550
access denied to you" in response to an EXPN command is incorrect access denied to you" in response to an EXPN command is incorrect
unless an EHLO command precedes the EXPN or the denial of access is unless an EHLO command precedes the EXPN or the denial of access is
based on the client's IP address or other authentication or based on the client's IP address or other authentication or
authorization-determining mechanisms. authorization-determining mechanisms.
The MAIL command begins a mail transaction. Once started, a mail A mail transaction begins with a MAIL command and then consists of
transaction consists of a transaction beginning command, one or more one or more RCPT commands, and a DATA command, in that order. A mail
RCPT commands, and a DATA command, in that order. A mail transaction transaction may be aborted by the RSET, a new EHLO, or the QUIT
may be aborted by the RSET, a new EHLO, or the QUIT command. There command.
may be zero or more transactions in a session. MAIL MUST NOT be sent
if a mail transaction is already open, i.e., it should be sent only SMTP extensions (see Section 2.2) may create additional commands that
if no mail transaction had been started in the session, or if the initiate, abort, or end the transaction.More generally, any new
previous one successfully concluded with a successful DATA command, command MUST clearly document any effect it has on the transaction
or if the previous one was aborted, e.g., with a RSET or new EHLO. state.
[[CREF14: [5321bis] 2821ter note: see comment about changing this
convoluted discussion to talk about 'mail transaction' above. There may be zero or more transactions in a session. MAIL MUST NOT
--Jck]] be sent if a mail transaction is already open, i.e., it should be
sent only if no mail transaction had been started in the session, or
if the previous one successfully concluded with a successful DATA
command, or if the previous one was aborted, e.g., with a RSET or new
EHLO. [[CREF11: [5321bis] See comment about changing this convoluted
discussion to talk about 'mail transaction' above. --Jck (and see
Ticket #11 correspondence with Alexey 2021-07-06)]]
If the transaction beginning command argument is not acceptable, a If the transaction beginning command argument is not acceptable, a
501 failure reply MUST be returned and the SMTP server MUST stay in 501 failure reply MUST be returned and the SMTP server MUST stay in
the same state. If the commands in a transaction are out of order to the same state. If the commands in a transaction are out of order to
the degree that they cannot be processed by the server, a 503 failure the degree that they cannot be processed by the server, a 503 failure
reply MUST be returned and the SMTP server MUST stay in the same reply MUST be returned and the SMTP server MUST stay in the same
state. state.
The last command in a session MUST be the QUIT command. The QUIT The last command in a session MUST be the QUIT command. The QUIT
command SHOULD be used by the client SMTP to request connection command SHOULD be used by the client SMTP to request connection
closure, even when no session opening command was sent and accepted. closure, even when no session opening command was sent and accepted.
skipping to change at page 49, line 32 skipping to change at page 49, line 48
Reply-line = *( Reply-code "-" [ textstring ] CRLF ) Reply-line = *( Reply-code "-" [ textstring ] CRLF )
Reply-code [ SP textstring ] CRLF Reply-code [ SP textstring ] CRLF
Reply-code = %x32-35 %x30-35 %x30-39 Reply-code = %x32-35 %x30-35 %x30-39
where "Greeting" appears only in the 220 response that announces that where "Greeting" appears only in the 220 response that announces that
the server is opening its part of the connection. (Other possible the server is opening its part of the connection. (Other possible
server responses upon connection follow the syntax of Reply-line.) server responses upon connection follow the syntax of Reply-line.)
An SMTP server SHOULD send only the reply codes listed in this An SMTP server SHOULD send only the reply codes listed in this
document or additions to the list as discussed below. document or additions to the list as discussed below. An SMTP server
[[CREF15: [5321bis] 20140804: New text to clear up ambiguity.]] SHOULD use the text shown in the examples whenever appropriate.
An SMTP server SHOULD use the text shown in the examples whenever
appropriate.
An SMTP client MUST determine its actions only by the reply code, not An SMTP client MUST determine its actions only by the reply code, not
by the text (except for the "change of address" 251 and 551 and, if by the text (except for the "change of address" 251 and 551 and, if
necessary, 220, 221, and 421 replies); in the general case, any text, necessary, 220, 221, and 421 replies); in the general case, any text,
including no text at all (although senders SHOULD NOT send bare including no text at all (although senders SHOULD NOT send bare
codes), MUST be acceptable. The space (blank) following the reply codes), MUST be acceptable. The space (blank) following the reply
code is considered part of the text. A Sender-SMTP MUST first test code is considered part of the text. A Sender-SMTP MUST first test
the whole 3 digit reply code it receives, as well as any accompanying the whole 3 digit reply code it receives, as well as any accompanying
supplemental codes or information (see RFC 3463 [RFC3463] and RFC supplemental codes or information (see RFC 3463 [7] and RFC 5248
5248 [RFC5248]). If the full reply code is not recognized, and the [46]). If the full reply code is not recognized, and the additional
additional information is not recognized or missing, the Sender-SMTP information is not recognized or missing, the Sender-SMTP MUST use
MUST use the first digit (severity indication) of a reply code it the first digit (severity indication) of a reply code it receives.
receives.
The list of codes that appears below MUST NOT be construed as The list of codes that appears below MUST NOT be construed as
permanent. While the addition of new codes should be a rare and permanent. While the addition of new codes should be a rare and
significant activity, with supplemental information in the textual significant activity, with supplemental information in the textual
part of the response (including enhanced status codes [34] and the part of the response (including enhanced status codes [7] and the
successors to that specification) successors to that specification) being preferred, new codes may be
[[CREF16: [5321bis] 20140802: New text for clarity]] added as the result of new Standards or Standards-Track
being preferred, new codes may be added as the result of new specifications. Consequently, a sender-SMTP MUST be prepared to
Standards or Standards-Track specifications. Consequently, a sender- handle codes not specified in this document and MUST do so by
SMTP MUST be prepared to handle codes not specified in this document interpreting the first digit only.
and MUST do so by interpreting the first digit only.
In the absence of extensions negotiated with the client, SMTP servers In the absence of extensions negotiated with the client, SMTP servers
MUST NOT send reply codes whose first digits are other than 2, 3, 4, MUST NOT send reply codes whose first digits are other than 2, 3, 4,
or 5. Clients that receive such out-of-range codes SHOULD normally or 5. Clients that receive such out-of-range codes SHOULD normally
treat them as fatal errors and terminate the mail transaction. treat them as fatal errors and terminate the mail transaction.
4.2.1. Reply Code Severities and Theory 4.2.1. Reply Code Severities and Theory
The three digits of the reply each have a special significance. The The three digits of the reply each have a special significance. The
first digit denotes whether the response is good, bad, or incomplete. first digit denotes whether the response is good, bad, or incomplete.
skipping to change at page 51, line 19 skipping to change at page 51, line 31
5yz Permanent Negative Completion reply 5yz Permanent Negative Completion reply
The command was not accepted and the requested action did not The command was not accepted and the requested action did not
occur. The SMTP client SHOULD NOT repeat the exact request (in occur. The SMTP client SHOULD NOT repeat the exact request (in
the same sequence). Even some "permanent" error conditions can be the same sequence). Even some "permanent" error conditions can be
corrected, so the human user may want to direct the SMTP client to corrected, so the human user may want to direct the SMTP client to
reinitiate the command sequence by direct action at some point in reinitiate the command sequence by direct action at some point in
the future (e.g., after the spelling has been changed, or the user the future (e.g., after the spelling has been changed, or the user
has altered the account status). has altered the account status).
It is worth noting that the file transfer protocol (FTP) [14] uses a It is worth noting that the file transfer protocol (FTP) [15] uses a
very similar code architecture and that the SMTP codes are based on very similar code architecture and that the SMTP codes are based on
the FTP model. However, SMTP uses a one-command, one-response model the FTP model. However, SMTP uses a one-command, one-response model
(while FTP is asynchronous) and FTP's 1yz codes are not part of the (while FTP is asynchronous) and FTP's 1yz codes are not part of the
SMTP model. SMTP model.
The second digit encodes responses in specific categories: The second digit encodes responses in specific categories:
x0z Syntax: These replies refer to syntax errors, syntactically x0z Syntax: These replies refer to syntax errors, syntactically
correct commands that do not fit any functional category, and correct commands that do not fit any functional category, and
unimplemented or superfluous commands. unimplemented or superfluous commands.
skipping to change at page 53, line 4 skipping to change at page 53, line 15
4.2.2. Reply Codes by Function Groups 4.2.2. Reply Codes by Function Groups
500 Syntax error, command unrecognized (This may include errors such 500 Syntax error, command unrecognized (This may include errors such
as command line too long) as command line too long)
501 Syntax error in parameters or arguments 501 Syntax error in parameters or arguments
502 Command not implemented (see Section 4.2.4.1) 502 Command not implemented (see Section 4.2.4.1)
503 Bad sequence of commands 503 Bad sequence of commands
504 Command parameter not implemented 504 Command parameter not implemented
211 System status, or system help reply 211 System status, or system help reply
214 Help message (Information on how to use the receiver or the 214 Help message (Information on how to use the receiver or the
meaning of a particular non-standard command; this reply is useful meaning of a particular non-standard command; this reply is useful
only to the human user) only to the human user)
220 <domain> Service ready 220 <domain> Service ready
221 <domain> Service closing transmission channel 221 <domain> Service closing transmission channel
421 <domain> Service not available, closing transmission channel 421 <domain> Service not available, closing transmission channel
(This may be a reply to any command if the service knows it must (This may be a reply to any command if the service knows it must
shut down) shut down)
521 <domain> No mail service here. [[CREF17: [5321bis]20140804: 521 <domain> No mail service here.
Specific code introduced with RFC 1846, updated and specified in
draft-klensin-smtp-521code.]]
556 No mail service at this domain. [[CREF18: [5321bis] 20140912: 556 No mail service at this domain.
Specific code introduced in draft-klensin-smtp-521code-02 (RFC
7504), largely for nullMX]]
250 Requested mail action okay, completed 250 Requested mail action okay, completed
251 User not local; will forward to <forward-path> (See Section 3.4) 251 User not local; will forward to <forward-path> (See Section 3.4)
252 Cannot VRFY user, but will accept message and attempt delivery 252 Cannot VRFY user, but will accept message and attempt delivery
(See Section 3.5.3) (See Section 3.5.3)
455 Server unable to accommodate parameters 455 Server unable to accommodate parameters
skipping to change at page 54, line 4 skipping to change at page 54, line 11
450 Requested mail action not taken: mailbox unavailable (e.g., 450 Requested mail action not taken: mailbox unavailable (e.g.,
mailbox busy or temporarily blocked for policy reasons) mailbox busy or temporarily blocked for policy reasons)
550 Requested action not taken: mailbox unavailable (e.g., mailbox 550 Requested action not taken: mailbox unavailable (e.g., mailbox
not found, no access, or command rejected for policy reasons) not found, no access, or command rejected for policy reasons)
451 Requested action aborted: error in processing 451 Requested action aborted: error in processing
551 User not local; please try <forward-path> (See Section 3.4) 551 User not local; please try <forward-path> (See Section 3.4)
452 Requested action not taken: insufficient system storage 452 Requested action not taken: insufficient system storage
(preferred code for "too many recipients", see Section 4.5.3.1.10)
552 Requested mail action aborted: exceeded storage allocation 552 Requested mail action aborted: exceeded storage allocation.
553 Requested action not taken: mailbox name not allowed (e.g., 553 Requested action not taken: mailbox name not allowed (e.g.,
mailbox syntax incorrect) mailbox syntax incorrect)
354 Start mail input; end with <CRLF>.<CRLF> 354 Start mail input; end with <CRLF>.<CRLF>
554 Transaction failed (Or, in the case of a connection-opening 554 Transaction failed (Or, in the case of a connection-opening
response, "No SMTP service here") response, "No SMTP service here")
[[CREF19: [5321bis] [[Note in Draft: Revise above statement in the [[CREF12: [5321bis] [[Note in Draft: Revise above statement in the
light of new 521 code??]] ]] light of new 521 code??]] ]]
4.2.3. Reply Codes in Numeric Order 4.2.3. Reply Codes in Numeric Order
211 System status, or system help reply 211 System status, or system help reply
214 Help message (Information on how to use the receiver or the 214 Help message (Information on how to use the receiver or the
meaning of a particular non-standard command; this reply is useful meaning of a particular non-standard command; this reply is useful
only to the human user) only to the human user)
skipping to change at page 54, line 38 skipping to change at page 55, line 4
221 <domain> Service closing transmission channel 221 <domain> Service closing transmission channel
250 Requested mail action okay, completed 250 Requested mail action okay, completed
251 User not local; will forward to <forward-path> (See Section 3.4) 251 User not local; will forward to <forward-path> (See Section 3.4)
252 Cannot VRFY user, but will accept message and attempt delivery 252 Cannot VRFY user, but will accept message and attempt delivery
(See Section 3.5.3) (See Section 3.5.3)
354 Start mail input; end with <CRLF>.<CRLF> 354 Start mail input; end with <CRLF>.<CRLF>
421 <domain> Service not available, closing transmission channel 421 <domain> Service not available, closing transmission channel
(This may be a reply to any command if the service knows it must (This may be a reply to any command if the service knows it must
shut down) shut down)
450 Requested mail action not taken: mailbox unavailable (e.g., 450 Requested mail action not taken: mailbox unavailable (e.g.,
mailbox busy or temporarily blocked for policy reasons) mailbox busy or temporarily blocked for policy reasons)
451 Requested action aborted: local error in processing 451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
452 Requested action not taken: insufficient system storage (also
preferred code for "too many recipients", see Section 4.5.3.1.10)
455 Server unable to accommodate parameters 455 Server unable to accommodate parameters
500 Syntax error, command unrecognized (This may include errors such 500 Syntax error, command unrecognized (This may include errors such
as command line too long) as command line too long)
501 Syntax error in parameters or arguments 501 Syntax error in parameters or arguments
502 Command not implemented (see Section 4.2.4.1) 502 Command not implemented (see Section 4.2.4.1)
skipping to change at page 55, line 26 skipping to change at page 55, line 36
504 Command parameter not implemented 504 Command parameter not implemented
521 No mail service 521 No mail service
550 Requested action not taken: mailbox unavailable (e.g., mailbox 550 Requested action not taken: mailbox unavailable (e.g., mailbox
not found, no access, or command rejected for policy reasons) not found, no access, or command rejected for policy reasons)
551 User not local; please try <forward-path> (See Section 3.4) 551 User not local; please try <forward-path> (See Section 3.4)
552 Requested mail action aborted: exceeded storage allocation 552 Requested mail action aborted: exceeded storage allocation.
553 Requested action not taken: mailbox name not allowed (e.g., 553 Requested action not taken: mailbox name not allowed (e.g.,
mailbox syntax incorrect) mailbox syntax incorrect)
554 Transaction failed (Or, in the case of a connection-opening 554 Transaction failed (Or, in the case of a connection-opening
response, "No SMTP service here") response, "No SMTP service here")
555 MAIL FROM/RCPT TO parameters not recognized or not implemented 555 MAIL FROM/RCPT TO parameters not recognized or not implemented
556 No mail service at this domain. 556 No mail service at this domain.
skipping to change at page 56, line 7 skipping to change at page 56, line 19
Questions have been raised as to when reply code 502 (Command not Questions have been raised as to when reply code 502 (Command not
implemented) SHOULD be returned in preference to other codes. 502 implemented) SHOULD be returned in preference to other codes. 502
SHOULD be used when the command is actually recognized by the SMTP SHOULD be used when the command is actually recognized by the SMTP
server, but not implemented. If the command is not recognized, code server, but not implemented. If the command is not recognized, code
500 SHOULD be returned. Extended SMTP systems MUST NOT list 500 SHOULD be returned. Extended SMTP systems MUST NOT list
capabilities in response to EHLO for which they will return 502 (or capabilities in response to EHLO for which they will return 502 (or
500) replies. 500) replies.
4.2.4.2. "No mail accepted" situations and the 521, 554, and 556 codes 4.2.4.2. "No mail accepted" situations and the 521, 554, and 556 codes
[[CREF20: [5321bis] This section is new with 5321bis. ]]
Codes 521, 554, and 556 are all used to report different types of "no Codes 521, 554, and 556 are all used to report different types of "no
mail accepted" situations. They differ as follows. 521 is an mail accepted" situations. They differ as follows. 521 is an
indication from a system answering on the SMTP port that it does not indication from a system answering on the SMTP port that it does not
support SMTP service (a so-called "dummy server" as discussed in RFC support SMTP service (a so-called "dummy server" as discussed in RFC
1846 [19] and elsewhere). Obviously, it requires that system exist 1846 [20] and elsewhere). Obviously, it requires that system exist
and that a connection can be made successfully to it. Because a and that a connection can be made successfully to it. Because a
system that does not accept any mail cannot meaningfully accept a system that does not accept any mail cannot meaningfully accept a
RCPT command, any commands (other than QUIT) issued after an SMTP RCPT command, any commands (other than QUIT) issued after an SMTP
server has issued a 521 reply are client (sender) errors. 556 is server has issued a 521 reply are client (sender) errors. 556 is
used by a message submission or intermediate SMTP system (see used by a message submission or intermediate SMTP system (see
Section 1.1) to report that it cannot forward the message further Section 1.1) to report that it cannot forward the message further
because it knows (e.g., from a DNS entry [51]) that the recipient because it knows (e.g., from a DNS entry [51]) that the recipient
domain does not accept mail. It would normally be used in response domain does not accept mail. It would normally be used in response
to a RCPT or similar (extension) command when the SMTP system to a RCPT or similar (extension) command when the SMTP system
identifies a domain that it can (or has) determined never accepts identifies a domain that it can (or has) determined never accepts
skipping to change at page 58, line 33 skipping to change at page 58, line 42
unrecognized reply codes by interpreting the first digit only. unrecognized reply codes by interpreting the first digit only.
Unless extended using the mechanisms described in Section 2.2, SMTP Unless extended using the mechanisms described in Section 2.2, SMTP
servers MUST NOT transmit reply codes to an SMTP client that are servers MUST NOT transmit reply codes to an SMTP client that are
other than three digits or that do not start in a digit between 2 and other than three digits or that do not start in a digit between 2 and
5 inclusive. 5 inclusive.
These sequencing rules and, in principle, the codes themselves, can These sequencing rules and, in principle, the codes themselves, can
be extended or modified by SMTP extensions offered by the server and be extended or modified by SMTP extensions offered by the server and
accepted (requested) by the client. However, if the target is more accepted (requested) by the client. However, if the target is more
precise granularity in the codes, rather than codes for completely precise granularity in the codes, rather than codes for completely
new purposes, the system described in RFC 3463 [34] SHOULD be used in new purposes, the system described in RFC 3463 [7] SHOULD be used in
preference to the invention of new codes. preference to the invention of new codes.
In addition to the codes listed below, any SMTP command can return In addition to the codes listed below, any SMTP command can return
any of the following codes if the corresponding unusual circumstances any of the following codes if the corresponding unusual circumstances
are encountered: are encountered:
500 For the "command line too long" case or if the command name was 500 For the "command line too long" case or if the command name was
not recognized. Note that producing a "command not recognized" not recognized. Note that producing a "command not recognized"
error in response to the required subset of these commands is a error in response to the required subset of these commands is a
violation of this specification. Similarly, producing a "command violation of this specification. Similarly, producing a "command
skipping to change at page 59, line 29 skipping to change at page 59, line 38
style server that does not support EHLO) style server that does not support EHLO)
MAIL MAIL
S: 250 S: 250
E: 552, 451, 452, 550, 553, 503, 455, 555 E: 552, 451, 452, 550, 553, 503, 455, 555
RCPT RCPT
S: 250, 251 (but see Section 3.4 for discussion of 251 and 551) S: 250, 251 (but see Section 3.4 for discussion of 251 and 551)
E: 550, 551, 552, 553, 450, 451, 452, 503, 455, 555 E: 550, 551, 552 (obsolete for "too many recipients; see
Section 4.5.3.1.10, 553, 450, 451, 452, 503, 455, 555
DATA DATA
I: 354 -> data -> S: 250 I: 354 -> data -> S: 250
E: 552, 554, 451, 452 E: 552, 554, 451, 452
E: 450, 550 (rejections for policy reasons) E: 450, 550 (rejections for policy reasons)
E: 503, 554 E: 503, 554
skipping to change at page 61, line 32 skipping to change at page 61, line 43
It is possible for the mailbox in the return path to be different It is possible for the mailbox in the return path to be different
from the actual sender's mailbox, for example, if error responses are from the actual sender's mailbox, for example, if error responses are
to be delivered to a special error handling mailbox rather than to to be delivered to a special error handling mailbox rather than to
the message sender. When mailing lists are involved, this the message sender. When mailing lists are involved, this
arrangement is common and useful as a means of directing errors to arrangement is common and useful as a means of directing errors to
the list maintainer rather than the message originator. the list maintainer rather than the message originator.
The text above implies that the final mail data will begin with a The text above implies that the final mail data will begin with a
return path line, followed by one or more time stamp lines. These return path line, followed by one or more time stamp lines. These
lines will be followed by the rest of the mail data: first the lines will be followed by the rest of the mail data: first the
balance of the mail header section and then the body (RFC 5322 [11]). balance of the mail header section and then the body (RFC 5322 [12]).
It is sometimes difficult for an SMTP server to determine whether or It is sometimes difficult for an SMTP server to determine whether or
not it is making final delivery since forwarding or other operations not it is making final delivery since forwarding or other operations
may occur after the message is accepted for delivery. Consequently, may occur after the message is accepted for delivery. Consequently,
any further (forwarding, gateway, or relay) systems MAY remove the any further (forwarding, gateway, or relay) systems MAY remove the
return path and rebuild the MAIL command as needed to ensure that return path and rebuild the MAIL command as needed to ensure that
exactly one such line appears in a delivered message. exactly one such line appears in a delivered message.
A message-originating SMTP system SHOULD NOT send a message that A message-originating SMTP system SHOULD NOT send a message that
already contains a Return-path header field. SMTP servers performing already contains a Return-path header field. SMTP servers performing
skipping to change at page 62, line 51 skipping to change at page 63, line 14
recipient. For economy of processing by the sender, the former recipient. For economy of processing by the sender, the former
SHOULD be used when possible. Note that the key difference between SHOULD be used when possible. Note that the key difference between
handling aliases (Section 3.9.1) and forwarding (this subsection) is handling aliases (Section 3.9.1) and forwarding (this subsection) is
the change to the backward-pointing address in this case. All the change to the backward-pointing address in this case. All
notification messages about undeliverable mail MUST be sent using the notification messages about undeliverable mail MUST be sent using the
MAIL command and MUST use a null return path as discussed in MAIL command and MUST use a null return path as discussed in
Section 3.6. Section 3.6.
The time stamp line and the return path line are formally defined as The time stamp line and the return path line are formally defined as
follows (the definitions for "FWS" and "CFWS" appear in RFC 5322 follows (the definitions for "FWS" and "CFWS" appear in RFC 5322
[11]): [12]):
Return-path-line = "Return-Path:" FWS Reverse-path <CRLF> Return-path-line = "Return-Path:" FWS Reverse-path <CRLF>
Time-stamp-line = "Received:" FWS Stamp <CRLF> Time-stamp-line = "Received:" FWS Stamp <CRLF>
Stamp = From-domain By-domain Opt-info [CFWS] ";" Stamp = From-domain By-domain Opt-info [CFWS] ";"
FWS date-time FWS date-time
; where "date-time" is as defined in RFC 5322 [11] ; where "date-time" is as defined in RFC 5322 [12]
; but the "obs-" forms, especially two-digit ; but the "obs-" forms, especially two-digit
; years, are prohibited in SMTP and MUST NOT be used. ; years, are prohibited in SMTP and MUST NOT be used.
From-domain = "FROM" FWS Extended-Domain From-domain = "FROM" FWS Extended-Domain
By-domain = CFWS "BY" FWS Extended-Domain By-domain = CFWS "BY" FWS Extended-Domain
Extended-Domain = Domain / Extended-Domain = Domain /
( Domain FWS "(" TCP-info ")" ) / ( Domain FWS "(" TCP-info ")" ) /
( address-literal FWS "(" TCP-info ")" ) ( address-literal FWS "(" TCP-info ")" )
skipping to change at page 63, line 35 skipping to change at page 63, line 46
; not client EHLO. ; not client EHLO.
Opt-info = [Via] [With] [ID] [For] Opt-info = [Via] [With] [ID] [For]
[Additional-Registered-Clauses] [Additional-Registered-Clauses]
Via = CFWS "VIA" FWS Link Via = CFWS "VIA" FWS Link
With = CFWS "WITH" FWS Protocol With = CFWS "WITH" FWS Protocol
ID = CFWS "ID" FWS ( Atom / msg-id ) ID = CFWS "ID" FWS ( Atom / msg-id )
; msg-id is defined in RFC 5322 [11] ; msg-id is defined in RFC 5322 [12]
For = CFWS "FOR" FWS ( Path / Mailbox ) For = CFWS "FOR" FWS ( Path / Mailbox )
Additional-Registered-Clauses = 1* (CFWS Atom FWS String) Additional-Registered-Clauses = 1* (CFWS Atom FWS String)
[[CREF21: [5321bis] 5321 errata #1683, 20090215,
Roberto Javier Godoy, rjgodoy@fich.unl.edu.ar]] [[CREF13: [5321bis] 5321 errata #1683, 20090215, ]]
; Additional standard clauses may be added in this ; Additional standard clauses may be added in this
; location by future standards and registration with ; location by future standards and registration with
; IANA. SMTP servers SHOULD NOT use unregistered ; IANA. SMTP servers SHOULD NOT use unregistered
; names. See Section 8. ; names. See Section 8.
Link = "TCP" / Addtl-Link Link = "TCP" / Addtl-Link
Addtl-Link = Atom Addtl-Link = Atom
; Additional standard names for links are ; Additional standard names for links are
; registered with the Internet Assigned Numbers ; registered with the Internet Assigned Numbers
; Authority (IANA). "Via" is primarily of value ; Authority (IANA). "Via" is primarily of value
; with non-Internet transports. SMTP servers ; with non-Internet transports. SMTP servers
; SHOULD NOT use unregistered names. ; SHOULD NOT use unregistered names.
Protocol = "ESMTP" / "SMTP" / Attdl-Protocol Protocol = "ESMTP" / "SMTP" / Attdl-Protocol
Addtl-Protocol = Atom Addtl-Protocol = Atom
; Additional standard names for protocols are ; Additional standard names for protocols are
; registered with the Internet Assigned Numbers ; registered with the Internet Assigned Numbers
; Authority (IANA) in the "mail parameters" ; Authority (IANA) in the "mail parameters"
; registry [7]. SMTP servers SHOULD NOT ; registry [8]. SMTP servers SHOULD NOT
; use unregistered names. ; use unregistered names.
4.5. Additional Implementation Issues 4.5. Additional Implementation Issues
4.5.1. Minimum Implementation 4.5.1. Minimum Implementation
In order to make SMTP workable, the following minimum implementation In order to make SMTP workable, the following minimum implementation
MUST be provided by all receivers. The following commands MUST be MUST be provided by all receivers. The following commands MUST be
supported to conform to this specification: supported to conform to this specification:
skipping to change at page 65, line 48 skipping to change at page 66, line 13
they are applied to mail being relayed. they are applied to mail being relayed.
4.5.3. Sizes and Timeouts 4.5.3. Sizes and Timeouts
4.5.3.1. Size Limits and Minimums 4.5.3.1. Size Limits and Minimums
There are several objects that have required minimum/maximum sizes. There are several objects that have required minimum/maximum sizes.
Every implementation MUST be able to receive objects of at least Every implementation MUST be able to receive objects of at least
these sizes. Objects larger than these sizes SHOULD be avoided when these sizes. Objects larger than these sizes SHOULD be avoided when
possible. However, some Internet mail constructs such as encoded possible. However, some Internet mail constructs such as encoded
X.400 addresses (RFC 2156 [26]) will often require larger objects. X.400 addresses (RFC 2156 [27]) will often require larger objects.
Clients MAY attempt to transmit these, but MUST be prepared for a Clients MAY attempt to transmit these, but MUST be prepared for a
server to reject them if they cannot be handled by it. To the server to reject them if they cannot be handled by it. To the
maximum extent possible, implementation techniques that impose no maximum extent possible, implementation techniques that impose no
limits on the length of these objects should be used. limits on the length of these objects should be used.
Extensions to SMTP may involve the use of characters that occupy more Extensions to SMTP may involve the use of characters that occupy more
than a single octet each. This section therefore specifies lengths than a single octet each. This section therefore specifies lengths
in octets where absolute lengths, rather than character counts, are in octets where absolute lengths, rather than character counts, are
intended. intended.
[[CREF22: [5321bis] [[Note in Draft: Klensin 20191126: Given the [[CREF14: [5321bis] [[Note in Draft: Klensin 20191126: Given the
controversy on the SMTP mailing list between 20191123 and now about controversy on the SMTP mailing list between 20191123 and now about
maximum lengths, is the above adequate or is further tuning of the maximum lengths, is the above adequate or is further tuning of the
limit text below needed? ]]]] limit text below needed? ]]]]
4.5.3.1.1. Local-part 4.5.3.1.1. Local-part
The maximum total length of a user name or other local-part is 64 The maximum total length of a user name or other local-part is 64
octets. octets.
4.5.3.1.2. Domain 4.5.3.1.2. Domain
skipping to change at page 66, line 52 skipping to change at page 67, line 22
The maximum total length of a text line including the <CRLF> is 1000 The maximum total length of a text line including the <CRLF> is 1000
octets (not counting the leading dot duplicated for transparency). octets (not counting the leading dot duplicated for transparency).
This number may be increased by the use of SMTP Service Extensions. This number may be increased by the use of SMTP Service Extensions.
4.5.3.1.7. Message Content 4.5.3.1.7. Message Content
The maximum total length of a message content (including any message The maximum total length of a message content (including any message
header section as well as the message body) MUST BE at least 64K header section as well as the message body) MUST BE at least 64K
octets. Since the introduction of Internet Standards for multimedia octets. Since the introduction of Internet Standards for multimedia
mail (RFC 2045 [24]), message lengths on the Internet have grown mail (RFC 2045 [25]), message lengths on the Internet have grown
dramatically, and message size restrictions should be avoided if at dramatically, and message size restrictions should be avoided if at
all possible. SMTP server systems that must impose restrictions all possible. SMTP server systems that must impose restrictions
SHOULD implement the "SIZE" service extension of RFC 1870 [6], and SHOULD implement the "SIZE" service extension of RFC 1870 [6], and
SMTP client systems that will send large messages SHOULD utilize it SMTP client systems that will send large messages SHOULD utilize it
when possible. when possible.
4.5.3.1.8. Recipient Buffer 4.5.3.1.8. Recipient Buffer
The minimum total number of recipients that MUST be buffered is 100 The minimum total number of recipients that MUST be buffered is 100
recipients. Rejection of messages (for excessive recipients) with recipients. Rejection of messages (for excessive recipients) with
skipping to change at page 67, line 44 skipping to change at page 68, line 15
or or
501 Path too long 501 Path too long
or or
452 Too many recipients (see below) 452 Too many recipients (see below)
or or
552 Too much mail data. 552 Too much mail data (historically also used for too many
recipients (see below).
4.5.3.1.10. Too Many Recipients Code 4.5.3.1.10. Too Many Recipients Code
RFC 821 [3] incorrectly listed the error where an SMTP server RFC 821 [3] incorrectly listed the error where an SMTP server
exhausts its implementation limit on the number of RCPT commands exhausts its implementation limit on the number of RCPT commands
("too many recipients") as having reply code 552. The correct reply ("too many recipients") as having reply code 552. The correct reply
code for this condition is 452. Clients SHOULD treat a 552 code in code for this condition is 452. At the time RFC 5321 was written,
this case as a temporary, rather than permanent, failure so the logic the use of response code 552 by servers was sufficiently common that
below works. client implementation were advised to simply treat it as if 452 had
been sent. That advice is no longer necessary or useful.
When a conforming SMTP server encounters this condition, it has at When a conforming SMTP server encounters this condition, it has at
least 100 successful RCPT commands in its recipient buffer. If the least 100 successful RCPT commands in its recipient buffer. If the
server is able to accept the message, then at least these 100 server is able to accept the message, then at least these 100
addresses will be removed from the SMTP client's queue. When the addresses will be removed from the SMTP client's queue. When the
client attempts retransmission of those addresses that received 452 client attempts retransmission of those addresses that received 452
responses, at least 100 of these will be able to fit in the SMTP responses, at least 100 of these will be able to fit in the SMTP
server's recipient buffer. Each retransmission attempt that is able server's recipient buffer. Each retransmission attempt that is able
to deliver anything will be able to dispose of at least 100 of these to deliver anything will be able to dispose of at least 100 of these
recipients. recipients.
If an SMTP server has an implementation limit on the number of RCPT If an SMTP server has an implementation limit on the number of RCPT
commands and this limit is exhausted, it MUST use a response code of commands and this limit is exhausted, it MUST use a response code of
452 (but the client SHOULD also be prepared for a 552, as noted 452. If the server has a configured site-policy limitation on the
above). If the server has a configured site-policy limitation on the
number of RCPT commands, it MAY instead use a 5yz response code. In number of RCPT commands, it MAY instead use a 5yz response code. In
particular, if the intent is to prohibit messages with more than a particular, if the intent is to prohibit messages with more than a
site-specified number of recipients, rather than merely limit the site-specified number of recipients, rather than merely limit the
number of recipients in a given mail transaction, it would be number of recipients in a given mail transaction, it would be
reasonable to return a 503 response to any DATA command received reasonable to return a 503 response to any DATA command received
subsequent to the 452 (or 552) code or to simply return the 503 after subsequent to the 452 code or to simply return the 503 after DATA
DATA without returning any previous negative response. without returning any previous negative response.
4.5.3.2. Timeouts 4.5.3.2. Timeouts
An SMTP client MUST provide a timeout mechanism. It MUST use per- An SMTP client MUST provide a timeout mechanism. It MUST use per-
command timeouts rather than somehow trying to time the entire mail command timeouts rather than somehow trying to time the entire mail
transaction. Timeouts SHOULD be easily reconfigurable, preferably transaction. Timeouts SHOULD be easily reconfigurable, preferably
without recompiling the SMTP code. To implement this, a timer is set without recompiling the SMTP code. To implement this, a timer is set
for each SMTP command and for each buffer of the data transfer. The for each SMTP command and for each buffer of the data transfer. The
latter means that the overall timeout is inherently proportional to latter means that the overall timeout is inherently proportional to
the size of the message. the size of the message.
skipping to change at page 70, line 42 skipping to change at page 71, line 12
Experience suggests that failures are typically transient (the target Experience suggests that failures are typically transient (the target
system or its connection has crashed), favoring a policy of two system or its connection has crashed), favoring a policy of two
connection attempts in the first hour the message is in the queue, connection attempts in the first hour the message is in the queue,
and then backing off to one every two or three hours. and then backing off to one every two or three hours.
The SMTP client can shorten the queuing delay in cooperation with the The SMTP client can shorten the queuing delay in cooperation with the
SMTP server. For example, if mail is received from a particular SMTP server. For example, if mail is received from a particular
address, it is likely that mail queued for that host can now be sent. address, it is likely that mail queued for that host can now be sent.
Application of this principle may, in many cases, eliminate the Application of this principle may, in many cases, eliminate the
requirement for an explicit "send queues now" function such as ETRN, requirement for an explicit "send queues now" function such as ETRN,
RFC 1985 [23]. RFC 1985 [24].
The strategy may be further modified as a result of multiple The strategy may be further modified as a result of multiple
addresses per host (see below) to optimize delivery time versus addresses per host (see below) to optimize delivery time versus
resource usage. resource usage.
An SMTP client may have a large queue of messages for each An SMTP client may have a large queue of messages for each
unavailable destination host. If all of these messages were retried unavailable destination host. If all of these messages were retried
in every retry cycle, there would be excessive Internet overhead and in every retry cycle, there would be excessive Internet overhead and
the sending system would be blocked for a long period. Note that an the sending system would be blocked for a long period. Note that an
SMTP client can generally determine that a delivery attempt has SMTP client can generally determine that a delivery attempt has
skipping to change at page 71, line 49 skipping to change at page 72, line 24
As discussed above, when the SMTP server receives mail from a As discussed above, when the SMTP server receives mail from a
particular host address, it could activate its own SMTP queuing particular host address, it could activate its own SMTP queuing
mechanisms to retry any mail pending for that host address. mechanisms to retry any mail pending for that host address.
4.5.5. Messages with a Null Reverse-Path 4.5.5. Messages with a Null Reverse-Path
There are several types of notification messages that are required by There are several types of notification messages that are required by
existing and proposed Standards to be sent with a null reverse-path, existing and proposed Standards to be sent with a null reverse-path,
namely non-delivery notifications as discussed in Section 3.6.2 and namely non-delivery notifications as discussed in Section 3.6.2 and
Section 3.6.3, other kinds of Delivery Status Notifications (DSNs, Section 3.6.3, other kinds of Delivery Status Notifications (DSNs,
RFC 3461 [33]), and Message Disposition Notifications (MDNs, RFC 8098 RFC 3461 [34]), and Message Disposition Notifications (MDNs, RFC 8098
[37]). All of these kinds of messages are notifications about a [37]). All of these kinds of messages are notifications about a
previous message, and they are sent to the reverse-path of the previous message, and they are sent to the reverse-path of the
previous mail message. (If the delivery of such a notification previous mail message. (If the delivery of such a notification
message fails, that usually indicates a problem with the mail system message fails, that usually indicates a problem with the mail system
of the host to which the notification message is addressed. For this of the host to which the notification message is addressed. For this
reason, at some hosts the MTA is set up to forward such failed reason, at some hosts the MTA is set up to forward such failed
notification messages to someone who is able to fix problems with the notification messages to someone who is able to fix problems with the
mail system, e.g., via the postmaster alias.) mail system, e.g., via the postmaster alias.)
All other types of messages (i.e., any message which is not required All other types of messages (i.e., any message which is not required
skipping to change at page 73, line 19 skipping to change at page 73, line 40
contain a domain name that conforms to the specifications of contain a domain name that conforms to the specifications of
Section 2.3.5. Section 2.3.5.
[[5321bis Editor's Note: Depending on how the "null MX" discussion [[5321bis Editor's Note: Depending on how the "null MX" discussion
unfolds, some additional text may be in order here (20140718)]] unfolds, some additional text may be in order here (20140718)]]
That domain name, when queried, MUST return at least one address That domain name, when queried, MUST return at least one address
record (e.g., A or AAAA RR) that gives the IP address of the SMTP record (e.g., A or AAAA RR) that gives the IP address of the SMTP
server to which the message should be directed. Any other response, server to which the message should be directed. Any other response,
specifically including a value that will return a CNAME record when specifically including a value that will return a CNAME record when
queried, lies outside the scope of this Standard. The prohibition on queried, lies outside the scope of this Standard. The prohibition on
labels in the data that resolve to CNAMEs is discussed in more detail labels in the data that resolve to CNAMEs is discussed in more detail
in RFC 2181, Section 10.3 [27]. in RFC 2181, Section 10.3 [28].
When the lookup succeeds, the mapping can result in a list of When the lookup succeeds, the mapping can result in a list of
alternative delivery addresses rather than a single address, because alternative delivery addresses rather than a single address, because
of multiple MX records, multihoming, or both. To provide reliable of multiple MX records, multihoming, or both. To provide reliable
mail transmission, the SMTP client MUST be able to try (and retry) mail transmission, the SMTP client MUST be able to try (and retry)
each of the relevant addresses in this list in order, until a each of the relevant addresses in this list in order, until a
delivery attempt succeeds. However, there MAY also be a configurable delivery attempt succeeds. However, there MAY also be a configurable
limit on the number of alternate addresses that can be tried. In any limit on the number of alternate addresses that can be tried. In any
case, the SMTP client SHOULD try at least two addresses. case, the SMTP client SHOULD try at least two addresses.
skipping to change at page 75, line 49 skipping to change at page 76, line 21
Some delivery failures after the message is accepted by SMTP will be Some delivery failures after the message is accepted by SMTP will be
unavoidable. For example, it may be impossible for the receiving unavoidable. For example, it may be impossible for the receiving
SMTP server to validate all the delivery addresses in RCPT command(s) SMTP server to validate all the delivery addresses in RCPT command(s)
due to a "soft" domain system error, because the target is a mailing due to a "soft" domain system error, because the target is a mailing
list (see earlier discussion of RCPT), or because the server is list (see earlier discussion of RCPT), or because the server is
acting as a relay and has no immediate access to the delivering acting as a relay and has no immediate access to the delivering
system. system.
To avoid receiving duplicate messages as the result of timeouts, a To avoid receiving duplicate messages as the result of timeouts, a
receiver-SMTP MUST seek to minimize the time required to respond to receiver-SMTP MUST seek to minimize the time required to respond to
the final <CRLF>.<CRLF> end of data indicator. See RFC 1047 [16] for the final <CRLF>.<CRLF> end of data indicator. See RFC 1047 [17] for
a discussion of this problem. a discussion of this problem.
6.2. Unwanted, Unsolicited, and "Attack" Messages 6.2. Unwanted, Unsolicited, and "Attack" Messages
Utility and predictability of the Internet mail system requires that Utility and predictability of the Internet mail system requires that
messages that can be delivered should be delivered, regardless of any messages that can be delivered should be delivered, regardless of any
syntax or other faults associated with those messages and regardless syntax or other faults associated with those messages and regardless
of their content. If they cannot be delivered, and cannot be of their content. If they cannot be delivered, and cannot be
rejected by the SMTP server during the SMTP transaction, they should rejected by the SMTP server during the SMTP transaction, they should
be "bounced" (returned with non-delivery notification messages) as be "bounced" (returned with non-delivery notification messages) as
skipping to change at page 77, line 35 skipping to change at page 77, line 49
only way to get the offending software repaired. Advocates of only way to get the offending software repaired. Advocates of
"repair" or "deliver no matter what" argue that users prefer that "repair" or "deliver no matter what" argue that users prefer that
mail go through it if at all possible and that there are significant mail go through it if at all possible and that there are significant
market pressures in that direction. In practice, these market market pressures in that direction. In practice, these market
pressures may be more important to particular vendors than strict pressures may be more important to particular vendors than strict
conformance to the standards, regardless of the preference of the conformance to the standards, regardless of the preference of the
actual developers. actual developers.
The problems associated with ill-formed messages were exacerbated by The problems associated with ill-formed messages were exacerbated by
the introduction of the split-UA mail reading protocols (Post Office the introduction of the split-UA mail reading protocols (Post Office
Protocol (POP) version 2 [13], Post Office Protocol (POP) version 3 Protocol (POP) version 2 [14], Post Office Protocol (POP) version 3
[22], IMAP version 2 [18], and PCMAIL [17]). These protocols [23], IMAP version 2 [19], and PCMAIL [18]). These protocols
encouraged the use of SMTP as a posting (message submission) encouraged the use of SMTP as a posting (message submission)
protocol, and SMTP servers as relay systems for these client hosts protocol, and SMTP servers as relay systems for these client hosts
(which are often only intermittently connected to the Internet). (which are often only intermittently connected to the Internet).
Historically, many of those client machines lacked some of the Historically, many of those client machines lacked some of the
mechanisms and information assumed by SMTP (and indeed, by the mail mechanisms and information assumed by SMTP (and indeed, by the mail
format protocol, RFC 822 [12]). Some could not keep adequate track format protocol, RFC 822 [13]). Some could not keep adequate track
of time; others had no concept of time zones; still others could not of time; others had no concept of time zones; still others could not
identify their own names or addresses; and, of course, none could identify their own names or addresses; and, of course, none could
satisfy the assumptions that underlay RFC 822's conception of satisfy the assumptions that underlay RFC 822's conception of
authenticated addresses. authenticated addresses.
In response to these weak SMTP clients, many SMTP systems now In response to these weak SMTP clients, many SMTP systems now
complete messages that are delivered to them in incomplete or complete messages that are delivered to them in incomplete or
incorrect form. This strategy is generally considered appropriate incorrect form. This strategy is generally considered appropriate
when the server can identify or authenticate the client, and there when the server can identify or authenticate the client, and there
are prior agreements between them. By contrast, there is at best are prior agreements between them. By contrast, there is at best
skipping to change at page 78, line 32 skipping to change at page 79, line 4
should be applied when considering whether or not to perform fixes should be applied when considering whether or not to perform fixes
and how. These changes MUST NOT be applied by an SMTP server that and how. These changes MUST NOT be applied by an SMTP server that
provides an intermediate relay function. provides an intermediate relay function.
In all cases, properly operating clients supplying correct In all cases, properly operating clients supplying correct
information are preferred to corrections by the SMTP server. In all information are preferred to corrections by the SMTP server. In all
cases, documentation SHOULD be provided in trace header fields and/or cases, documentation SHOULD be provided in trace header fields and/or
header field comments for actions performed by the servers. header field comments for actions performed by the servers.
7. Security Considerations 7. Security Considerations
7.1. Mail Security and Spoofing 7.1. Mail Security and Spoofing
SMTP mail is inherently insecure in that it is feasible for even SMTP mail is inherently insecure in that it is feasible for even
fairly casual users to negotiate directly with receiving and relaying fairly casual users to negotiate directly with receiving and relaying
SMTP servers and create messages that will trick a naive recipient SMTP servers and create messages that will trick a naive recipient
into believing that they came from somewhere else. Constructing such into believing that they came from somewhere else. Constructing such
a message so that the "spoofed" behavior cannot be detected by an a message so that the "spoofed" behavior cannot be detected by an
expert is somewhat more difficult, but not sufficiently so as to be a expert is somewhat more difficult, but not sufficiently so as to be a
deterrent to someone who is determined and knowledgeable. deterrent to someone who is determined and knowledgeable.
Consequently, as knowledge of Internet mail increases, so does the Consequently, as knowledge of Internet mail increases, so does the
knowledge that SMTP mail inherently cannot be authenticated, or knowledge that SMTP mail inherently cannot be authenticated, or
integrity checks provided, at the transport level. Real mail integrity checks provided, at the transport level. Real mail
security lies only in end-to-end methods involving the message security lies only in end-to-end methods involving the message
bodies, such as those that use digital signatures (see RFC 1847 [20] bodies, such as those that use digital signatures (see RFC 1847 [21]
and, e.g., Pretty Good Privacy (PGP) in RFC 4880 [45] or Secure/ and, e.g., Pretty Good Privacy (PGP) in RFC 4880 [45] or Secure/
Multipurpose Internet Mail Extensions (S/MIME) in RFC 8551 [38]). Multipurpose Internet Mail Extensions (S/MIME) in RFC 8551 [38]).
Various protocol extensions and configuration options that provide Various protocol extensions and configuration options that provide
authentication at the transport level (e.g., from an SMTP client to authentication at the transport level (e.g., from an SMTP client to
an SMTP server) improve somewhat on the traditional situation an SMTP server) improve somewhat on the traditional situation
described above. However, in general, they only authenticate one described above. However, in general, they only authenticate one
server to another rather than a chain of relays and servers, much server to another rather than a chain of relays and servers, much
less authenticating users or user machines. Consequently, unless less authenticating users or user machines. Consequently, unless
they are accompanied by careful handoffs of responsibility in a they are accompanied by careful handoffs of responsibility in a
skipping to change at page 79, line 41 skipping to change at page 80, line 16
Addresses that do not appear in the message header section may appear Addresses that do not appear in the message header section may appear
in the RCPT commands to an SMTP server for a number of reasons. The in the RCPT commands to an SMTP server for a number of reasons. The
two most common involve the use of a mailing address as a "list two most common involve the use of a mailing address as a "list
exploder" (a single address that resolves into multiple addresses) exploder" (a single address that resolves into multiple addresses)
and the appearance of "blind copies". Especially when more than one and the appearance of "blind copies". Especially when more than one
RCPT command is present, and in order to avoid defeating some of the RCPT command is present, and in order to avoid defeating some of the
purpose of these mechanisms, SMTP clients and servers SHOULD NOT copy purpose of these mechanisms, SMTP clients and servers SHOULD NOT copy
the full set of RCPT command arguments into the header section, the full set of RCPT command arguments into the header section,
either as part of trace header fields or as informational or private- either as part of trace header fields or as informational or private-
extension header fields. [[CREF23: [rfc5321bis] [[Note in draft - extension header fields. [[CREF15: [rfc5321bis] [[Note in draft -
Suggestion from 20070124 that got lost: delete "especially" and "the Suggestion from 20070124 that got lost: delete "especially" and "the
full set of" -- copying the first one can be as harmful as copying full set of" -- copying the first one can be as harmful as copying
all of them, at least without verifying that the addresses do appear all of them, at least without verifying that the addresses do appear
in the headers.]] Arnt Gulbrandsen, arnt@oryx.com, 2007.01.24 in the headers. See G.7.9 and ticket #15.]] Since this rule is often
1121+0100]] Since this rule is often violated in practice, and cannot violated in practice, and cannot be enforced, sending SMTP systems
be enforced, sending SMTP systems that are aware of "bcc" use MAY that are aware of "bcc" use MAY find it helpful to send each blind
find it helpful to send each blind copy as a separate message copy as a separate message transaction containing only a single RCPT
transaction containing only a single RCPT command. command.
There is no inherent relationship between either "reverse" (from the There is no inherent relationship between either "reverse" (from the
MAIL command) or "forward" (RCPT) addresses in the SMTP transaction MAIL command) or "forward" (RCPT) addresses in the SMTP transaction
("envelope") and the addresses in the header section. Receiving ("envelope") and the addresses in the header section. Receiving
systems SHOULD NOT attempt to deduce such relationships and use them systems SHOULD NOT attempt to deduce such relationships and use them
to alter the header section of the message for delivery. The popular to alter the header section of the message for delivery. The popular
"Apparently-to" header field is a violation of this principle as well "Apparently-to" header field is a violation of this principle as well
as a common source of unintended information disclosure and SHOULD as a common source of unintended information disclosure and SHOULD
NOT be used. NOT be used.
skipping to change at page 82, line 5 skipping to change at page 82, line 26
to others. to others.
7.7. Information Disclosure in Message Forwarding 7.7. Information Disclosure in Message Forwarding
As discussed in Section 3.4, use of the 251 or 551 reply codes to As discussed in Section 3.4, use of the 251 or 551 reply codes to
identify the replacement address associated with a mailbox may identify the replacement address associated with a mailbox may
inadvertently disclose sensitive information. Sites that are inadvertently disclose sensitive information. Sites that are
concerned about those issues should ensure that they select and concerned about those issues should ensure that they select and
configure servers appropriately. configure servers appropriately.
7.8. Resistance to Attacks 7.8. Local Operational Requirement and Resistance to Attacks
In recent years, there has been an increase of attacks on SMTP In recent years, there has been an increase of attacks on SMTP
servers, either in conjunction with attempts to discover addresses servers, either in conjunction with attempts to discover addresses
for sending unsolicited messages or simply to make the servers for sending unsolicited messages or simply to make the servers
inaccessible to others (i.e., as an application-level denial of inaccessible to others (i.e., as an application-level denial of
service attack). While the means of doing so are beyond the scope of service attack). There may also be important local circumstances
this Standard, rational operational behavior requires that servers be that justify departures from some of the limits specified in this
permitted to detect such attacks and take action to defend documents especially ones involving maximums or minimums. While the
themselves. For example, if a server determines that a large number means of doing so are beyond the scope of this Standard, rational
of RCPT TO commands are being sent, most or all with invalid operational behavior requires that servers be permitted to detect
addresses, as part of such an attack, it would be reasonable for the such attacks and take action to defend themselves. For example, if a
server to close the connection after generating an appropriate number server determines that a large number of RCPT commands are being
of 5yz (normally 550) replies. sent, most or all with invalid addresses, as part of such an attack,
it would be reasonable for the server to close the connection after
generating an appropriate number of 5yz (normally 550) replies.
7.9. Scope of Operation of SMTP Servers 7.9. Scope of Operation of SMTP Servers
It is a well-established principle that an SMTP server may refuse to It is a well-established principle that an SMTP server may refuse to
accept mail for any operational or technical reason that makes sense accept mail for any operational or technical reason that makes sense
to the site providing the server. However, cooperation among sites to the site providing the server. However, cooperation among sites
and installations makes the Internet possible. If sites take and installations makes the Internet possible. If sites take
excessive advantage of the right to reject traffic, the ubiquity of excessive advantage of the right to reject traffic, the ubiquity of
email availability (one of the strengths of the Internet) will be email availability (one of the strengths of the Internet) will be
threatened; considerable care should be taken and balance maintained threatened; considerable care should be taken and balance maintained
skipping to change at page 83, line 46 skipping to change at page 84, line 24
registered only by standardization or by way of an RFC-documented, registered only by standardization or by way of an RFC-documented,
IESG-approved, Experimental protocol extension. The additional IESG-approved, Experimental protocol extension. The additional
clause name space is for identification and is not limited in clause name space is for identification and is not limited in
size: the IESG is encouraged to approve on the basis of clear size: the IESG is encouraged to approve on the basis of clear
documentation, actual use or strong signs that the clause will be documentation, actual use or strong signs that the clause will be
used, and a distinct requirement rather than preferences about the used, and a distinct requirement rather than preferences about the
properties of the clause itself. properties of the clause itself.
In addition, if additional trace header fields (i.e., in addition to In addition, if additional trace header fields (i.e., in addition to
Return-path and Received) are ever created, those trace fields MUST Return-path and Received) are ever created, those trace fields MUST
be added to the IANA registry established by BCP 90 (RFC 3864) [8] be added to the IANA registry established by BCP 90 (RFC 3864) [9]
for use with RFC 5322 [11]. for use with RFC 5322 [12].
9. Acknowledgments 9. Acknowledgments
Many people contributed to the development of RFCs 2821 and 5321. Many people contributed to the development of RFCs 2821 and 5321.
Those documents should be consulted for those acknowledgments. Those documents should be consulted for those acknowledgments.
Neither this document nor RFCs 2821 or 5321 would have been possible Neither this document nor RFCs 2821 or 5321 would have been possible
without the many contribution and insights of the late Jon Postel. without the many contribution and insights of the late Jon Postel.
Those contributions of course include the original specification of Those contributions of course include the original specification of
SMTP in RFC 821. A considerable quantity of text from RFC 821 still SMTP in RFC 821. A considerable quantity of text from RFC 821 still
appears in this document as do several of Jon's original examples appears in this document as do several of Jon's original examples
that have been updated only as needed to reflect other changes in the that have been updated only as needed to reflect other changes in the
specification. specification.
The following filed errata against RFC 5321 that were not rejected at The following filed errata against RFC 5321 that were not rejected at
the time of submission: Jasen Betts, Adrien de Croy Guillaume Fortin- the time of submission: Jasen Betts, Adrien de Croy Guillaume Fortin-
Debigare Roberto Javier Godoy, David Romerstein, Dominic Sayers, Debigare Roberto Javier Godoy, David Romerstein, Dominic Sayers,
Rodrigo Speller, Alessandro Vesely, and Brett Watson. In addition, Rodrigo Speller, Alessandro Vesely, and Brett Watson. Some of those
specific suggestions that led to corrections and improvements in individuals made additional suggestions after the EMAILCORE WG was
early versions of the current specification were received from Ned initiated. In addition to the above, several of whom continued to
Freed, Barry Leiba, Ivar Lumi, Pete Resnick, Hector Santos, Paul make other suggestons, specific suggestions that led to corrections
Smith and others. and improvements in early versions of the current specification were
received from Dave Crocker, Ned Freed, Arnt Gulbrandsen, Tony Hansen,
Barry Leiba, Ivar Lumi, Pete Resnick, Hector Santos, Paul Smith and
others.
chetti contributed an analysis that clarified the ABNF productions chetti contributed an analysis that clarified the ABNF productions
that implicitly reference other documents. that implicitly reference other documents.
[[CREF24: Some errata and comments after 2019-07-01 have not yet been
captured in this version of the draft. ]]
The EMAILCORE Working Group was chartered in September 2020 with The EMAILCORE Working Group was chartered in September 2020 with
Alexey Melnikov and Seth Blank and co-chairs. Without their Alexey Melnikov and Seth Blank as co-chairs. Todd Herr replaced Seth
leadership and technical contributions, this document would never Blank early in 2021. Without their leadership and technical
have been completed. contributions, this document would never have been completed.
10. References 10. References
10.1. Normative References 10.1. Normative References
[1] Bradner, S., "Key words for use in RFCs to Indicate [1] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
skipping to change at page 85, line 27 skipping to change at page 85, line 48
[5] Braden, R., Ed., "Requirements for Internet Hosts - [5] Braden, R., Ed., "Requirements for Internet Hosts -
Application and Support", STD 3, RFC 1123, Application and Support", STD 3, RFC 1123,
DOI 10.17487/RFC1123, October 1989, DOI 10.17487/RFC1123, October 1989,
<https://www.rfc-editor.org/info/rfc1123>. <https://www.rfc-editor.org/info/rfc1123>.
[6] Klensin, J., Freed, N., and K. Moore, "SMTP Service [6] Klensin, J., Freed, N., and K. Moore, "SMTP Service
Extension for Message Size Declaration", STD 10, RFC 1870, Extension for Message Size Declaration", STD 10, RFC 1870,
DOI 10.17487/RFC1870, November 1995, DOI 10.17487/RFC1870, November 1995,
<https://www.rfc-editor.org/info/rfc1870>. <https://www.rfc-editor.org/info/rfc1870>.
[7] Newman, C., "ESMTP and LMTP Transmission Types [7] Vaudreuil, G., "Enhanced Mail System Status Codes",
RFC 3463, DOI 10.17487/RFC3463, January 2003,
<https://www.rfc-editor.org/info/rfc3463>.
[8] Newman, C., "ESMTP and LMTP Transmission Types
Registration", RFC 3848, DOI 10.17487/RFC3848, July 2004, Registration", RFC 3848, DOI 10.17487/RFC3848, July 2004,
<https://www.rfc-editor.org/info/rfc3848>. <https://www.rfc-editor.org/info/rfc3848>.
[8] Klyne, G., Nottingham, M., and J. Mogul, "Registration [9] Klyne, G., Nottingham, M., and J. Mogul, "Registration
Procedures for Message Header Fields", BCP 90, RFC 3864, Procedures for Message Header Fields", BCP 90, RFC 3864,
DOI 10.17487/RFC3864, September 2004, DOI 10.17487/RFC3864, September 2004,
<https://www.rfc-editor.org/info/rfc3864>. <https://www.rfc-editor.org/info/rfc3864>.
[9] Hinden, R. and S. Deering, "IP Version 6 Addressing [10] Hinden, R. and S. Deering, "IP Version 6 Addressing
Architecture", RFC 4291, DOI 10.17487/RFC4291, February Architecture", RFC 4291, DOI 10.17487/RFC4291, February
2006, <https://www.rfc-editor.org/info/rfc4291>. 2006, <https://www.rfc-editor.org/info/rfc4291>.
[10] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax [11] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008, DOI 10.17487/RFC5234, January 2008,
<https://www.rfc-editor.org/info/rfc5234>. <https://www.rfc-editor.org/info/rfc5234>.
[11] Resnick, P., "Internet Message Format", RFC 5322, [12] Resnick, P., "Internet Message Format", RFC 5322,
September 2008. September 2008.
10.2. Informative References 10.2. Informative References
[12] Crocker, D., "STANDARD FOR THE FORMAT OF ARPA INTERNET [13] Crocker, D., "STANDARD FOR THE FORMAT OF ARPA INTERNET
TEXT MESSAGES", STD 11, RFC 822, DOI 10.17487/RFC0822, TEXT MESSAGES", STD 11, RFC 822, DOI 10.17487/RFC0822,
August 1982, <https://www.rfc-editor.org/info/rfc822>. August 1982, <https://www.rfc-editor.org/info/rfc822>.
[13] Butler, M., Postel, J., Chase, D., Goldberger, J., and J. [14] Butler, M., Postel, J., Chase, D., Goldberger, J., and J.
Reynolds, "Post Office Protocol: Version 2", RFC 937, Reynolds, "Post Office Protocol: Version 2", RFC 937,
DOI 10.17487/RFC0937, February 1985, DOI 10.17487/RFC0937, February 1985,
<https://www.rfc-editor.org/info/rfc937>. <https://www.rfc-editor.org/info/rfc937>.
[14] Postel, J. and J. Reynolds, "File Transfer Protocol", [15] Postel, J. and J. Reynolds, "File Transfer Protocol",
STD 9, RFC 959, DOI 10.17487/RFC0959, October 1985, STD 9, RFC 959, DOI 10.17487/RFC0959, October 1985,
<https://www.rfc-editor.org/info/rfc959>. <https://www.rfc-editor.org/info/rfc959>.
[15] Partridge, C., "Mail routing and the domain system", [16] Partridge, C., "Mail routing and the domain system",
STD 10, RFC 974, DOI 10.17487/RFC0974, January 1986, STD 10, RFC 974, DOI 10.17487/RFC0974, January 1986,
<https://www.rfc-editor.org/info/rfc974>. <https://www.rfc-editor.org/info/rfc974>.
[16] Partridge, C., "Duplicate messages and SMTP", RFC 1047, [17] Partridge, C., "Duplicate messages and SMTP", RFC 1047,
DOI 10.17487/RFC1047, February 1988, DOI 10.17487/RFC1047, February 1988,
<https://www.rfc-editor.org/info/rfc1047>. <https://www.rfc-editor.org/info/rfc1047>.
[17] Lambert, M., "PCMAIL: A distributed mail system for [18] Lambert, M., "PCMAIL: A distributed mail system for
personal computers", RFC 1056, DOI 10.17487/RFC1056, June personal computers", RFC 1056, DOI 10.17487/RFC1056, June
1988, <https://www.rfc-editor.org/info/rfc1056>. 1988, <https://www.rfc-editor.org/info/rfc1056>.
[18] Crispin, M., "Interactive Mail Access Protocol: Version [19] Crispin, M., "Interactive Mail Access Protocol: Version
2", RFC 1176, DOI 10.17487/RFC1176, August 1990, 2", RFC 1176, DOI 10.17487/RFC1176, August 1990,
<https://www.rfc-editor.org/info/rfc1176>. <https://www.rfc-editor.org/info/rfc1176>.
[19] Durand, A. and F. Dupont, "SMTP 521 Reply Code", RFC 1846, [20] Durand, A. and F. Dupont, "SMTP 521 Reply Code", RFC 1846,
DOI 10.17487/RFC1846, September 1995, DOI 10.17487/RFC1846, September 1995,
<https://www.rfc-editor.org/info/rfc1846>. <https://www.rfc-editor.org/info/rfc1846>.
[20] Galvin, J., Murphy, S., Crocker, S., and N. Freed, [21] Galvin, J., Murphy, S., Crocker, S., and N. Freed,
"Security Multiparts for MIME: Multipart/Signed and "Security Multiparts for MIME: Multipart/Signed and
Multipart/Encrypted", RFC 1847, DOI 10.17487/RFC1847, Multipart/Encrypted", RFC 1847, DOI 10.17487/RFC1847,
October 1995, <https://www.rfc-editor.org/info/rfc1847>. October 1995, <https://www.rfc-editor.org/info/rfc1847>.
[21] Klensin, J., Freed, N., Rose, M., Stefferud, E., and D. [22] Klensin, J., Freed, N., Rose, M., Stefferud, E., and D.
Crocker, "SMTP Service Extensions", STD 10, RFC 1869, Crocker, "SMTP Service Extensions", STD 10, RFC 1869,
DOI 10.17487/RFC1869, November 1995, DOI 10.17487/RFC1869, November 1995,
<https://www.rfc-editor.org/info/rfc1869>. <https://www.rfc-editor.org/info/rfc1869>.
[22] Myers, J. and M. Rose, "Post Office Protocol - Version 3", [23] Myers, J. and M. Rose, "Post Office Protocol - Version 3",
STD 53, RFC 1939, DOI 10.17487/RFC1939, May 1996, STD 53, RFC 1939, DOI 10.17487/RFC1939, May 1996,
<https://www.rfc-editor.org/info/rfc1939>. <https://www.rfc-editor.org/info/rfc1939>.
[23] De Winter, J., "SMTP Service Extension for Remote Message [24] De Winter, J., "SMTP Service Extension for Remote Message
Queue Starting", RFC 1985, DOI 10.17487/RFC1985, August Queue Starting", RFC 1985, DOI 10.17487/RFC1985, August
1996, <https://www.rfc-editor.org/info/rfc1985>. 1996, <https://www.rfc-editor.org/info/rfc1985>.
[24] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [25] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Extensions (MIME) Part One: Format of Internet Message
Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996,
<https://www.rfc-editor.org/info/rfc2045>. <https://www.rfc-editor.org/info/rfc2045>.
[25] Moore, K., "MIME (Multipurpose Internet Mail Extensions) [26] Moore, K., "MIME (Multipurpose Internet Mail Extensions)
Part Three: Message Header Extensions for Non-ASCII Text", Part Three: Message Header Extensions for Non-ASCII Text",
RFC 2047, DOI 10.17487/RFC2047, November 1996, RFC 2047, DOI 10.17487/RFC2047, November 1996,
<https://www.rfc-editor.org/info/rfc2047>. <https://www.rfc-editor.org/info/rfc2047>.
[26] Kille, S., "MIXER (Mime Internet X.400 Enhanced Relay): [27] Kille, S., "MIXER (Mime Internet X.400 Enhanced Relay):
Mapping between X.400 and RFC 822/MIME", RFC 2156, Mapping between X.400 and RFC 822/MIME", RFC 2156,
DOI 10.17487/RFC2156, January 1998, DOI 10.17487/RFC2156, January 1998,
<https://www.rfc-editor.org/info/rfc2156>. <https://www.rfc-editor.org/info/rfc2156>.
[27] Elz, R. and R. Bush, "Clarifications to the DNS [28] Elz, R. and R. Bush, "Clarifications to the DNS
Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997,
<https://www.rfc-editor.org/info/rfc2181>. <https://www.rfc-editor.org/info/rfc2181>.
[28] Freed, N. and K. Moore, "MIME Parameter Value and Encoded [29] Freed, N. and K. Moore, "MIME Parameter Value and Encoded
Word Extensions: Character Sets, Languages, and Word Extensions: Character Sets, Languages, and
Continuations", RFC 2231, DOI 10.17487/RFC2231, November Continuations", RFC 2231, DOI 10.17487/RFC2231, November
1997, <https://www.rfc-editor.org/info/rfc2231>. 1997, <https://www.rfc-editor.org/info/rfc2231>.
[29] Klensin, J., Ed., "Simple Mail Transfer Protocol", [30] Klensin, J., Ed., "Simple Mail Transfer Protocol",
RFC 2821, DOI 10.17487/RFC2821, April 2001, RFC 2821, DOI 10.17487/RFC2821, April 2001,
<https://www.rfc-editor.org/info/rfc2821>. <https://www.rfc-editor.org/info/rfc2821>.
[30] Freed, N., "SMTP Service Extension for Command [31] Freed, N., "SMTP Service Extension for Command
Pipelining", STD 60, RFC 2920, DOI 10.17487/RFC2920, Pipelining", STD 60, RFC 2920, DOI 10.17487/RFC2920,
September 2000, <https://www.rfc-editor.org/info/rfc2920>. September 2000, <https://www.rfc-editor.org/info/rfc2920>.
[31] Freed, N., "Behavior of and Requirements for Internet [32] Freed, N., "Behavior of and Requirements for Internet
Firewalls", RFC 2979, DOI 10.17487/RFC2979, October 2000, Firewalls", RFC 2979, DOI 10.17487/RFC2979, October 2000,
<https://www.rfc-editor.org/info/rfc2979>. <https://www.rfc-editor.org/info/rfc2979>.
[32] Vaudreuil, G., "SMTP Service Extensions for Transmission [33] Vaudreuil, G., "SMTP Service Extensions for Transmission
of Large and Binary MIME Messages", RFC 3030, of Large and Binary MIME Messages", RFC 3030,
DOI 10.17487/RFC3030, December 2000, DOI 10.17487/RFC3030, December 2000,
<https://www.rfc-editor.org/info/rfc3030>. <https://www.rfc-editor.org/info/rfc3030>.
[33] Moore, K., "Simple Mail Transfer Protocol (SMTP) Service [34] Moore, K., "Simple Mail Transfer Protocol (SMTP) Service
Extension for Delivery Status Notifications (DSNs)", Extension for Delivery Status Notifications (DSNs)",
RFC 3461, DOI 10.17487/RFC3461, January 2003, RFC 3461, DOI 10.17487/RFC3461, January 2003,
<https://www.rfc-editor.org/info/rfc3461>. <https://www.rfc-editor.org/info/rfc3461>.
[34] Vaudreuil, G., "Enhanced Mail System Status Codes",
RFC 3463, DOI 10.17487/RFC3463, January 2003,
<https://www.rfc-editor.org/info/rfc3463>.
[35] Moore, K. and G. Vaudreuil, "An Extensible Message Format [35] Moore, K. and G. Vaudreuil, "An Extensible Message Format
for Delivery Status Notifications", RFC 3464, for Delivery Status Notifications", RFC 3464,
DOI 10.17487/RFC3464, January 2003, DOI 10.17487/RFC3464, January 2003,
<https://www.rfc-editor.org/info/rfc3464>. <https://www.rfc-editor.org/info/rfc3464>.
[36] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION [36] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003,
<https://www.rfc-editor.org/info/rfc3501>. <https://www.rfc-editor.org/info/rfc3501>.
[37] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition [37] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition
skipping to change at page 90, line 5 skipping to change at page 90, line 23
[51] Levine, J. and M. Delany, "A "Null MX" No Service Resource [51] Levine, J. and M. Delany, "A "Null MX" No Service Resource
Record for Domains that Accept No Mail", September 2014, Record for Domains that Accept No Mail", September 2014,
<https://datatracker.ietf.org/doc/draft-ietf-appsawg- <https://datatracker.ietf.org/doc/draft-ietf-appsawg-
nullmx/>. nullmx/>.
[52] RFC Editor, "RFC Errata - RFC 5321", 2019, [52] RFC Editor, "RFC Errata - RFC 5321", 2019,
<https://www.rfc-editor.org/errata/rfc5321>. <https://www.rfc-editor.org/errata/rfc5321>.
Captured 2019-11-19 Captured 2019-11-19
[53] IANA, "SMTP Service Extensions", 2021,
<https://www.iana.org/assignments/mail-parameters/mail-
parameters.xhtml#mail-parameters-2>.
Notes in draft: RFC Editor: Please adjust date field to
reflect whatever you want for a registry that is updated
periodically. IANA: Please determine if the above URL is
a sufficiently stable reference and adjust as appropriate
if it is not.
Appendix A. TCP Transport Service Appendix A. TCP Transport Service
The TCP connection supports the transmission of 8-bit bytes. The The TCP connection supports the transmission of 8-bit bytes. The
SMTP data is 7-bit ASCII characters. Each character is transmitted SMTP data is 7-bit ASCII characters. Each character is transmitted
as an 8-bit byte with the high-order bit cleared to zero. Service as an 8-bit byte with the high-order bit cleared to zero. Service
extensions may modify this rule to permit transmission of full 8-bit extensions may modify this rule to permit transmission of full 8-bit
data bytes as part of the message body, or, if specifically designed data bytes as part of the message body, or, if specifically designed
to do so, in SMTP commands or responses. to do so, in SMTP commands or responses.
Appendix B. Generating SMTP Commands from RFC 822 Header Fields Appendix B. Generating SMTP Commands from RFC 822 Header Fields
skipping to change at page 90, line 39 skipping to change at page 91, line 39
generated as follows: generated as follows:
1. Each recipient address from a TO, CC, or BCC header field SHOULD 1. Each recipient address from a TO, CC, or BCC header field SHOULD
be copied to a RCPT command (generating multiple message copies be copied to a RCPT command (generating multiple message copies
if that is required for queuing or delivery). This includes any if that is required for queuing or delivery). This includes any
addresses listed in a RFC 822 "group". Any BCC header fields addresses listed in a RFC 822 "group". Any BCC header fields
SHOULD then be removed from the header section. Once this SHOULD then be removed from the header section. Once this
process is completed, the remaining header fields SHOULD be process is completed, the remaining header fields SHOULD be
checked to verify that at least one TO, CC, or BCC header field checked to verify that at least one TO, CC, or BCC header field
remains. If none do, then a BCC header field with no additional remains. If none do, then a BCC header field with no additional
information SHOULD be inserted as specified in [11]. information SHOULD be inserted as specified in [12].
2. The return address in the MAIL command SHOULD, if possible, be 2. The return address in the MAIL command SHOULD, if possible, be
derived from the system's identity for the submitting (local) derived from the system's identity for the submitting (local)
user, and the "From:" header field otherwise. If there is a user, and the "From:" header field otherwise. If there is a
system identity available, it SHOULD also be copied to the Sender system identity available, it SHOULD also be copied to the Sender
header field if it is different from the address in the From header field if it is different from the address in the From
header field. (Any Sender header field that was already there header field. (Any Sender header field that was already there
SHOULD be removed.) Systems may provide a way for submitters to SHOULD be removed.) Systems may provide a way for submitters to
override the envelope return address, but may want to restrict override the envelope return address, but may want to restrict
its use to privileged users. This will not prevent mail forgery, its use to privileged users. This will not prevent mail forgery,
skipping to change at page 91, line 50 skipping to change at page 92, line 50
from the material in RFC 821 to prevent server actions that might from the material in RFC 821 to prevent server actions that might
confuse clients or subsequent servers that do not expect a full confuse clients or subsequent servers that do not expect a full
source route implementation. source route implementation.
Historically, for relay purposes, the forward-path may have been a Historically, for relay purposes, the forward-path may have been a
source route of the form "@ONE,@TWO:JOE@THREE", where ONE, TWO, and source route of the form "@ONE,@TWO:JOE@THREE", where ONE, TWO, and
THREE MUST be fully-qualified domain names. This form was used to THREE MUST be fully-qualified domain names. This form was used to
emphasize the distinction between an address and a route. The emphasize the distinction between an address and a route. The
mailbox (here, JOE@THREE) is an absolute address, and the route is mailbox (here, JOE@THREE) is an absolute address, and the route is
information about how to get there. The two concepts should not be information about how to get there. The two concepts should not be
confused. [[CREF25: [5321bis]JcK 20090123: Tightened this and the confused.
next paragraph to be clear that this doesn't authorize source route
use.]]
If source routes are used contrary to requirements and If source routes are used contrary to requirements and
recommendations elsewhere in this specfiication, RFC 821 and the text recommendations elsewhere in this specfiication, RFC 821 and the text
below should be consulted for the mechanisms for constructing and below should be consulted for the mechanisms for constructing and
updating the forward-path. A server that is reached by means of a updating the forward-path. A server that is reached by means of a
source route (e.g., its domain name appears first in the list in the source route (e.g., its domain name appears first in the list in the
forward-path) MUST remove its domain name from any forward-paths in forward-path) MUST remove its domain name from any forward-paths in
which that domain name appears before forwarding the message and MAY which that domain name appears before forwarding the message and MAY
remove all other source routing information. The reverse-path SHOULD remove all other source routing information. The reverse-path SHOULD
NOT be updated by servers conforming to this specification. NOT be updated by servers conforming to this specification.
Notice that the forward-path and reverse-path appear in the SMTP Notice that the forward-path and reverse-path appear in the SMTP
commands and replies, but not necessarily in the message. That is, commands and replies, but not necessarily in the message. That is,
there is no need for these paths and especially this syntax to appear there is no need for these paths and especially this syntax to appear
in the "To:" , "From:", "CC:", etc. fields of the message header in the "To:" , "From:", "CC:", etc. fields of the message header
section. Conversely, SMTP servers MUST NOT derive final message section. Conversely, SMTP servers MUST NOT derive final message
routing information from message header fields. routing information from message header fields.
When the list of hosts is present despite the recommendations and When the list of hosts is present despite the recommendations and
requirements [[CREF26: [5321bis]JcK 20090123 "and requrements" requirements above, it is a "reverse" source route and indicates that
added]] above, it is a "reverse" source route and indicates that the the mail was relayed through each host on the list (the first host in
mail was relayed through each host on the list (the first host in the the list was the most recent relay). This list is used as a source
list was the most recent relay). This list is used as a source route route to return non-delivery notices to the sender. If, contrary to
to return non-delivery notices to the sender. If, contrary to the the recommendations here, a relay host adds itself to the beginning
recommendations here, a relay host adds itself to the beginning of of the list, it MUST use its name as known in the transport
the list, it MUST use its name as known in the transport environment environment to which it is relaying the mail rather than that of the
to which it is relaying the mail rather than that of the transport transport environment from which the mail came (if they are
environment from which the mail came (if they are different). Note different). Note that a situation could easily arise in which some
that a situation could easily arise in which some relay hosts add relay hosts add their names to the reverse source route and others do
their names to the reverse source route and others do not, generating not, generating discontinuities in the routing list. This is another
discontinuities in the routing list. This is another reason why reason why servers needing to return a message SHOULD ignore the
servers needing to return a message SHOULD ignore the source route source route entirely and simply use the domain as specified in the
entirely and simply use the domain as specified in the Mailbox. Mailbox.
Appendix D. Scenarios Appendix D. Scenarios
This section presents complete scenarios of several types of SMTP This section presents complete scenarios of several types of SMTP
sessions. In the examples, "C:" indicates what is said by the SMTP sessions. In the examples, "C:" indicates what is said by the SMTP
client, and "S:" indicates what is said by the SMTP server. client, and "S:" indicates what is said by the SMTP server.
D.1. A Typical SMTP Transaction Scenario D.1. A Typical SMTP Transaction Scenario
This SMTP example shows mail sent by Smith at host bar.com, and to This SMTP example shows mail sent by Smith at host bar.com, and to
skipping to change at page 96, line 28 skipping to change at page 97, line 28
Appendix F. Deprecated Features of RFC 821 Appendix F. Deprecated Features of RFC 821
A few features of RFC 821 have proven to be problematic and SHOULD A few features of RFC 821 have proven to be problematic and SHOULD
NOT be used in Internet mail. Some of these features were deprecated NOT be used in Internet mail. Some of these features were deprecated
in RFC 2821 in 2001; source routing and two-digit years in dates were in RFC 2821 in 2001; source routing and two-digit years in dates were
deprecated by RFC 1123 in 1989. Of the domain literal forms, RFC deprecated by RFC 1123 in 1989. Of the domain literal forms, RFC
1123 required support only for the dotted decimal form. With the 1123 required support only for the dotted decimal form. With the
possible exception of old, hardware-embedded, applications, there is possible exception of old, hardware-embedded, applications, there is
no longer any excuse for these features to appear on the contemporary no longer any excuse for these features to appear on the contemporary
Internet. [[CREF27: [5321bis] (2821ter) 2821bis Last Call Comment]] Internet.
F.1. TURN F.1. TURN
This command, described in RFC 821, raises important security issues This command, described in RFC 821, raises important security issues
since, in the absence of strong authentication of the host requesting since, in the absence of strong authentication of the host requesting
that the client and server switch roles, it can easily be used to that the client and server switch roles, it can easily be used to
divert mail from its correct destination. Its use is deprecated; divert mail from its correct destination. Its use is deprecated;
SMTP systems SHOULD NOT use it unless the server can authenticate the SMTP systems SHOULD NOT use it unless the server can authenticate the
client. client.
skipping to change at page 100, line 24 skipping to change at page 101, line 24
generally? generally?
This may interact with Erratum 4055 and Ticket #30 below. This may interact with Erratum 4055 and Ticket #30 below.
G.5. Remove or deprecate the work-around from code 552 to 452 G.5. Remove or deprecate the work-around from code 552 to 452
The suggestion in Section 4.5.3.1.10 may have outlived its usefulness The suggestion in Section 4.5.3.1.10 may have outlived its usefulness
and/or be inconsistent with current practice. Should it be removed and/or be inconsistent with current practice. Should it be removed
and/or explicitly deprecated? and/or explicitly deprecated?
Ticket #5. Ticket #5.
SHOULD requirement removed.
G.6. Clarify where the protocol stands with respect to submission and G.6. Clarify where the protocol stands with respect to submission and
TLS issues TLS issues
1. submission on port 587 1. submission on port 587
2. submission on port 465 2. submission on port 465
3. TLS relay on a port different from 25 (whenever) 3. TLS relay on a port different from 25 (whenever)
4. Recommendations about general use of transport layer (hop by hop) 4. Recommendations about general use of transport layer (hop by hop)
security, particularly encryption including consideration of RFC security, particularly encryption including consideration of RFC
8314. 8314.
G.7. Probably-substantive Discussion Topics Identified in Other Ways G.7. Probably-substantive Discussion Topics Identified in Other Ways
The following issues were identified as a group in the opening Note The following issues were identified as a group in the opening Note
but called out specifically only in embedded CREF comments in earlier but called out specifically only in embedded CREF comments in
(-00 and -01) versions of this draft. versions of this draft prior to the first EMAILCORE version.
G.7.1. Issues with 521, 554, and 556 codes G.7.1. Issues with 521, 554, and 556 codes
See new Section 4.2.4.2. More text may be needed, there or See new Section 4.2.4.2. More text may be needed, there or
elsewhere, about choices of codes in response to initial opening and elsewhere, about choices of codes in response to initial opening and
to EHLO, especially to deal with selective policy rejections. to EHLO, especially to deal with selective policy rejections.
Ticket #6. Ticket #6.
G.7.2. SMTP Model, terminology, and relationship to RFC 5598 G.7.2. SMTP Model, terminology, and relationship to RFC 5598
CREF comment in Section 2 and also CREF comment in Section 2.3.10 CREF comment in Section 2, CREF comment in Section 2.3.10, and
comments in the introductory portion of Appendix G.
G.7.3. Resolvable FQDNs and private domain names G.7.3. Resolvable FQDNs and private domain names
Multiple CREF comments in Section 2.3.5 Multiple CREF comments in Section 2.3.5
Tickets #9, #10 and #41. Tickets #9, #10 and #41.
Ticket #41 marked "closed no change", per email 2021-0405.
G.7.4. Possible clarification about mail transactions and transaction G.7.4. Possible clarification about mail transactions and transaction
state state
CREF comment in Section 3.3 and also reference in Section 4.1.4 CREF comment in Section 3.3 and also reference in Section 4.1.4
Ticket #11. Ticket #11.
[[CREF16: See correspondence on this ticket 2021-07-06 through
2021-07-09.]]
G.7.5. Issues with mailing lists, aliases, and forwarding G.7.5. Issues with mailing lists, aliases, and forwarding
CREF comment in Section 3.9. May also want to note forwarding as an CREF comment in Section 3.9. May also want to note forwarding as an
email address portability issue. Note that, if changes are made in email address portability issue. Note that, if changes are made in
this area, they should be kept consistent with the description and this area, they should be kept consistent with the description and
discussion of the 251 and 551 in Section 4.2 and Section 3.5 as well discussion of the 251 and 551 in Section 4.2 and Section 3.5 as well
as Section 3.4 to avoid introducing inconsistencies. In addition, as Section 3.4 to avoid introducing inconsistencies. In addition,
there are some terminology issues about the use of the term "lists", there are some terminology issues about the use of the term "lists",
identified in erratum 1820, that should be reviewed after any more identified in erratum 1820, that should be reviewed after any more
substantive changes are made to the relevant sections. substantive changes are made to the relevant sections.
skipping to change at page 101, line 42 skipping to change at page 102, line 48
G.7.6. Requirements for domain name and/or IP address in EHLO G.7.6. Requirements for domain name and/or IP address in EHLO
CREF comment in Section 4.1.4 CREF comment in Section 4.1.4
Ticket #19. Ticket #19.
G.7.7. Does the 'first digit only' and/or non-listed reply code text G.7.7. Does the 'first digit only' and/or non-listed reply code text
need clarification? need clarification?
Resolved. Text in Section 4.2 changed 2021-02-08 and CREF comment in Resolved. Text in Section 4.2 changed 2021-02-08 and CREF comment in
Section 4.3.1 removed. Section 4.3.1 removed.
Perhaps unresolved -- ongoing discussion on mailing list after IETF
110.
Ticket #13. Ticket #13.
G.7.8. Size limits G.7.8. Size limits
Once a decision is made about line length rules for RFC 5322bis, Once a decision is made about line length rules for RFC 5322bis,
review the size limit discussions in this document, particularly the review the size limit discussions in this document, particularly the
CREF comment (Note in Draft) at the end of the introductory material CREF comment (Note in Draft) at the end of the introductory material
to Section 4.5.3 to be sure this document says what we want it to to Section 4.5.3 to be sure this document says what we want it to
say. say. (See the additional question about minimum quantities, etc., in
Appendix G.7.19.)
Ticket #14 and maybe Ticket #38. Ticket #14 and maybe Ticket #38.
G.7.9. Discussion of 'blind' copies and RCPT G.7.9. Discussion of 'blind' copies and RCPT
CREF comment in Section 7.2. May also need to discussion whether CREF comment in Section 7.2. May also need to discussion whether
that terminology is politically incorrect and suggest a replacement. that terminology is politically incorrect and suggest a replacement.
Ticket #15. Ticket #15.
G.7.10. Further clarifications needed to source routes? G.7.10. Further clarifications needed to source routes?
skipping to change at page 102, line 46 skipping to change at page 104, line 12
qualifying language be added? qualifying language be added?
Ticket #16. Ticket #16.
G.7.13. Possible SEND, SAML, SOML Loose End G.7.13. Possible SEND, SAML, SOML Loose End
Per discussion (and Ticket #20), the text about SEND, SAML, and SOML Per discussion (and Ticket #20), the text about SEND, SAML, and SOML
has been removed from the main body of the document so that the only has been removed from the main body of the document so that the only
discussion of them now appears in Appendix F.6. Per the editor's discussion of them now appears in Appendix F.6. Per the editor's
note in that appendix, is any further discussion needed? note in that appendix, is any further discussion needed?
G.7.14. Abstract Update
Does the Abstract need to be modified in the light of RFC 6409 or
other changes?
G.7.15. Informative References to MIME and/or Message Submission
Should RFC 2045 (MIME) and/or RFC 6409 (Message Submission) be
referenced at the end of Section 1.2?
G.7.16. Mail Transaction Discussion
Does the discussion of mail transactions need more work (see CREF in
Section 3.3.)?
G.7.17. Hop-by-hop Authentication and/or Encryption
Should this document discuss hop-by-hop authentication or, for that
matter, encryption? (See CREF in Section 2.)
G.7.18. More Text About 554 Given 521, etc.
Does reply code 554 need additional or different explanation in the
light of the addition of the new 521 code and/or the new (in 5321bis
Section 4.2.4.2? (See CREF in Section 4.2.3.)
G.7.19. Minimum Lengths and Quantities
Are the minimum lengths and quantities specified in Section 4.5.3
still appropriate or do they need adjusting? (See CREF at the
beginning of that section.) Also note potential interaction with the
proposed LIMITS SMTP extension (draft-freed-smtp-limits) which may
make this question OBE.
G.8. Enhanced Reply Codes and DSNs G.8. Enhanced Reply Codes and DSNs
Enhanced Mail System Status Codes [34] were added to SMTP before RFC Enhanced Mail System Status Codes (RFC 3463) [7] were added to SMTP
5321 was published and are now, together with a corresponding before RFC 5321 was published and are now, together with a
registry [46], widely deployed and in extensive use in the network. corresponding registry [46], widely deployed and in extensive use in
Similar, the structure and extensions options for Delivery Status the network. Similar, the structure and extensions options for
Notifications [35] is implemented, deployed, and in wide use. Is it Delivery Status Notifications [35] is implemented, deployed, and in
time to fold all or part of those mature specifications into the SMTP wide use. Is it time to fold all or part of those mature
spec or at least to mention and normatively reference them? And, as specifications into the SMTP spec or at least to mention and
an aside, do those specs need work or, if they are kept separate, is normatively reference them? And, as an aside, do those specs need
it time to move them to Internet Standard? work or, if they are kept separate, is it time to move them to
Internet Standard?
At least one of the current references to RFC 3463 indicates that it
SHOULD be used. That presumably makes the reference normative
because one needs that specification to know what the present
document requires. It has been moved in the -03 version of this
draft, but, unless it is move to Internet Standard, it will require
downref treatment.
G.9. Revisiting Quoted Strings G.9. Revisiting Quoted Strings
Recent discussions both in and out of the IETF have highlighted Recent discussions both in and out of the IETF have highlighted
instances of non-compliance with the specification of a Local-part instances of non-compliance with the specification of a Local-part
consisting of a Quoted-string, whether any content of QcontentSMTP consisting of a Quoted-string, whether any content of QcontentSMTP
that actually requires special treatment consists of qtextSMTP, that actually requires special treatment consists of qtextSMTP,
quoted-pairSMTP, or both. Section 4.1.2 (of RFC 5321, repeated quoted-pairSMTP, or both. Section 4.1.2 (of RFC 5321, repeated
above) ends with a few paragraphs of warnings (essentially a partial above) ends with a few paragraphs of warnings (essentially a partial
applicability statement), the first of which cautions against applicability statement), the first of which cautions against
skipping to change at page 105, line 18 skipping to change at page 107, line 23
The FOR clause in time-stamp ("Received:") fields is seriously under- The FOR clause in time-stamp ("Received:") fields is seriously under-
defined. It is optional, the syntax is clear, but its semantics and defined. It is optional, the syntax is clear, but its semantics and
use, while perhaps obvious from content and the application of common use, while perhaps obvious from content and the application of common
sense, have never been defined ("never" going back to 821). Do we sense, have never been defined ("never" going back to 821). Do we
want to better define it? Is there any chance that a definition want to better define it? Is there any chance that a definition
would invalid existing, conforming and sensible, implementations? If would invalid existing, conforming and sensible, implementations? If
we do want to define semantics, draft text and advice as to where it we do want to define semantics, draft text and advice as to where it
should go are invited. should go are invited.
Note the existing discussions in Section 7.2 and Section 7.6 as they Note the existing discussions in Section 7.2 and Section 7.6 as they
may need adjustment, or at least cross-references, if FOR is more may need adjustment, or at least cross-references, especially if FOR
precisely defined. is more precisely defined.
There is probably an error in Section 7.6. Its last sentence implies There is probably an error in Section 7.6. Its last sentence implies
a possible interaction between messages with multiple recipients and a possible interaction between messages with multiple recipients and
the FOR clause of trace fields. However, because the syntax of the the FOR clause of trace fields. However, because the syntax of the
FOR clause only allows one Mailbox (or Path), it isn't clear if that FOR clause only allows one Mailbox (or Path), it isn't clear if that
statement is meaningful. Should it be revised to discuss other statement is meaningful. Should it be revised to discuss other
situations in which including FOR might not be desirable from a situations in which including FOR might not be desirable from a
security or privacy standpoint? security or privacy standpoint?
G.15. Resistance to Attacks and Operational Necessity
Section 7.8 is often cited as allowing an exception to the rules of
the specification for reasons of operational necessity, not just
attack resistance. I (JcK) believe the broader interpretation was
intended by YAM (the section was new in RFC 5321). Recommendation:
change the title to explicitly include "Local Operational
Requirements" and add text to indicate that attack resistance is not
the only possible source of such requirements.
Appendix H. RFC 5321 Errata Summary and Tentative Change Log Appendix H. RFC 5321 Errata Summary and Tentative Change Log
[[RFC Editor: Please remove this section before publication.]] [[RFC Editor: Please remove this section before publication.]]
H.1. RFC 5321 Errata Summary H.1. RFC 5321 Errata Summary
This document addresses the following errata filed against RFC 5321 This document addresses the following errata filed against RFC 5321
since its publication in October 2008 [52]. As with the previous since its publication in October 2008 [52]. As with the previous
appendix, ticket numbers included below reference appendix, ticket numbers included below reference
https://trac.ietf.org/trac/emailcore/report/1 . [[CREF28: [[Note in https://trac.ietf.org/trac/emailcore/report/1 . [[CREF17: [[Note in
Draft: Items with comments below have not yet been resolved as Draft: Items with comments below have not yet been resolved as
errata. As of the end of November 2020, none of them have been errata. As of the end of November 2020, none of them have been
checked and verified by the emailcore WG.]]]]. checked and verified by the emailcore WG.]]]].
1683 ABNF error. Section 4.4 1683 ABNF error. Section 4.4
Ticket #23. Ticket #23.
4198 Description error. Section 4.2. 4198 Description error. Section 4.2.
RESOLVED, ticket #24, 2020-12-14. RESOLVED, ticket #24, 2020-12-14.
2578 Syntax description error. Section 4.1.2 2578 Syntax description error. Section 4.1.2
1543 Wrong code in description Section 3.8 1543 Wrong code in description Section 3.8
Ticket #26 Ticket #26
4315 ABNF - IPv6 Section 4.1.3. [[CREF29: [5321bis]The IPv6 syntax 4315 ABNF - IPv6 Section 4.1.3. [[CREF18: [5321bis]The IPv6 syntax
has been adjusted since 5321 was published. See the rewritten has been adjusted since 5321 was published. See the rewritten
form and the comment in the section cited in the previous form and the comment in the section cited in the previous
sentence. The editor awaits instructions. See https://www.rfc- sentence. The editor awaits instructions. See https://www.rfc-
editor.org/errata/eid4315]] editor.org/errata/eid4315]]
Ticket #27. Ticket #27.
5414 ABNF for Quoted-string Section 4.1.2 5414 ABNF for Quoted-string Section 4.1.2
Ticket #22. Ticket #22.
1851 Location of text on unexpected close Section 4.1.1.5. Text 1851 Location of text on unexpected close Section 4.1.1.5. Text
moved per email 2020-12-31. moved per email 2020-12-31.
Ticket #28. Ticket #28.
3447 Use of normative language (e.g., more "MUST"s), possible 3447 Use of normative language (e.g., more "MUST"s), possible
confusion in some sections Section 4.4. [[CREF30: [5321bis]As confusion in some sections Section 4.4. [[CREF19: [5321bis]As
Barry notes in his verifier comments on the erratum (see Barry notes in his verifier comments on the erratum (see
https://www.rfc-editor.org/errata/eid3447), the comments and https://www.rfc-editor.org/errata/eid3447), the comments and
suggestions here raise a number of interesting (and difficult) suggestions here raise a number of interesting (and difficult)
issues. One of the issues is that the core of RFCs 5321 (and issues. One of the issues is that the core of RFCs 5321 (and
2821) is text carried over from Jon Postel's RFC 821, a document 2821) is text carried over from Jon Postel's RFC 821, a document
that was not only written in a different style than the IETF uses that was not only written in a different style than the IETF uses
today but that was written at a time when no one had dreamt of RFC today but that was written at a time when no one had dreamt of RFC
2119 or even the IETF itself. It appears to me that trying to 2119 or even the IETF itself. It appears to me that trying to
patch that style might easily result in a document that is harder patch that style might easily result in a document that is harder
to read as well as being error prone. If we want to get the to read as well as being error prone. If we want to get the
document entirely into contemporary style, we really should bite document entirely into contemporary style, we really should bite
the bullet and do a complete rewrite. To respond to a different the bullet and do a complete rewrite. To respond to a different
point in Barry's discussion, I think an explicit statement that point in Barry's discussion, I think an explicit statement that
5321/5322 and their predecessors differ in places and why would be 5321/5322 and their predecessors differ in places and why would be
helpful. Text, and suggestions about where to put it, are helpful. Text, and suggestions about where to put it, are
solicited. A list of differences might be a good idea too, but solicited. A list of differences might be a good idea too, but
getting it right might be more work than there is available energy getting it right might be more work than there is available energy
to do correctly. ]] to do correctly. ]]
5711 Missing leading spaces in example Appendix D.3. [[CREF31: 5711 Missing leading spaces in example Appendix D.3. [[CREF20:
[5321bis]Well, this is interesting because the XML is correct and [5321bis]Well, this is interesting because the XML is correct and
the spaces are there, embedded in artwork. So either the XML2RFC the spaces are there, embedded in artwork. So either the XML2RFC
processor at the time took those leading spaces out or the RFC processor at the time took those leading spaces out or the RFC
Editor improved on the document and the change was not caught in Editor improved on the document and the change was not caught in
AUTH48, perhaps because rfcdiff ignores white space. We just need AUTH48, perhaps because rfcdiff ignores white space. We just need
to watch for future iterations. ]] to watch for future iterations. ]]
Ticket #29. As of 2021-03-15, both the txt and html-ized versions of draft-
ietf-emailcore-rfc5321bis-02 were showing identical output for
both parts of the example, so the problem appears to be OBE at
worst.
Ticket #29 (closed 2021-03-16)
4055 Erratum claims the the description of SPF and DKIM is wrong. 4055 Erratum claims the the description of SPF and DKIM is wrong.
It is not clear what 5321bis should really say about them, but the It is not clear what 5321bis should really say about them, but the
current text probably needs work (or dropping, which is what the current text probably needs work (or dropping, which is what the
proposed erratum suggests). See 5321bis Editor's Note in proposed erratum suggests). See 5321bis Editor's Note in
Section 3.6.2. Section 3.6.2.
Ticket #30. Ticket #30.
[[CREF32: [5321bis]Note that rejected errata have _not_ been reviewed [[CREF21: [5321bis]Note that rejected errata have _not_ been reviewed
to see if they contain anything useful that should be discussed again to see if they contain anything useful that should be discussed again
with the possibility of rethinking and changing text. Volunteers with the possibility of rethinking and changing text. Volunteers
sought.]] sought.]]
H.2. Changes from RFC 5321 (published October 2008) to the initial H.2. Changes from RFC 5321 (published October 2008) to the initial
(-00) version of this draft (-00) version of this draft
o Acknowledgments section (Section 9) trimmed back for new document. o Acknowledgments section (Section 9) trimmed back for new document.
o Introductory paragraph to Appendix F extended to make it clear o Introductory paragraph to Appendix F extended to make it clear
skipping to change at page 110, line 36 skipping to change at page 113, line 22
o Moved paragraph per ticket #28, erratum 1851. o Moved paragraph per ticket #28, erratum 1851.
o Added more clarifying cross-references, clarified some CREFs, and o Added more clarifying cross-references, clarified some CREFs, and
cleaned out some of those that no longer seemed relevant. cleaned out some of those that no longer seemed relevant.
o Removed "updates 1123" is unnecessary and obsolete. o Removed "updates 1123" is unnecessary and obsolete.
o Updated several references. o Updated several references.
H.3.7. Changes from draft-ietf-emailcore-rfc5321bis-02 (2021-02-21) to
-03
o Editorial: Fixed some instances of constructions like "RCPT TO
command". The name of the command is RCPT. Sloppy editing in
2008.
o Added text and cross-references to clarify the role of 452 and 552
in "too many recipients" situations.
o Added Appendix G.15 to discuss changes to better reflect
"operational necessity" issue.
o Added detail for erratum 5711, ticket #29.
o Added new subsections of Appendix G.7 to keep some previously-
unnoted CREF notes from getting lost. Also removed some CREFs
that were notes on changes made before the WG was created or
appeared to no longer have value and trimmed or rewrote some of
the remaining ones.
o More discussion of Ticket #13, See Appendix G.7.7.
o Identified Ticket #41 as closed. See Appendix Appendix G.7.3;
notes removed from Section 2.3.5.
o "SHOULD" requirement for interpreting 552 "too many recipients"
removed from Section 4.5.3.1.10, explanation added, and text
cleaned up. Also removed the parenthetical historical notes on
the return code definitions in Section 4.2. See Appendix G.5.
(Ticket #5)
o Modified Appendix G.8 to add a note about the normative status of
RFC 3463 and moved that reference.
o Several clarifications to initiation and termination of mail
transactions in Section 4.1.4.
o Several additional minor editorial improvements.
o Note for this particular draft only: Notes were posted to the list
on 2021-07-09 about tickets #7, #10, #14, #19, #20, $30, and #42.
Even though some comments about them appeared in the subsequent
day or so, there appears to have been insufficient time for
discussions to stabilize sufficiently for changes to be included
in this version of the I-D.
Index Index
A A
Argument Syntax Argument Syntax
A-d-l 43 A-d-l 43
Additional-Registered-Clauses 63 Additional-Registered-Clauses 64
address-literal 43 address-literal 44
Addtl-Link 64 Addtl-Link 64
Addtl-Protocol 64 Addtl-Protocol 64
ALPHA 42 ALPHA 43
Argument 43 Argument 43
At-domain 43 At-domain 43
atext 43 atext 43
Atom 44 Atom 44
By-domain 63 By-domain 63
CFWS 43 CFWS 43
CRLF 42 CRLF 43
dcontent 45 dcontent 46
DIGIT 42 DIGIT 43
Domain 43 Domain 43
Dot-string 44 Dot-string 44
esmtp-keyword 43 esmtp-keyword 43
esmtp-param 43 esmtp-param 43
esmtp-value 43 esmtp-value 43
Extended-Domain 63 Extended-Domain 63
For 63 For 63
Forward-Path 43 Forward-Path 43
From-domain 63 From-domain 63
FWS 43 FWS 43
General-address-literal 45 General-address-literal 46
Greeting 49 Greeting 49
h16 46 h16 46
HEXDIG 42 HEXDIG 43
ID 63 ID 63
IPv4-address-literal 45 IPv4-address-literal 45
IPv6-addr 46 IPv6-addr 46
IPv6-address-literal 45 IPv6-address-literal 46
Keyword 43 Keyword 43
Ldh-str 43 Ldh-str 44
Let-dig 43 Let-dig 44
Link 63 Link 64
Local-part 44 Local-part 44
ls32 46 ls32 46
Mail-parameters 43 Mail-parameters 43
Mailbox 43 Mailbox 44
Opt-info 63 Opt-info 63
Path 43 Path 43
Protocol 64 Protocol 64
QcontentSMTP 44 QcontentSMTP 44
qtextSMTP 44 qtextSMTP 44
quoted-pairSMTP 44 quoted-pairSMTP 44
Quoted-string 44 Quoted-string 44
Rcpt-parameters 43 Rcpt-parameters 43
Reply-code 49 Reply-code 49
Reply-line 49 Reply-line 49
Return-path-line 63 Return-path-line 63
Reverse-Path 43 Reverse-Path 43
Snum 46 Snum 46
SP 42 SP 43
Stamp 63 Stamp 63
Standardized-tag 45 Standardized-tag 46
String 44 String 44
sub-domain 43 sub-domain 43
TCP-info 63 TCP-info 63
textstring 49 textstring 49
Time-stamp-line 63 Time-stamp-line 63
Via 63 Via 63
With 63 With 63
C C
Command Syntax Command Syntax
data 40 data 40
ehlo 20, 35 ehlo 20, 35
expn 41 expn 41
helo 35 helo 35
help 41 help 41
mail 37 mail 37
noop 41 noop 42
quit 42 quit 42
rcpt 38 rcpt 39
rset 40 rset 40
send, saml, soml 102 send, saml, soml 104
vrfy 40 vrfy 41
Author's Address Author's Address
John C. Klensin John C. Klensin
1770 Massachusetts Ave, Suite 322 1770 Massachusetts Ave, Suite 322
Cambridge, MA 02140 Cambridge, MA 02140
USA USA
EMail: john-ietf@jck.com EMail: john-ietf@jck.com
 End of changes. 200 change blocks. 
359 lines changed or deleted 498 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/