Network Working Group J. Klensin
Request for Comments: 5321 October 2008
Obsoletes: 2821
Updates: 1123
Category: Standards Track
Simple Mail Transfer Protocol
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
This document is a specification of the basic protocol for Internet
electronic mail transport. It consolidates, updates, and clarifies
several previous documents, making all or parts of most of them
obsolete. It covers the SMTP extension mechanisms and best practices
for the contemporary Internet, but does not provide details about
particular extensions. Although SMTP was designed as a mail
transport and delivery protocol, this specification also contains
information that is important to its use as a "mail submission"
protocol for "split-UA" (User Agent) mail reading systems and mobile
environments.
Klensin Standards Track [Page 1]
RFC 5321 SMTP October 2008
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1. Transport of Electronic Mail . . . . . . . . . . . . . . . 5
1.2. History and Context for This Document . . . . . . . . . . 5
1.3. Document Conventions . . . . . . . . . . . . . . . . . . . 6
2. The SMTP Model . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1. Basic Structure . . . . . . . . . . . . . . . . . . . . . 7
2.2. The Extension Model . . . . . . . . . . . . . . . . . . . 9
2.2.1. Background . . . . . . . . . . . . . . . . . . . . . . 9
2.2.2. Definition and Registration of Extensions . . . . . . 10
2.2.3. Special Issues with Extensions . . . . . . . . . . . . 11
2.3. SMTP Terminology . . . . . . . . . . . . . . . . . . . . . 11
2.3.1. Mail Objects . . . . . . . . . . . . . . . . . . . . . 11
2.3.2. Senders and Receivers . . . . . . . . . . . . . . . . 12
2.3.3. Mail Agents and Message Stores . . . . . . . . . . . . 12
2.3.4. Host . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.5. Domain Names . . . . . . . . . . . . . . . . . . . . . 13
2.3.6. Buffer and State Table . . . . . . . . . . . . . . . . 14
2.3.7. Commands and Replies . . . . . . . . . . . . . . . . . 14
2.3.8. Lines . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.9. Message Content and Mail Data . . . . . . . . . . . . 15
2.3.10. Originator, Delivery, Relay, and Gateway Systems . . . 15
2.3.11. Mailbox and Address . . . . . . . . . . . . . . . . . 15
2.4. General Syntax Principles and Transaction Model . . . . . 16
3. The SMTP Procedures: An Overview . . . . . . . . . . . . . . . 17
3.1. Session Initiation . . . . . . . . . . . . . . . . . . . . 18
3.2. Client Initiation . . . . . . . . . . . . . . . . . . . . 18
3.3. Mail Transactions . . . . . . . . . . . . . . . . . . . . 19
3.4. Forwarding for Address Correction or Updating . . . . . . 21
3.5. Commands for Debugging Addresses . . . . . . . . . . . . . 22
3.5.1. Overview . . . . . . . . . . . . . . . . . . . . . . . 22
3.5.2. VRFY Normal Response . . . . . . . . . . . . . . . . . 24
3.5.3. Meaning of VRFY or EXPN Success Response . . . . . . . 25
3.5.4. Semantics and Applications of EXPN . . . . . . . . . . 26
3.6. Relaying and Mail Routing . . . . . . . . . . . . . . . . 26
3.6.1. Source Routes and Relaying . . . . . . . . . . . . . . 26
3.6.2. Mail eXchange Records and Relaying . . . . . . . . . . 26
3.6.3. Message Submission Servers as Relays . . . . . . . . . 27
3.7. Mail Gatewaying . . . . . . . . . . . . . . . . . . . . . 28
3.7.1. Header Fields in Gatewaying . . . . . . . . . . . . . 28
3.7.2. Received Lines in Gatewaying . . . . . . . . . . . . . 29
3.7.3. Addresses in Gatewaying . . . . . . . . . . . . . . . 29
3.7.4. Other Header Fields in Gatewaying . . . . . . . . . . 29
3.7.5. Envelopes in Gatewaying . . . . . . . . . . . . . . . 30
3.8. Terminating Sessions and Connections . . . . . . . . . . . 30
3.9. Mailing Lists and Aliases . . . . . . . . . . . . . . . . 31
3.9.1. Alias . . . . . . . . . . . . . . . . . . . . . . . . 31
Klensin Standards Track [Page 2]