RFC's
rfc 2821 - Simple Mail Transfer Protocol

Network Working Group                                 J. Klensin, Editor
Request for Comments: 2821                             AT&T Laboratories
Obsoletes: 821, 974, 1869                                     April 2001
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.

Copyright Notice

   Copyright (C) The Internet Society (2001).  All Rights Reserved.

Abstract

   This document is a self-contained specification of the basic protocol
   for the Internet electronic mail transport.  It consolidates, updates
   and clarifies, but doesn't add new or change existing functionality
   of the following:

   -  the original SMTP (Simple Mail Transfer Protocol) specification of
      RFC 821 [30],

   -  domain name system requirements and implications for mail
      transport from RFC 1035 [22] and RFC 974 [27],

   -  the clarifications and applicability statements in RFC 1123 [2],
      and

   -  material drawn from the SMTP Extension mechanisms [19].

   It obsoletes RFC 821, RFC 974, and updates RFC 1123 (replaces the
   mail transport materials of RFC 1123).  However, RFC 821 specifies
   some features that were not in significant use in the Internet by the
   mid-1990s and (in appendices) some additional transport models.
   Those sections are omitted here in the interest of clarity and
   brevity; readers needing them should refer to RFC 821.

 

 


Klensin                     Standards Track                     [Page 1]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   It also includes some additional material from RFC 1123 that required
   amplification.  This material has been identified in multiple ways,
   mostly by tracking flaming on various lists and newsgroups and
   problems of unusual readings or interpretations that have appeared as
   the SMTP extensions have been deployed.  Where this specification
   moves beyond consolidation and actually differs from earlier
   documents, it supersedes them technically as well as textually.

   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, as recommended for POP [3, 26]
   and IMAP [6].  Additional submission issues are discussed in RFC 2476
   [15].

   Section 2.3 provides definitions of terms specific to this document.
   Except when the historical terminology is necessary for clarity, this
   document uses the current 'client' and 'server' terminology to
   identify the sending and receiving SMTP processes, respectively.

   A companion document [32] discusses message headers, message bodies
   and formats and structures for them, and their relationship.

Table of Contents

   1. Introduction ..................................................  4
   2. The SMTP Model ................................................  5
   2.1 Basic Structure ..............................................  5
   2.2 The Extension Model ..........................................  7
   2.2.1 Background .................................................  7
   2.2.2 Definition and Registration of Extensions ..................  8
   2.3 Terminology ..................................................  9
   2.3.1 Mail Objects ............................................... 10
   2.3.2 Senders and Receivers ...................................... 10
   2.3.3 Mail Agents and Message Stores ............................. 10
   2.3.4 Host ....................................................... 11
   2.3.5 Domain ..................................................... 11
   2.3.6 Buffer and State Table ..................................... 11
   2.3.7 Lines ...................................................... 12
   2.3.8 Originator, Delivery, Relay, and Gateway Systems ........... 12
   2.3.9 Message Content and Mail Data .............................. 13
   2.3.10 Mailbox and Address ....................................... 13
   2.3.11 Reply ..................................................... 13
   2.4 General Syntax Principles and Transaction Model .............. 13
   3. The SMTP Procedures: An Overview .............................. 15
   3.1 Session Initiation ........................................... 15
   3.2 Client Initiation ............................................ 16
   3.3 Mail Transactions ............................................ 16
   3.4 Forwarding for Address Correction or Updating ................ 19

 

Klensin                     Standards Track                     [Page 2]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   3.5 Commands for Debugging Addresses ............................. 20
   3.5.1 Overview ................................................... 20
   3.5.2 VRFY Normal Response ....................................... 22
   3.5.3 Meaning of VRFY or EXPN Success Response ................... 22
   3.5.4 Semantics and Applications of EXPN ......................... 23
   3.6 Domains ...................................................... 23
   3.7 Relaying ..................................................... 24
   3.8 Mail Gatewaying .............................................. 25
   3.8.1 Header Fields in Gatewaying ................................ 26
   3.8.2 Received Lines in Gatewaying ............................... 26
   3.8.3 Addresses in Gatewaying .................................... 26
   3.8.4 Other Header Fields in Gatewaying .......................... 27
   3.8.5 Envelopes in Gatewaying .................................... 27
   3.9 Terminating Sessions and Connections ......................... 27
   3.10 Mailing Lists and Aliases ................................... 28
   3.10.1 Alias ..................................................... 28
   3.10.2 List ...................................................... 28
   4. The SMTP Specifications ....................................... 29
   4.1 SMTP Commands ................................................ 29
   4.1.1 Command Semantics and Syntax ............................... 29
   4.1.1.1  Extended HELLO (EHLO) or HELLO (HELO) ................... 29
   4.1.1.2 MAIL (MAIL) .............................................. 31
   4.1.1.3 RECIPIENT (RCPT) ......................................... 31
   4.1.1.4 DATA (DATA) .............................................. 33
   4.1.1.5 RESET (RSET) ............................................. 34
   4.1.1.6 VERIFY (VRFY) ............................................ 35
   4.1.1.7 EXPAND (EXPN) ............................................ 35
   4.1.1.8 HELP (HELP) .............................................. 35
   4.1.1.9 NOOP (NOOP) .............................................. 35
   4.1.1.10 QUIT (QUIT) ............................................. 36
   4.1.2 Command Argument Syntax .................................... 36
   4.1.3 Address Literals ........................................... 38
   4.1.4 Order of Commands .......................................... 39
   4.1.5 Private-use Commands ....................................... 40
   4.2  SMTP Replies ................................................ 40
   4.2.1 Reply Code Severities and Theory ........................... 42
   4.2.2 Reply Codes by Function Groups ............................. 44
   4.2.3  Reply Codes in Numeric Order .............................. 45
   4.2.4 Reply Code 502 ............................................. 46
   4.2.5 Reply Codes After DATA and the Subsequent <CRLF>.<CRLF> .... 46
   4.3 Sequencing of Commands and Replies ........................... 47
   4.3.1 Sequencing Overview ........................................ 47
   4.3.2 Command-Reply Sequences .................................... 48
   4.4 Trace Information ............................................ 49
   4.5 Additional Implementation Issues ............................. 53
   4.5.1 Minimum Implementation ..................................... 53
   4.5.2 Transparency ............................................... 53
   4.5.3 Sizes and Timeouts ......................................... 54

 

Klensin                     Standards Track                     [Page 3]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   4.5.3.1 Size limits and minimums ................................. 54
   4.5.3.2 Timeouts ................................................. 56
   4.5.4 Retry Strategies ........................................... 57
   4.5.4.1 Sending Strategy ......................................... 58
   4.5.4.2 Receiving Strategy ....................................... 59
   4.5.5 Messages with a null reverse-path .......................... 59
   5. Address Resolution and Mail Handling .......................... 60
   6. Problem Detection and Handling ................................ 62
   6.1 Reliable Delivery and Replies by Email ....................... 62
   6.2 Loop Detection ............................................... 63
   6.3 Compensating for Irregularities .............................. 63
   7. Security Considerations ....................................... 64
   7.1 Mail Security and Spoofing ................................... 64
   7.2 "Blind" Copies ............................................... 65
   7.3 VRFY, EXPN, and Security ..................................... 65
   7.4 Information Disclosure in Announcements ...................... 66
   7.5 Information Disclosure in Trace Fields ....................... 66
   7.6 Information Disclosure in Message Forwarding ................. 67
   7.7 Scope of Operation of SMTP Servers ........................... 67
   8. IANA Considerations ........................................... 67
   9. References .................................................... 68
   10. Editor's Address ............................................. 70
   11. Acknowledgments .............................................. 70
   Appendices ....................................................... 71
   A. TCP Transport Service ......................................... 71
   B. Generating SMTP Commands from RFC 822 Headers ................. 71
   C. Source Routes ................................................. 72
   D. Scenarios ..................................................... 73
   E. Other Gateway Issues .......................................... 76
   F. Deprecated Features of RFC 821 ................................ 76
   Full Copyright Statement ......................................... 79

1. Introduction

   The objective of the Simple Mail Transfer Protocol (SMTP) is to
   transfer mail reliably and efficiently.

   SMTP is independent of the particular transmission subsystem and
   requires only a reliable ordered data stream channel.  While this
   document specifically discusses transport over TCP, other transports
   are possible.  Appendices to RFC 821 describe some of them.

   An important feature of SMTP is its capability to transport mail
   across networks, usually referred to as "SMTP mail relaying" (see
   section 3.8).  A network consists of the mutually-TCP-accessible
   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
   environment utilizing a non-TCP transport-level protocol.  Using

 

Klensin                     Standards Track                     [Page 4]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   SMTP, a process can transfer mail to another process on the same
   network or to some other network via a relay or gateway process
   accessible to both networks.

   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.
   The Mail eXchanger mechanisms of the domain name system [22, 27] (and
   section 5 of this document) are used to identify the appropriate
   next-hop destination for a message being transported.

2. The SMTP Model

2.1 Basic Structure

   The SMTP design can be pictured as:

               +----------+                +----------+
   +------+    |          |                |          |
   | User |<-->|          |      SMTP      |          |
   +------+    |  Client- |Commands/Replies| Server-  |
   +------+    |   SMTP   |<-------------->|    SMTP  |    +------+
   | File |<-->|          |    and Mail    |          |<-->| File |
   |System|    |          |                |          |    |System|
   +------+    +----------+                +----------+    +------+
                SMTP client                SMTP server

   When an SMTP client has a message to transmit, it establishes a two-
   way transmission channel to an SMTP server.  The responsibility of an
   SMTP client is to transfer mail messages to one or more SMTP servers,
   or report its failure to do so.

   The means by which a mail message is presented to an SMTP client, and
   how that client determines the domain name(s) to which mail messages
   are to be transferred is a local matter, and is not addressed by this
   document.  In some cases, the domain name(s) transferred to, or
   determined by, an SMTP client will identify the final destination(s)
   of the mail message.  In other cases, common with SMTP clients
   associated with implementations of the POP [3, 26] or IMAP [6]
   protocols, or when the SMTP client is inside an isolated transport
   service environment, the domain name determined will identify an
   intermediate destination through which all mail messages are to be
   relayed.  SMTP clients that transfer all traffic, regardless of the
   target domain names associated with the individual messages, or that
   do not maintain queues for retrying message transmissions that
   initially cannot be completed, may otherwise conform to this
   specification but are not considered fully-capable.  Fully-capable
   SMTP implementations, including the relays used by these less capable

 


Klensin                     Standards Track                     [Page 5]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   ones, and their destinations, are expected to support all of the
   queuing, retrying, and alternate address functions discussed in this
   specification.

   The means by which an SMTP client, once it has determined a target
   domain name, determines the identity of an SMTP server to which a
   copy of a message is to be transferred, and then performs that
   transfer, is covered by this document.  To effect a mail transfer to
   an SMTP server, an SMTP client establishes a two-way transmission
   channel to that SMTP server.  An SMTP client determines the address
   of an appropriate host running an SMTP server by resolving a
   destination domain name to either an intermediate Mail eXchanger host
   or a final target host.

   An SMTP server may be either the ultimate destination or an
   intermediate "relay" (that is, it may assume the role of an SMTP
   client after receiving the message) or "gateway" (that is, it may
   transport the message further using some protocol other than SMTP).
   SMTP commands are generated by the SMTP client and sent to the SMTP
   server.  SMTP replies are sent from the SMTP server to the SMTP
   client in response to the commands.

   In other words, message transfer can occur in a single connection
   between the original SMTP-sender and the final SMTP-recipient, or can
   occur in a series of hops through intermediary systems.  In either
   case, a formal handoff of responsibility for the message occurs: the
   protocol requires that a server accept responsibility for either
   delivering a message or properly reporting the failure to do so.

   Once the transmission channel is established and initial handshaking
   completed, the SMTP client normally initiates a mail transaction.
   Such a transaction consists of a series of commands to specify the
   originator and destination of the mail and transmission of the
   message content (including any headers or other structure) itself.
   When the same message is sent to multiple recipients, this protocol
   encourages the transmission of only one copy of the data for all
   recipients at the same destination (or intermediate relay) host.

   The server responds to each command with a reply; replies may
   indicate that the command was accepted, that additional commands are
   expected, or that a temporary or permanent error condition exists.
   Commands specifying the sender or recipients may include server-
   permitted SMTP service extension requests as discussed in section
   2.2.  The dialog is purposely lock-step, one-at-a-time, although this
   can be modified by mutually-agreed extension requests such as command
   pipelining [13].

 

 

Klensin                     Standards Track                     [Page 6]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   Once a given mail message has been transmitted, the client may either
   request that the connection be shut down or may initiate other mail
   transactions.  In addition, an SMTP client may use a connection to an
   SMTP server for ancillary services such as verification of email
   addresses or retrieval of mailing list subscriber addresses.

   As suggested above, this protocol provides mechanisms for the
   transmission of mail.  This transmission normally occurs directly
   from the sending user's host to the receiving user's host when the
   two hosts are connected to the same transport service.  When they are
   not connected to the same transport service, transmission occurs via
   one or more relay SMTP servers.  An intermediate host that acts as
   either an SMTP relay or as a gateway into some other transmission
   environment is usually selected through the use of the domain name
   service (DNS) Mail eXchanger mechanism.

   Usually, intermediate hosts are determined via the DNS MX record, not
   by explicit "source" routing (see section 5 and appendices C and
   F.2).

2.2 The Extension Model

2.2.1 Background

   In an effort that started in 1990, approximately a decade after RFC
   821 was completed, the protocol was modified with a "service
   extensions" model that permits the client and server to agree to
   utilize shared functionality beyond the original SMTP requirements.
   The SMTP extension mechanism defines a means whereby an extended SMTP
   client and server may recognize each other, and the server can inform
   the client as to the service extensions that it supports.

   Contemporary SMTP implementations MUST support the basic extension
   mechanisms.  For instance, servers MUST support the EHLO command even
   if they do not implement any specific extensions and clients SHOULD
   preferentially utilize EHLO rather than HELO.  (However, for
   compatibility with older conforming implementations, SMTP clients and
   servers MUST support the original HELO mechanisms as a fallback.)
   Unless the different characteristics of HELO must be identified for
   interoperability purposes, this document discusses only EHLO.

   SMTP is widely deployed and high-quality implementations have proven
   to be very robust.  However, the Internet community now considers
   some services to be important that were not anticipated when the
   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
   continue working acceptably.  The extension framework consists of:

 


Klensin                     Standards Track                     [Page 7]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   -  The SMTP command EHLO, superseding the earlier HELO,

   -  a registry of SMTP service extensions,

   -  additional parameters to the SMTP MAIL and RCPT commands, and

   -  optional replacements for commands defined in this protocol, such
      as for DATA in non-ASCII transmissions [33].

   SMTP's strength comes primarily from its simplicity.  Experience with
   many protocols has shown that protocols with few options tend towards
   ubiquity, whereas protocols with many options tend towards obscurity.

   Each and every extension, regardless of its benefits, must be
   carefully scrutinized with respect to its implementation, deployment,
   and interoperability costs.  In many cases, the cost of extending the
   SMTP service will likely outweigh the benefit.

2.2.2 Definition and Registration of Extensions

   The IANA maintains a registry of SMTP service extensions.  A
   corresponding EHLO keyword value is associated with each extension.
   Each service extension registered with the IANA must be defined in a
   formal standards-track or IESG-approved experimental protocol
   document.  The definition must include:

   -  the textual name of the SMTP service extension;

   -  the EHLO keyword value associated with the extension;

   -  the syntax and possible values of parameters associated with the
      EHLO keyword value;

   -  any additional SMTP verbs associated with the extension
      (additional verbs will usually be, but are not required to be, the
      same as the EHLO keyword value);

   -  any new parameters the extension associates with the MAIL or RCPT
      verbs;

   -  a description of how support for the extension affects the
      behavior of a server and client SMTP; and,

   -  the increment by which the extension is increasing the maximum
      length of the commands MAIL and/or RCPT, over that specified in
      this standard.

 

 

Klensin                     Standards Track                     [Page 8]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   In addition, any EHLO keyword value starting with an upper or lower
   case "X" refers to a local SMTP service extension used exclusively
   through bilateral agreement.  Keywords beginning with "X" MUST NOT be
   used in a registered service extension.  Conversely, keyword values
   presented in the EHLO response that do not begin with "X" MUST
   correspond to a standard, standards-track, or IESG-approved
   experimental SMTP service extension registered with IANA.  A
   conforming server MUST NOT offer non-"X"-prefixed keyword values that
   are not described in a registered extension.

   Additional verbs and parameter names are bound by the same rules as
   EHLO keywords; specifically, verbs beginning with "X" are local
   extensions that may not be registered or standardized.  Conversely,
   verbs not beginning with "X" must always be registered.

2.3 Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described below.

   1. MUST   This word, or the terms "REQUIRED" or "SHALL", mean that
      the definition is an absolute requirement of the specification.

   2. MUST NOT   This phrase, or the phrase "SHALL NOT", mean that the
      definition is an absolute prohibition of the specification.

   3. SHOULD   This word, or the adjective "RECOMMENDED", mean that
      there may exist valid reasons in particular circumstances to
      ignore a particular item, but the full implications must be
      understood and carefully weighed before choosing a different
      course.

   4. SHOULD NOT   This phrase, or the phrase "NOT RECOMMENDED" mean
      that there may exist valid reasons in particular circumstances
      when the particular behavior is acceptable or even useful, but the
      full implications should be understood and the case carefully
      weighed before implementing any behavior described with this
      label.

   5. MAY   This word, or the adjective "OPTIONAL", mean that an item is
      truly optional.  One vendor may choose to include the item because
      a particular marketplace requires it or because the vendor feels
      that it enhances the product while another vendor may omit the
      same item.  An implementation which does not include a particular
      option MUST be prepared to interoperate with another
      implementation which does include the option, though perhaps with
      reduced functionality.  In the same vein an implementation which

 

Klensin                     Standards Track                     [Page 9]

RFC 2821             Simple Mail Transfer Protocol            April 2001


      does include a particular option MUST be prepared to interoperate
      with another implementation which does not include the option
      (except, of course, for the feature the option provides.)

2.3.1 Mail Objects

   SMTP transports a mail object.  A mail object contains an envelope
   and content.

   The SMTP envelope is sent as a series of SMTP protocol units
   (described in section 3).  It consists of an originator address (to
   which error reports should be directed); one or more recipient
   addresses; and optional protocol extension material.  Historically,
   variations on the recipient address specification command (RCPT TO)
   could be used to specify alternate delivery modes, such as immediate
   display; those variations have now been deprecated (see appendix F,
   section F.6).

   The SMTP content is sent in the SMTP DATA protocol unit and has two
   parts:  the headers and the body.  If the content conforms to other
   contemporary standards, the headers form a collection of field/value
   pairs structured as in the message format specification [32]; the
   body, if structured, is defined according to MIME [12].  The content
   is textual in nature, expressed using the US-ASCII repertoire [1].
   Although SMTP extensions (such as "8BITMIME" [20]) may relax this
   restriction for the content body, the content headers are always
   encoded using the US-ASCII repertoire.  A MIME extension [23] defines
   an algorithm for representing header values outside the US-ASCII
   repertoire, while still encoding them using the US-ASCII repertoire.

2.3.2 Senders and Receivers

   In RFC 821, the two hosts participating in an SMTP transaction were
   described as the "SMTP-sender" and "SMTP-receiver".  This document
   has been changed to reflect current industry terminology and hence
   refers to them as the "SMTP client" (or sometimes just "the client")
   and "SMTP server" (or just "the server"), respectively.  Since a
   given host may act both as server and client in a relay situation,
   "receiver" and "sender" terminology is still used where needed for
   clarity.

2.3.3 Mail Agents and Message Stores

   Additional mail system terminology became common after RFC 821 was
   published and, where convenient, is used in this specification.  In
   particular, SMTP servers and clients provide a mail transport service
   and therefore act as "Mail Transfer Agents" (MTAs).  "Mail User
   Agents" (MUAs or UAs) are normally thought of as the sources and

 

Klensin                     Standards Track                    [Page 10]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   targets of mail.  At the source, an MUA might collect mail to be
   transmitted from a user and hand it off to an MTA; the final
   ("delivery") MTA would be thought of as handing the mail off to an
   MUA (or at least transferring responsibility to it, e.g., by
   depositing the message in a "message store").  However, while these
   terms are used with at least the appearance of great precision in
   other environments, the implied boundaries between MUAs and MTAs
   often do not accurately match common, and conforming, practices with
   Internet mail.  Hence, the reader should be cautious about inferring
   the strong relationships and responsibilities that might be implied
   if these terms were used elsewhere.

2.3.4 Host

   For the purposes of this specification, a host is a computer system
   attached to the Internet (or, in some cases, to a private TCP/IP
   network) and supporting the SMTP protocol.  Hosts are known by names
   (see "domain"); identifying them by numerical address is discouraged.

2.3.5 Domain

   A domain (or domain name) consists of one or more dot-separated
   components.  These components ("labels" in DNS terminology [22]) are
   restricted for SMTP purposes to consist of a sequence of letters,
   digits, and hyphens drawn from the ASCII character set [1].  Domain
   names are used as names of hosts and of other entities in the domain
   name hierarchy.  For example, a domain may refer to an alias (label
   of a CNAME RR) or the label of Mail eXchanger records to be used to
   deliver mail instead of representing a host name.  See [22] and
   section 5 of this specification.

   The domain name, as described in this document and in [22], 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.
   Local aliases MUST NOT appear in any SMTP transaction.

2.3.6 Buffer and State Table

   SMTP sessions are stateful, with both parties carefully maintaining a
   common view of the current state.  In this document we model this
   state by a virtual "buffer" and a "state table" on the server which
   may be used by the client to, for example, "clear the buffer" or
   "reset the state table," causing the information in the buffer to be
   discarded and the state to be returned to some previous state.

 

 

 

Klensin                     Standards Track                    [Page 11]

RFC 2821             Simple Mail Transfer Protocol            April 2001


2.3.7 Lines

   SMTP commands and, unless altered by a service extension, message
   data, are transmitted in "lines".  Lines consist of zero or more data
   characters terminated by the sequence ASCII character "CR" (hex value
   0D) followed immediately by ASCII character "LF" (hex value 0A).
   This termination sequence is denoted as <CRLF> in this document.
   Conforming implementations MUST NOT recognize or generate any other
   character or character sequence as a line terminator.  Limits MAY be
   imposed on line lengths by servers (see section 4.5.3).

   In addition, the appearance of "bare" "CR" or "LF" characters in text
   (i.e., either without the other) has a long history of causing
   problems in mail implementations and applications that use the mail
   system as a tool.  SMTP client implementations MUST NOT transmit
   these characters except when they are intended as line terminators
   and then MUST, as indicated above, transmit them only as a <CRLF>
   sequence.

2.3.8 Originator, Delivery, Relay, and Gateway Systems

   This specification makes a distinction among four types of SMTP
   systems, based on the role those systems play in transmitting
   electronic mail.  An "originating" system (sometimes called an SMTP
   originator) introduces mail into the Internet or, more generally,
   into a transport service environment.  A "delivery" SMTP system is
   one that receives mail from a transport service environment and
   passes it to a mail user agent or deposits it in a message store
   which a mail user agent is expected to subsequently access.  A
   "relay" SMTP system (usually referred to just as a "relay") receives
   mail from an SMTP client and transmits it, without modification to
   the message data other than adding trace information, to another SMTP
   server for further relaying or for delivery.

   A "gateway" SMTP system (usually referred to just as a "gateway")
   receives mail from a client system in one transport environment and
   transmits it to a server system in another transport environment.
   Differences in protocols or message semantics between the transport
   environments on either side of a gateway may require that the gateway
   system perform transformations to the message that are not permitted
   to SMTP relay systems.  For the purposes of this specification,
   firewalls that rewrite addresses should be considered as gateways,
   even if SMTP is used on both sides of them (see [11]).

 

 

 


Klensin                     Standards Track                    [Page 12]

RFC 2821             Simple Mail Transfer Protocol            April 2001


2.3.9 Message Content and Mail Data

   The terms "message content" and "mail data" are used interchangeably
   in this document to describe the material transmitted after the DATA
   command is accepted and before the end of data indication is
   transmitted.  Message content includes message headers and the
   possibly-structured message body.  The MIME specification [12]
   provides the standard mechanisms for structured message bodies.

2.3.10 Mailbox and Address

   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
   which mail will be deposited.  The term "mailbox" refers to that
   depository.  The two terms are typically used interchangeably unless
   the distinction between the location in which mail is placed (the
   mailbox) and a reference to it (the address) is important.  An
   address normally consists of user and domain specifications.  The
   standard mailbox naming convention is defined to be "local-
  
part@domain": contemporary usage permits a much broader set of
   applications than simple "user names".  Consequently, and due to a
   long history of problems when intermediate hosts have attempted to
   optimize transport by modifying them, the local-part MUST be
   interpreted and assigned semantics only by the host specified in the
   domain part of the address.

2.3.11 Reply

   An SMTP reply is an acknowledgment (positive or negative) sent from
   receiver to sender via the transmission channel in response to a
   command.  The general form of a reply is a numeric completion code
   (indicating failure or success) usually followed by a text string.
   The codes are for use by programs and the text is usually intended
   for human users.  Recent work [34] has specified further structuring
   of the reply strings, including the use of supplemental and more
   specific completion codes.

2.4 General Syntax Principles and Transaction Model

   SMTP commands and replies have a rigid syntax.  All commands begin
   with a command verb.  All Replies begin with a three digit numeric
   code.  In some commands and replies, arguments MUST follow the verb
   or reply code.  Some commands do not accept arguments (after the
   verb), and some reply codes are followed, sometimes optionally, by
   free form text.  In both cases, where text appears, it is separated
   from the verb or reply code by a space character.  Complete
   definitions of commands and replies appear in section 4.

 


Klensin                     Standards Track                    [Page 13]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   Verbs and argument values (e.g., "TO:" or "to:" in the RCPT command
   and extension name keywords) are not case sensitive, with the sole
   exception in this specification of a mailbox local-part (SMTP
   Extensions may explicitly specify case-sensitive elements).  That is,
   a command verb, an argument value other than a mailbox local-part,
   and free form text MAY be encoded in upper case, lower case, or any
   mixture of upper and lower case with no impact on its meaning.  This
   is NOT true of a mailbox local-part.  The local-part of a mailbox
   MUST BE treated as case sensitive.  Therefore, SMTP implementations
   MUST take care to preserve the case of mailbox local-parts.  Mailbox
   domains are not case sensitive.  In particular, for some hosts the
   user "smith" is different from the user "Smith".  However, exploiting
   the case sensitivity of mailbox local-parts impedes interoperability
   and is discouraged.

   A few SMTP servers, in violation of this specification (and RFC 821)
   require that command verbs be encoded by clients in upper case.
   Implementations MAY wish to employ this encoding to accommodate those
   servers.

   The argument field consists of a variable length character string
   ending with the end of the line, i.e., with the character sequence
   <CRLF>.  The receiver will take no action until this sequence is
   received.

   The syntax for each command is shown with the discussion of that
   command.  Common elements and parameters are shown in section 4.1.2.

   Commands and replies are composed of characters from the ASCII
   character set [1].  When the transport service provides an 8-bit byte
   (octet) transmission channel, each 7-bit character is transmitted
   right justified in an octet with the high order bit cleared to zero.
   More specifically, the unextended SMTP service provides seven bit
   transport only.  An originating SMTP client which has not
   successfully negotiated an appropriate extension with a particular
   server MUST NOT transmit messages with information in the high-order
   bit of octets.  If such messages are transmitted in violation of this
   rule, receiving SMTP servers MAY clear the high-order bit or reject
   the message as invalid.  In general, a relay SMTP SHOULD assume that
   the message content it has received is valid and, assuming that the
   envelope permits doing so, relay it without inspecting that content.
   Of course, if the content is mislabeled and the data path cannot
   accept the actual content, this may result in ultimate delivery of a
   severely garbled message to the recipient.  Delivery SMTP systems MAY
   reject ("bounce") such messages rather than deliver them.  No sending
   SMTP system is permitted to send envelope commands in any character

 

 

Klensin                     Standards Track                    [Page 14]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   set other than US-ASCII; receiving systems SHOULD reject such
   commands, normally using "500 syntax error - invalid character"
   replies.

   Eight-bit message content transmission MAY be requested of the server
   by a client using extended SMTP facilities, notably the "8BITMIME"
   extension [20].  8BITMIME SHOULD be supported by SMTP servers.
   However, it MUST not be construed as authorization to transmit
   unrestricted eight bit material.  8BITMIME MUST NOT be requested by
   senders for material with the high bit on that is not in MIME format
   with an appropriate content-transfer encoding; servers MAY reject
   such messages.

   The metalinguistic notation used in this document corresponds to the
   "Augmented BNF" used in other Internet mail system documents.  The
   reader who is not familiar with that syntax should consult the ABNF
   specification [8].  Metalanguage terms used in running text are
   surrounded by pointed brackets (e.g., <CRLF>) for clarity.

3. The SMTP Procedures: An Overview

   This section contains descriptions of the procedures used in SMTP:
   session initiation, the mail transaction, forwarding mail, verifying
   mailbox names and expanding mailing lists, and the opening and
   closing exchanges.  Comments on relaying, a note on mail domains, and
   a discussion of changing roles are included at the end of this
   section.  Several complete scenarios are presented in appendix D.

3.1 Session Initiation

   An SMTP session is initiated when a client opens a connection to a
   server and the server responds with an opening message.

   SMTP server implementations MAY include identification of their
   software and version information in the connection greeting reply
   after the 220 code, a practice that permits more efficient isolation
   and repair of any problems.  Implementations MAY make provision for
   SMTP servers to disable the software and version announcement where
   it causes security concerns.  While some systems also identify their
   contact point for mail problems, this is not a substitute for
   maintaining the required "postmaster" address (see section 4.5.1).

   The SMTP protocol allows a server to formally reject a transaction
   while still allowing the initial connection as follows: a 554
   response MAY be given in the initial connection opening message
   instead of the 220.  A server taking this approach MUST still wait
   for the client to send a QUIT (see section 4.1.1.10) before closing
   the connection and SHOULD respond to any intervening commands with

 

Klensin                     Standards Track                    [Page 15]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   "503 bad sequence of commands".  Since an attempt to make an SMTP
   connection to such a system is probably in error, a server returning
   a 554 response on connection opening SHOULD provide enough
   information in the reply text to facilitate debugging of the sending
   system.

3.2 Client Initiation

   Once the server has sent the welcoming message and the client has
   received it, the client normally sends the EHLO command to the
   server, indicating the client's identity.  In addition to opening the
   session, use of EHLO indicates that the client is able to process
   service extensions and requests that the server provide a list of the
   extensions it supports.  Older SMTP systems which are unable to
   support service extensions and contemporary clients which do not
   require service extensions in the mail session being initiated, MAY
   use HELO instead of EHLO.  Servers MUST NOT return the extended
   EHLO-style response to a HELO command.  For a particular connection
   attempt, if the server returns a "command not recognized" response to
   EHLO, the client SHOULD be able to fall back and send HELO.

   In the EHLO command the host sending the command identifies itself;
   the command may be interpreted as saying "Hello, I am <domain>" (and,
   in the case of EHLO, "and I support service extension requests").

3.3 Mail Transactions

   There are three steps to SMTP mail transactions.  The transaction
   starts with a MAIL command which gives the sender identification.
   (In 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 commands follows giving the receiver information.  Then a
   DATA command initiates transfer of the mail data and is terminated by
   the "end of mail" data indicator, which also confirms the
   transaction.

   The first step in the procedure is the MAIL command.

      MAIL FROM:<reverse-path> [SP <mail-parameters> ] <CRLF>

   This command tells the SMTP-receiver that a new mail transaction is
   starting and to reset all its state tables and buffers, including any
   recipients or mail data.  The <reverse-path> portion of the first or
   only argument contains the source mailbox (between "<" and ">"
   brackets), which can be used to report errors (see section 4.2 for a
   discussion of error reporting).  If accepted, the SMTP server returns
   a 250 OK reply.  If the mailbox specification is not acceptable for
   some reason, the server MUST return a reply indicating whether the

 

Klensin                     Standards Track                    [Page 16]

RFC 2821             Simple Mail Transfer Protocol            April 2001


   failure is permanent (i.e., will occur again if the client tries to
   send the same address again) or temporary (i.e., the address might be
   accepted if the client tries again later).  Despite the apparent
   scope of this requirement, there are circumstances in which the
   acceptability of the reverse-path may not be determined until one or
   more forward-paths (in RCPT commands) can be examined.  In those
   cases, the server MAY reasonably accept the reverse-path (with a 250
   reply) and then report problems after the forward-paths are received
   and examined.  Normally, failures produce 550 or 553 replies.

   Historically, the <reverse-path> can contain more than just a
   mailbox, however, contemporary systems SHOULD NOT use source routing
   (see appendix C).

   The optional <mail-parameters> are associated with negotiated SMTP
   service extensions (see section 2.2).

   The second step in the procedure is the RCPT command.

      RCPT TO:<forward-path> [ SP <rcpt-parameters> ] <CRLF>

&lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Network Working Group&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; J. Klensin, Editor Request for Comments: 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AT&amp;amp;T Laboratories Obsoletes: 821, 974, 1869&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001 Updates: 1123 Category: Standards Track&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Status of this Memo&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; This document specifies an Internet standards track protocol for the &amp;nbsp;&amp;nbsp; Internet community, and requests discussion and suggestions for &amp;nbsp;&amp;nbsp; improvements.&amp;nbsp; Please refer to the current edition of the &quot;Internet &amp;nbsp;&amp;nbsp; Official Protocol Standards&quot; (STD 1) for the standardization state &amp;nbsp;&amp;nbsp; and status of this protocol.&amp;nbsp; Distribution of this memo is unlimited.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Copyright Notice&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Copyright (C) The Internet Society (2001).&amp;nbsp; All Rights Reserved.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Abstract&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; This document is a self-contained specification of the basic protocol &amp;nbsp;&amp;nbsp; for the Internet electronic mail transport.&amp;nbsp; It consolidates, updates &amp;nbsp;&amp;nbsp; and clarifies, but doesn&#039;t add new or change existing functionality &amp;nbsp;&amp;nbsp; of the following:&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; the original SMTP (Simple Mail Transfer Protocol) specification of &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RFC 821 [30],&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; domain name system requirements and implications for mail &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; transport from RFC 1035 [22] and RFC 974 [27],&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; the clarifications and applicability statements in RFC 1123 [2], &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; material drawn from the SMTP Extension mechanisms [19].&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; It obsoletes RFC 821, RFC 974, and updates RFC 1123 (replaces the &amp;nbsp;&amp;nbsp; mail transport materials of RFC 1123).&amp;nbsp; However, RFC 821 specifies &amp;nbsp;&amp;nbsp; some features that were not in significant use in the Internet by the &amp;nbsp;&amp;nbsp; mid-1990s and (in appendices) some additional transport models. &amp;nbsp;&amp;nbsp; Those sections are omitted here in the interest of clarity and &amp;nbsp;&amp;nbsp; brevity; readers needing them should refer to RFC 821.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 1] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; It also includes some additional material from RFC 1123 that required &amp;nbsp;&amp;nbsp; amplification.&amp;nbsp; This material has been identified in multiple ways, &amp;nbsp;&amp;nbsp; mostly by tracking flaming on various lists and newsgroups and &amp;nbsp;&amp;nbsp; problems of unusual readings or interpretations that have appeared as &amp;nbsp;&amp;nbsp; the SMTP extensions have been deployed.&amp;nbsp; Where this specification &amp;nbsp;&amp;nbsp; moves beyond consolidation and actually differs from earlier &amp;nbsp;&amp;nbsp; documents, it supersedes them technically as well as textually.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Although SMTP was designed as a mail transport and delivery protocol, &amp;nbsp;&amp;nbsp; this specification also contains information that is important to its &amp;nbsp;&amp;nbsp; use as a &#039;mail submission&#039; protocol, as recommended for POP [3, 26] &amp;nbsp;&amp;nbsp; and IMAP [6].&amp;nbsp; Additional submission issues are discussed in RFC 2476 &amp;nbsp;&amp;nbsp; [15].&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Section 2.3 provides definitions of terms specific to this document. &amp;nbsp;&amp;nbsp; Except when the historical terminology is necessary for clarity, this &amp;nbsp;&amp;nbsp; document uses the current &#039;client&#039; and &#039;server&#039; terminology to &amp;nbsp;&amp;nbsp; identify the sending and receiving SMTP processes, respectively.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; A companion document [32] discusses message headers, message bodies &amp;nbsp;&amp;nbsp; and formats and structures for them, and their relationship.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Table of Contents&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; 1. Introduction ..................................................&amp;nbsp; 4 &amp;nbsp;&amp;nbsp; 2. The SMTP Model ................................................&amp;nbsp; 5 &amp;nbsp;&amp;nbsp; 2.1 Basic Structure ..............................................&amp;nbsp; 5 &amp;nbsp;&amp;nbsp; 2.2 The Extension Model ..........................................&amp;nbsp; 7 &amp;nbsp;&amp;nbsp; 2.2.1 Background .................................................&amp;nbsp; 7 &amp;nbsp;&amp;nbsp; 2.2.2 Definition and Registration of Extensions ..................&amp;nbsp; 8 &amp;nbsp;&amp;nbsp; 2.3 Terminology ..................................................&amp;nbsp; 9 &amp;nbsp;&amp;nbsp; 2.3.1 Mail Objects ............................................... 10 &amp;nbsp;&amp;nbsp; 2.3.2 Senders and Receivers ...................................... 10 &amp;nbsp;&amp;nbsp; 2.3.3 Mail Agents and Message Stores ............................. 10 &amp;nbsp;&amp;nbsp; 2.3.4 Host ....................................................... 11 &amp;nbsp;&amp;nbsp; 2.3.5 Domain ..................................................... 11 &amp;nbsp;&amp;nbsp; 2.3.6 Buffer and State Table ..................................... 11 &amp;nbsp;&amp;nbsp; 2.3.7 Lines ...................................................... 12 &amp;nbsp;&amp;nbsp; 2.3.8 Originator, Delivery, Relay, and Gateway Systems ........... 12 &amp;nbsp;&amp;nbsp; 2.3.9 Message Content and Mail Data .............................. 13 &amp;nbsp;&amp;nbsp; 2.3.10 Mailbox and Address ....................................... 13 &amp;nbsp;&amp;nbsp; 2.3.11 Reply ..................................................... 13 &amp;nbsp;&amp;nbsp; 2.4 General Syntax Principles and Transaction Model .............. 13 &amp;nbsp;&amp;nbsp; 3. The SMTP Procedures: An Overview .............................. 15 &amp;nbsp;&amp;nbsp; 3.1 Session Initiation ........................................... 15 &amp;nbsp;&amp;nbsp; 3.2 Client Initiation ............................................ 16 &amp;nbsp;&amp;nbsp; 3.3 Mail Transactions ............................................ 16 &amp;nbsp;&amp;nbsp; 3.4 Forwarding for Address Correction or Updating ................ 19&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 2] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; 3.5 Commands for Debugging Addresses ............................. 20 &amp;nbsp;&amp;nbsp; 3.5.1 Overview ................................................... 20 &amp;nbsp;&amp;nbsp; 3.5.2 VRFY Normal Response ....................................... 22 &amp;nbsp;&amp;nbsp; 3.5.3 Meaning of VRFY or EXPN Success Response ................... 22 &amp;nbsp;&amp;nbsp; 3.5.4 Semantics and Applications of EXPN ......................... 23 &amp;nbsp;&amp;nbsp; 3.6 Domains ...................................................... 23 &amp;nbsp;&amp;nbsp; 3.7 Relaying ..................................................... 24 &amp;nbsp;&amp;nbsp; 3.8 Mail Gatewaying .............................................. 25 &amp;nbsp;&amp;nbsp; 3.8.1 Header Fields in Gatewaying ................................ 26 &amp;nbsp;&amp;nbsp; 3.8.2 Received Lines in Gatewaying ............................... 26 &amp;nbsp;&amp;nbsp; 3.8.3 Addresses in Gatewaying .................................... 26 &amp;nbsp;&amp;nbsp; 3.8.4 Other Header Fields in Gatewaying .......................... 27 &amp;nbsp;&amp;nbsp; 3.8.5 Envelopes in Gatewaying .................................... 27 &amp;nbsp;&amp;nbsp; 3.9 Terminating Sessions and Connections ......................... 27 &amp;nbsp;&amp;nbsp; 3.10 Mailing Lists and Aliases ................................... 28 &amp;nbsp;&amp;nbsp; 3.10.1 Alias ..................................................... 28 &amp;nbsp;&amp;nbsp; 3.10.2 List ...................................................... 28 &amp;nbsp;&amp;nbsp; 4. The SMTP Specifications ....................................... 29 &amp;nbsp;&amp;nbsp; 4.1 SMTP Commands ................................................ 29 &amp;nbsp;&amp;nbsp; 4.1.1 Command Semantics and Syntax ............................... 29 &amp;nbsp;&amp;nbsp; 4.1.1.1&amp;nbsp; Extended HELLO (EHLO) or HELLO (HELO) ................... 29 &amp;nbsp;&amp;nbsp; 4.1.1.2 MAIL (MAIL) .............................................. 31 &amp;nbsp;&amp;nbsp; 4.1.1.3 RECIPIENT (RCPT) ......................................... 31 &amp;nbsp;&amp;nbsp; 4.1.1.4 DATA (DATA) .............................................. 33 &amp;nbsp;&amp;nbsp; 4.1.1.5 RESET (RSET) ............................................. 34 &amp;nbsp;&amp;nbsp; 4.1.1.6 VERIFY (VRFY) ............................................ 35 &amp;nbsp;&amp;nbsp; 4.1.1.7 EXPAND (EXPN) ............................................ 35 &amp;nbsp;&amp;nbsp; 4.1.1.8 HELP (HELP) .............................................. 35 &amp;nbsp;&amp;nbsp; 4.1.1.9 NOOP (NOOP) .............................................. 35 &amp;nbsp;&amp;nbsp; 4.1.1.10 QUIT (QUIT) ............................................. 36 &amp;nbsp;&amp;nbsp; 4.1.2 Command Argument Syntax .................................... 36 &amp;nbsp;&amp;nbsp; 4.1.3 Address Literals ........................................... 38 &amp;nbsp;&amp;nbsp; 4.1.4 Order of Commands .......................................... 39 &amp;nbsp;&amp;nbsp; 4.1.5 Private-use Commands ....................................... 40 &amp;nbsp;&amp;nbsp; 4.2&amp;nbsp; SMTP Replies ................................................ 40 &amp;nbsp;&amp;nbsp; 4.2.1 Reply Code Severities and Theory ........................... 42 &amp;nbsp;&amp;nbsp; 4.2.2 Reply Codes by Function Groups ............................. 44 &amp;nbsp;&amp;nbsp; 4.2.3&amp;nbsp; Reply Codes in Numeric Order .............................. 45 &amp;nbsp;&amp;nbsp; 4.2.4 Reply Code 502 ............................................. 46 &amp;nbsp;&amp;nbsp; 4.2.5 Reply Codes After DATA and the Subsequent &amp;lt;CRLF&amp;gt;.&amp;lt;CRLF&amp;gt; .... 46 &amp;nbsp;&amp;nbsp; 4.3 Sequencing of Commands and Replies ........................... 47 &amp;nbsp;&amp;nbsp; 4.3.1 Sequencing Overview ........................................ 47 &amp;nbsp;&amp;nbsp; 4.3.2 Command-Reply Sequences .................................... 48 &amp;nbsp;&amp;nbsp; 4.4 Trace Information ............................................ 49 &amp;nbsp;&amp;nbsp; 4.5 Additional Implementation Issues ............................. 53 &amp;nbsp;&amp;nbsp; 4.5.1 Minimum Implementation ..................................... 53 &amp;nbsp;&amp;nbsp; 4.5.2 Transparency ............................................... 53 &amp;nbsp;&amp;nbsp; 4.5.3 Sizes and Timeouts ......................................... 54&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 3] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; 4.5.3.1 Size limits and minimums ................................. 54 &amp;nbsp;&amp;nbsp; 4.5.3.2 Timeouts ................................................. 56 &amp;nbsp;&amp;nbsp; 4.5.4 Retry Strategies ........................................... 57 &amp;nbsp;&amp;nbsp; 4.5.4.1 Sending Strategy ......................................... 58 &amp;nbsp;&amp;nbsp; 4.5.4.2 Receiving Strategy ....................................... 59 &amp;nbsp;&amp;nbsp; 4.5.5 Messages with a null reverse-path .......................... 59 &amp;nbsp;&amp;nbsp; 5. Address Resolution and Mail Handling .......................... 60 &amp;nbsp;&amp;nbsp; 6. Problem Detection and Handling ................................ 62 &amp;nbsp;&amp;nbsp; 6.1 Reliable Delivery and Replies by Email ....................... 62 &amp;nbsp;&amp;nbsp; 6.2 Loop Detection ............................................... 63 &amp;nbsp;&amp;nbsp; 6.3 Compensating for Irregularities .............................. 63 &amp;nbsp;&amp;nbsp; 7. Security Considerations ....................................... 64 &amp;nbsp;&amp;nbsp; 7.1 Mail Security and Spoofing ................................... 64 &amp;nbsp;&amp;nbsp; 7.2 &quot;Blind&quot; Copies ............................................... 65 &amp;nbsp;&amp;nbsp; 7.3 VRFY, EXPN, and Security ..................................... 65 &amp;nbsp;&amp;nbsp; 7.4 Information Disclosure in Announcements ...................... 66 &amp;nbsp;&amp;nbsp; 7.5 Information Disclosure in Trace Fields ....................... 66 &amp;nbsp;&amp;nbsp; 7.6 Information Disclosure in Message Forwarding ................. 67 &amp;nbsp;&amp;nbsp; 7.7 Scope of Operation of SMTP Servers ........................... 67 &amp;nbsp;&amp;nbsp; 8. IANA Considerations ........................................... 67 &amp;nbsp;&amp;nbsp; 9. References .................................................... 68 &amp;nbsp;&amp;nbsp; 10. Editor&#039;s Address ............................................. 70 &amp;nbsp;&amp;nbsp; 11. Acknowledgments .............................................. 70 &amp;nbsp;&amp;nbsp; Appendices ....................................................... 71 &amp;nbsp;&amp;nbsp; A. TCP Transport Service ......................................... 71 &amp;nbsp;&amp;nbsp; B. Generating SMTP Commands from RFC 822 Headers ................. 71 &amp;nbsp;&amp;nbsp; C. Source Routes ................................................. 72 &amp;nbsp;&amp;nbsp; D. Scenarios ..................................................... 73 &amp;nbsp;&amp;nbsp; E. Other Gateway Issues .......................................... 76 &amp;nbsp;&amp;nbsp; F. Deprecated Features of RFC 821 ................................ 76 &amp;nbsp;&amp;nbsp; Full Copyright Statement ......................................... 79&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;1. Introduction&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The objective of the Simple Mail Transfer Protocol (SMTP) is to &amp;nbsp;&amp;nbsp; transfer mail reliably and efficiently.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; SMTP is independent of the particular transmission subsystem and &amp;nbsp;&amp;nbsp; requires only a reliable ordered data stream channel.&amp;nbsp; While this &amp;nbsp;&amp;nbsp; document specifically discusses transport over TCP, other transports &amp;nbsp;&amp;nbsp; are possible.&amp;nbsp; Appendices to RFC 821 describe some of them.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; An important feature of SMTP is its capability to transport mail &amp;nbsp;&amp;nbsp; across networks, usually referred to as &quot;SMTP mail relaying&quot; (see &amp;nbsp;&amp;nbsp; section 3.8).&amp;nbsp; A network consists of the mutually-TCP-accessible &amp;nbsp;&amp;nbsp; hosts on the public Internet, the mutually-TCP-accessible hosts on a &amp;nbsp;&amp;nbsp; firewall-isolated TCP/IP Intranet, or hosts in some other LAN or WAN &amp;nbsp;&amp;nbsp; environment utilizing a non-TCP transport-level protocol.&amp;nbsp; Using&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 4] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; SMTP, a process can transfer mail to another process on the same &amp;nbsp;&amp;nbsp; network or to some other network via a relay or gateway process &amp;nbsp;&amp;nbsp; accessible to both networks.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; In this way, a mail message may pass through a number of intermediate &amp;nbsp;&amp;nbsp; relay or gateway hosts on its path from sender to ultimate recipient. &amp;nbsp;&amp;nbsp; The Mail eXchanger mechanisms of the domain name system [22, 27] (and &amp;nbsp;&amp;nbsp; section 5 of this document) are used to identify the appropriate &amp;nbsp;&amp;nbsp; next-hop destination for a message being transported.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2. The SMTP Model&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.1 Basic Structure&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The SMTP design can be pictured as:&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +----------+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +----------+ &amp;nbsp;&amp;nbsp; +------+&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | &amp;nbsp;&amp;nbsp; | User |&amp;lt;--&amp;gt;|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SMTP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | &amp;nbsp;&amp;nbsp; +------+&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp; Client- |Commands/Replies| Server-&amp;nbsp; | &amp;nbsp;&amp;nbsp; +------+&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; SMTP&amp;nbsp;&amp;nbsp; |&amp;lt;--------------&amp;gt;|&amp;nbsp;&amp;nbsp;&amp;nbsp; SMTP&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp; +------+ &amp;nbsp;&amp;nbsp; | File |&amp;lt;--&amp;gt;|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp; and Mail&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;lt;--&amp;gt;| File | &amp;nbsp;&amp;nbsp; |System|&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp; |System| &amp;nbsp;&amp;nbsp; +------+&amp;nbsp;&amp;nbsp;&amp;nbsp; +----------+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +----------+&amp;nbsp;&amp;nbsp;&amp;nbsp; +------+ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SMTP client&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SMTP server&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; When an SMTP client has a message to transmit, it establishes a two- &amp;nbsp;&amp;nbsp; way transmission channel to an SMTP server.&amp;nbsp; The responsibility of an &amp;nbsp;&amp;nbsp; SMTP client is to transfer mail messages to one or more SMTP servers, &amp;nbsp;&amp;nbsp; or report its failure to do so.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The means by which a mail message is presented to an SMTP client, and &amp;nbsp;&amp;nbsp; how that client determines the domain name(s) to which mail messages &amp;nbsp;&amp;nbsp; are to be transferred is a local matter, and is not addressed by this &amp;nbsp;&amp;nbsp; document.&amp;nbsp; In some cases, the domain name(s) transferred to, or &amp;nbsp;&amp;nbsp; determined by, an SMTP client will identify the final destination(s) &amp;nbsp;&amp;nbsp; of the mail message.&amp;nbsp; In other cases, common with SMTP clients &amp;nbsp;&amp;nbsp; associated with implementations of the POP [3, 26] or IMAP [6] &amp;nbsp;&amp;nbsp; protocols, or when the SMTP client is inside an isolated transport &amp;nbsp;&amp;nbsp; service environment, the domain name determined will identify an &amp;nbsp;&amp;nbsp; intermediate destination through which all mail messages are to be &amp;nbsp;&amp;nbsp; relayed.&amp;nbsp; SMTP clients that transfer all traffic, regardless of the &amp;nbsp;&amp;nbsp; target domain names associated with the individual messages, or that &amp;nbsp;&amp;nbsp; do not maintain queues for retrying message transmissions that &amp;nbsp;&amp;nbsp; initially cannot be completed, may otherwise conform to this &amp;nbsp;&amp;nbsp; specification but are not considered fully-capable.&amp;nbsp; Fully-capable &amp;nbsp;&amp;nbsp; SMTP implementations, including the relays used by these less capable&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 5] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; ones, and their destinations, are expected to support all of the &amp;nbsp;&amp;nbsp; queuing, retrying, and alternate address functions discussed in this &amp;nbsp;&amp;nbsp; specification.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The means by which an SMTP client, once it has determined a target &amp;nbsp;&amp;nbsp; domain name, determines the identity of an SMTP server to which a &amp;nbsp;&amp;nbsp; copy of a message is to be transferred, and then performs that &amp;nbsp;&amp;nbsp; transfer, is covered by this document.&amp;nbsp; To effect a mail transfer to &amp;nbsp;&amp;nbsp; an SMTP server, an SMTP client establishes a two-way transmission &amp;nbsp;&amp;nbsp; channel to that SMTP server.&amp;nbsp; An SMTP client determines the address &amp;nbsp;&amp;nbsp; of an appropriate host running an SMTP server by resolving a &amp;nbsp;&amp;nbsp; destination domain name to either an intermediate Mail eXchanger host &amp;nbsp;&amp;nbsp; or a final target host.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; An SMTP server may be either the ultimate destination or an &amp;nbsp;&amp;nbsp; intermediate &quot;relay&quot; (that is, it may assume the role of an SMTP &amp;nbsp;&amp;nbsp; client after receiving the message) or &quot;gateway&quot; (that is, it may &amp;nbsp;&amp;nbsp; transport the message further using some protocol other than SMTP). &amp;nbsp;&amp;nbsp; SMTP commands are generated by the SMTP client and sent to the SMTP &amp;nbsp;&amp;nbsp; server.&amp;nbsp; SMTP replies are sent from the SMTP server to the SMTP &amp;nbsp;&amp;nbsp; client in response to the commands.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; In other words, message transfer can occur in a single connection &amp;nbsp;&amp;nbsp; between the original SMTP-sender and the final SMTP-recipient, or can &amp;nbsp;&amp;nbsp; occur in a series of hops through intermediary systems.&amp;nbsp; In either &amp;nbsp;&amp;nbsp; case, a formal handoff of responsibility for the message occurs: the &amp;nbsp;&amp;nbsp; protocol requires that a server accept responsibility for either &amp;nbsp;&amp;nbsp; delivering a message or properly reporting the failure to do so.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Once the transmission channel is established and initial handshaking &amp;nbsp;&amp;nbsp; completed, the SMTP client normally initiates a mail transaction. &amp;nbsp;&amp;nbsp; Such a transaction consists of a series of commands to specify the &amp;nbsp;&amp;nbsp; originator and destination of the mail and transmission of the &amp;nbsp;&amp;nbsp; message content (including any headers or other structure) itself. &amp;nbsp;&amp;nbsp; When the same message is sent to multiple recipients, this protocol &amp;nbsp;&amp;nbsp; encourages the transmission of only one copy of the data for all &amp;nbsp;&amp;nbsp; recipients at the same destination (or intermediate relay) host.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The server responds to each command with a reply; replies may &amp;nbsp;&amp;nbsp; indicate that the command was accepted, that additional commands are &amp;nbsp;&amp;nbsp; expected, or that a temporary or permanent error condition exists. &amp;nbsp;&amp;nbsp; Commands specifying the sender or recipients may include server- &amp;nbsp;&amp;nbsp; permitted SMTP service extension requests as discussed in section &amp;nbsp;&amp;nbsp; 2.2.&amp;nbsp; The dialog is purposely lock-step, one-at-a-time, although this &amp;nbsp;&amp;nbsp; can be modified by mutually-agreed extension requests such as command &amp;nbsp;&amp;nbsp; pipelining [13].&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 6] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Once a given mail message has been transmitted, the client may either &amp;nbsp;&amp;nbsp; request that the connection be shut down or may initiate other mail &amp;nbsp;&amp;nbsp; transactions.&amp;nbsp; In addition, an SMTP client may use a connection to an &amp;nbsp;&amp;nbsp; SMTP server for ancillary services such as verification of email &amp;nbsp;&amp;nbsp; addresses or retrieval of mailing list subscriber addresses.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; As suggested above, this protocol provides mechanisms for the &amp;nbsp;&amp;nbsp; transmission of mail.&amp;nbsp; This transmission normally occurs directly &amp;nbsp;&amp;nbsp; from the sending user&#039;s host to the receiving user&#039;s host when the &amp;nbsp;&amp;nbsp; two hosts are connected to the same transport service.&amp;nbsp; When they are &amp;nbsp;&amp;nbsp; not connected to the same transport service, transmission occurs via &amp;nbsp;&amp;nbsp; one or more relay SMTP servers.&amp;nbsp; An intermediate host that acts as &amp;nbsp;&amp;nbsp; either an SMTP relay or as a gateway into some other transmission &amp;nbsp;&amp;nbsp; environment is usually selected through the use of the domain name &amp;nbsp;&amp;nbsp; service (DNS) Mail eXchanger mechanism.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Usually, intermediate hosts are determined via the DNS MX record, not &amp;nbsp;&amp;nbsp; by explicit &quot;source&quot; routing (see section 5 and appendices C and &amp;nbsp;&amp;nbsp; F.2).&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.2 The Extension Model&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.2.1 Background&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; In an effort that started in 1990, approximately a decade after RFC &amp;nbsp;&amp;nbsp; 821 was completed, the protocol was modified with a &quot;service &amp;nbsp;&amp;nbsp; extensions&quot; model that permits the client and server to agree to &amp;nbsp;&amp;nbsp; utilize shared functionality beyond the original SMTP requirements. &amp;nbsp;&amp;nbsp; The SMTP extension mechanism defines a means whereby an extended SMTP &amp;nbsp;&amp;nbsp; client and server may recognize each other, and the server can inform &amp;nbsp;&amp;nbsp; the client as to the service extensions that it supports.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Contemporary SMTP implementations MUST support the basic extension &amp;nbsp;&amp;nbsp; mechanisms.&amp;nbsp; For instance, servers MUST support the EHLO command even &amp;nbsp;&amp;nbsp; if they do not implement any specific extensions and clients SHOULD &amp;nbsp;&amp;nbsp; preferentially utilize EHLO rather than HELO.&amp;nbsp; (However, for &amp;nbsp;&amp;nbsp; compatibility with older conforming implementations, SMTP clients and &amp;nbsp;&amp;nbsp; servers MUST support the original HELO mechanisms as a fallback.) &amp;nbsp;&amp;nbsp; Unless the different characteristics of HELO must be identified for &amp;nbsp;&amp;nbsp; interoperability purposes, this document discusses only EHLO.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; SMTP is widely deployed and high-quality implementations have proven &amp;nbsp;&amp;nbsp; to be very robust.&amp;nbsp; However, the Internet community now considers &amp;nbsp;&amp;nbsp; some services to be important that were not anticipated when the &amp;nbsp;&amp;nbsp; protocol was first designed.&amp;nbsp; If support for those services is to be &amp;nbsp;&amp;nbsp; added, it must be done in a way that permits older implementations to &amp;nbsp;&amp;nbsp; continue working acceptably.&amp;nbsp; The extension framework consists of:&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 7] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; The SMTP command EHLO, superseding the earlier HELO,&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; a registry of SMTP service extensions,&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; additional parameters to the SMTP MAIL and RCPT commands, and&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; optional replacements for commands defined in this protocol, such &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as for DATA in non-ASCII transmissions [33].&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; SMTP&#039;s strength comes primarily from its simplicity.&amp;nbsp; Experience with &amp;nbsp;&amp;nbsp; many protocols has shown that protocols with few options tend towards &amp;nbsp;&amp;nbsp; ubiquity, whereas protocols with many options tend towards obscurity.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Each and every extension, regardless of its benefits, must be &amp;nbsp;&amp;nbsp; carefully scrutinized with respect to its implementation, deployment, &amp;nbsp;&amp;nbsp; and interoperability costs.&amp;nbsp; In many cases, the cost of extending the &amp;nbsp;&amp;nbsp; SMTP service will likely outweigh the benefit.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.2.2 Definition and Registration of Extensions&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The IANA maintains a registry of SMTP service extensions.&amp;nbsp; A &amp;nbsp;&amp;nbsp; corresponding EHLO keyword value is associated with each extension. &amp;nbsp;&amp;nbsp; Each service extension registered with the IANA must be defined in a &amp;nbsp;&amp;nbsp; formal standards-track or IESG-approved experimental protocol &amp;nbsp;&amp;nbsp; document.&amp;nbsp; The definition must include:&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; the textual name of the SMTP service extension;&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; the EHLO keyword value associated with the extension;&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; the syntax and possible values of parameters associated with the &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EHLO keyword value;&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; any additional SMTP verbs associated with the extension &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (additional verbs will usually be, but are not required to be, the &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; same as the EHLO keyword value);&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; any new parameters the extension associates with the MAIL or RCPT &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; verbs;&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; a description of how support for the extension affects the &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; behavior of a server and client SMTP; and,&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; -&amp;nbsp; the increment by which the extension is increasing the maximum &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length of the commands MAIL and/or RCPT, over that specified in &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this standard.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 8] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; In addition, any EHLO keyword value starting with an upper or lower &amp;nbsp;&amp;nbsp; case &quot;X&quot; refers to a local SMTP service extension used exclusively &amp;nbsp;&amp;nbsp; through bilateral agreement.&amp;nbsp; Keywords beginning with &quot;X&quot; MUST NOT be &amp;nbsp;&amp;nbsp; used in a registered service extension.&amp;nbsp; Conversely, keyword values &amp;nbsp;&amp;nbsp; presented in the EHLO response that do not begin with &quot;X&quot; MUST &amp;nbsp;&amp;nbsp; correspond to a standard, standards-track, or IESG-approved &amp;nbsp;&amp;nbsp; experimental SMTP service extension registered with IANA.&amp;nbsp; A &amp;nbsp;&amp;nbsp; conforming server MUST NOT offer non-&quot;X&quot;-prefixed keyword values that &amp;nbsp;&amp;nbsp; are not described in a registered extension.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Additional verbs and parameter names are bound by the same rules as &amp;nbsp;&amp;nbsp; EHLO keywords; specifically, verbs beginning with &quot;X&quot; are local &amp;nbsp;&amp;nbsp; extensions that may not be registered or standardized.&amp;nbsp; Conversely, &amp;nbsp;&amp;nbsp; verbs not beginning with &quot;X&quot; must always be registered.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3 Terminology&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &amp;nbsp;&amp;nbsp; &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this &amp;nbsp;&amp;nbsp; document are to be interpreted as described below.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; 1. MUST&amp;nbsp;&amp;nbsp; This word, or the terms &quot;REQUIRED&quot; or &quot;SHALL&quot;, mean that &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the definition is an absolute requirement of the specification.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; 2. MUST NOT&amp;nbsp;&amp;nbsp; This phrase, or the phrase &quot;SHALL NOT&quot;, mean that the &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; definition is an absolute prohibition of the specification.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; 3. SHOULD&amp;nbsp;&amp;nbsp; This word, or the adjective &quot;RECOMMENDED&quot;, mean that &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; there may exist valid reasons in particular circumstances to &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ignore a particular item, but the full implications must be &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; understood and carefully weighed before choosing a different &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; course.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; 4. SHOULD NOT&amp;nbsp;&amp;nbsp; This phrase, or the phrase &quot;NOT RECOMMENDED&quot; mean &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; that there may exist valid reasons in particular circumstances &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when the particular behavior is acceptable or even useful, but the &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; full implications should be understood and the case carefully &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weighed before implementing any behavior described with this &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; 5. MAY&amp;nbsp;&amp;nbsp; This word, or the adjective &quot;OPTIONAL&quot;, mean that an item is &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; truly optional.&amp;nbsp; One vendor may choose to include the item because &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a particular marketplace requires it or because the vendor feels &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; that it enhances the product while another vendor may omit the &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; same item.&amp;nbsp; An implementation which does not include a particular &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; option MUST be prepared to interoperate with another &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; implementation which does include the option, though perhaps with &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reduced functionality.&amp;nbsp; In the same vein an implementation which&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 9] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; does include a particular option MUST be prepared to interoperate &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with another implementation which does not include the option &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (except, of course, for the feature the option provides.)&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.1 Mail Objects&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; SMTP transports a mail object.&amp;nbsp; A mail object contains an envelope &amp;nbsp;&amp;nbsp; and content.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The SMTP envelope is sent as a series of SMTP protocol units &amp;nbsp;&amp;nbsp; (described in section 3).&amp;nbsp; It consists of an originator address (to &amp;nbsp;&amp;nbsp; which error reports should be directed); one or more recipient &amp;nbsp;&amp;nbsp; addresses; and optional protocol extension material.&amp;nbsp; Historically, &amp;nbsp;&amp;nbsp; variations on the recipient address specification command (RCPT TO) &amp;nbsp;&amp;nbsp; could be used to specify alternate delivery modes, such as immediate &amp;nbsp;&amp;nbsp; display; those variations have now been deprecated (see appendix F, &amp;nbsp;&amp;nbsp; section F.6).&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The SMTP content is sent in the SMTP DATA protocol unit and has two &amp;nbsp;&amp;nbsp; parts:&amp;nbsp; the headers and the body.&amp;nbsp; If the content conforms to other &amp;nbsp;&amp;nbsp; contemporary standards, the headers form a collection of field/value &amp;nbsp;&amp;nbsp; pairs structured as in the message format specification [32]; the &amp;nbsp;&amp;nbsp; body, if structured, is defined according to MIME [12].&amp;nbsp; The content &amp;nbsp;&amp;nbsp; is textual in nature, expressed using the US-ASCII repertoire [1]. &amp;nbsp;&amp;nbsp; Although SMTP extensions (such as &quot;8BITMIME&quot; [20]) may relax this &amp;nbsp;&amp;nbsp; restriction for the content body, the content headers are always &amp;nbsp;&amp;nbsp; encoded using the US-ASCII repertoire.&amp;nbsp; A MIME extension [23] defines &amp;nbsp;&amp;nbsp; an algorithm for representing header values outside the US-ASCII &amp;nbsp;&amp;nbsp; repertoire, while still encoding them using the US-ASCII repertoire.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.2 Senders and Receivers&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; In RFC 821, the two hosts participating in an SMTP transaction were &amp;nbsp;&amp;nbsp; described as the &quot;SMTP-sender&quot; and &quot;SMTP-receiver&quot;.&amp;nbsp; This document &amp;nbsp;&amp;nbsp; has been changed to reflect current industry terminology and hence &amp;nbsp;&amp;nbsp; refers to them as the &quot;SMTP client&quot; (or sometimes just &quot;the client&quot;) &amp;nbsp;&amp;nbsp; and &quot;SMTP server&quot; (or just &quot;the server&quot;), respectively.&amp;nbsp; Since a &amp;nbsp;&amp;nbsp; given host may act both as server and client in a relay situation, &amp;nbsp;&amp;nbsp; &quot;receiver&quot; and &quot;sender&quot; terminology is still used where needed for &amp;nbsp;&amp;nbsp; clarity.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.3 Mail Agents and Message Stores&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Additional mail system terminology became common after RFC 821 was &amp;nbsp;&amp;nbsp; published and, where convenient, is used in this specification.&amp;nbsp; In &amp;nbsp;&amp;nbsp; particular, SMTP servers and clients provide a mail transport service &amp;nbsp;&amp;nbsp; and therefore act as &quot;Mail Transfer Agents&quot; (MTAs).&amp;nbsp; &quot;Mail User &amp;nbsp;&amp;nbsp; Agents&quot; (MUAs or UAs) are normally thought of as the sources and&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 10] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; targets of mail.&amp;nbsp; At the source, an MUA might collect mail to be &amp;nbsp;&amp;nbsp; transmitted from a user and hand it off to an MTA; the final &amp;nbsp;&amp;nbsp; (&quot;delivery&quot;) MTA would be thought of as handing the mail off to an &amp;nbsp;&amp;nbsp; MUA (or at least transferring responsibility to it, e.g., by &amp;nbsp;&amp;nbsp; depositing the message in a &quot;message store&quot;).&amp;nbsp; However, while these &amp;nbsp;&amp;nbsp; terms are used with at least the appearance of great precision in &amp;nbsp;&amp;nbsp; other environments, the implied boundaries between MUAs and MTAs &amp;nbsp;&amp;nbsp; often do not accurately match common, and conforming, practices with &amp;nbsp;&amp;nbsp; Internet mail.&amp;nbsp; Hence, the reader should be cautious about inferring &amp;nbsp;&amp;nbsp; the strong relationships and responsibilities that might be implied &amp;nbsp;&amp;nbsp; if these terms were used elsewhere.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.4 Host&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; For the purposes of this specification, a host is a computer system &amp;nbsp;&amp;nbsp; attached to the Internet (or, in some cases, to a private TCP/IP &amp;nbsp;&amp;nbsp; network) and supporting the SMTP protocol.&amp;nbsp; Hosts are known by names &amp;nbsp;&amp;nbsp; (see &quot;domain&quot;); identifying them by numerical address is discouraged.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.5 Domain&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; A domain (or domain name) consists of one or more dot-separated &amp;nbsp;&amp;nbsp; components.&amp;nbsp; These components (&quot;labels&quot; in DNS terminology [22]) are &amp;nbsp;&amp;nbsp; restricted for SMTP purposes to consist of a sequence of letters, &amp;nbsp;&amp;nbsp; digits, and hyphens drawn from the ASCII character set [1].&amp;nbsp; Domain &amp;nbsp;&amp;nbsp; names are used as names of hosts and of other entities in the domain &amp;nbsp;&amp;nbsp; name hierarchy.&amp;nbsp; For example, a domain may refer to an alias (label &amp;nbsp;&amp;nbsp; of a CNAME RR) or the label of Mail eXchanger records to be used to &amp;nbsp;&amp;nbsp; deliver mail instead of representing a host name.&amp;nbsp; See [22] and &amp;nbsp;&amp;nbsp; section 5 of this specification.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The domain name, as described in this document and in [22], is the &amp;nbsp;&amp;nbsp; entire, fully-qualified name (often referred to as an &quot;FQDN&quot;).&amp;nbsp; A &amp;nbsp;&amp;nbsp; domain name that is not in FQDN form is no more than a local alias. &amp;nbsp;&amp;nbsp; Local aliases MUST NOT appear in any SMTP transaction.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.6 Buffer and State Table&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; SMTP sessions are stateful, with both parties carefully maintaining a &amp;nbsp;&amp;nbsp; common view of the current state.&amp;nbsp; In this document we model this &amp;nbsp;&amp;nbsp; state by a virtual &quot;buffer&quot; and a &quot;state table&quot; on the server which &amp;nbsp;&amp;nbsp; may be used by the client to, for example, &quot;clear the buffer&quot; or &amp;nbsp;&amp;nbsp; &quot;reset the state table,&quot; causing the information in the buffer to be &amp;nbsp;&amp;nbsp; discarded and the state to be returned to some previous state.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 11] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.7 Lines&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; SMTP commands and, unless altered by a service extension, message &amp;nbsp;&amp;nbsp; data, are transmitted in &quot;lines&quot;.&amp;nbsp; Lines consist of zero or more data &amp;nbsp;&amp;nbsp; characters terminated by the sequence ASCII character &quot;CR&quot; (hex value &amp;nbsp;&amp;nbsp; 0D) followed immediately by ASCII character &quot;LF&quot; (hex value 0A). &amp;nbsp;&amp;nbsp; This termination sequence is denoted as &amp;lt;CRLF&amp;gt; in this document. &amp;nbsp;&amp;nbsp; Conforming implementations MUST NOT recognize or generate any other &amp;nbsp;&amp;nbsp; character or character sequence as a line terminator.&amp;nbsp; Limits MAY be &amp;nbsp;&amp;nbsp; imposed on line lengths by servers (see section 4.5.3).&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; In addition, the appearance of &quot;bare&quot; &quot;CR&quot; or &quot;LF&quot; characters in text &amp;nbsp;&amp;nbsp; (i.e., either without the other) has a long history of causing &amp;nbsp;&amp;nbsp; problems in mail implementations and applications that use the mail &amp;nbsp;&amp;nbsp; system as a tool.&amp;nbsp; SMTP client implementations MUST NOT transmit &amp;nbsp;&amp;nbsp; these characters except when they are intended as line terminators &amp;nbsp;&amp;nbsp; and then MUST, as indicated above, transmit them only as a &amp;lt;CRLF&amp;gt; &amp;nbsp;&amp;nbsp; sequence.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.8 Originator, Delivery, Relay, and Gateway Systems&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; This specification makes a distinction among four types of SMTP &amp;nbsp;&amp;nbsp; systems, based on the role those systems play in transmitting &amp;nbsp;&amp;nbsp; electronic mail.&amp;nbsp; An &quot;originating&quot; system (sometimes called an SMTP &amp;nbsp;&amp;nbsp; originator) introduces mail into the Internet or, more generally, &amp;nbsp;&amp;nbsp; into a transport service environment.&amp;nbsp; A &quot;delivery&quot; SMTP system is &amp;nbsp;&amp;nbsp; one that receives mail from a transport service environment and &amp;nbsp;&amp;nbsp; passes it to a mail user agent or deposits it in a message store &amp;nbsp;&amp;nbsp; which a mail user agent is expected to subsequently access.&amp;nbsp; A &amp;nbsp;&amp;nbsp; &quot;relay&quot; SMTP system (usually referred to just as a &quot;relay&quot;) receives &amp;nbsp;&amp;nbsp; mail from an SMTP client and transmits it, without modification to &amp;nbsp;&amp;nbsp; the message data other than adding trace information, to another SMTP &amp;nbsp;&amp;nbsp; server for further relaying or for delivery.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; A &quot;gateway&quot; SMTP system (usually referred to just as a &quot;gateway&quot;) &amp;nbsp;&amp;nbsp; receives mail from a client system in one transport environment and &amp;nbsp;&amp;nbsp; transmits it to a server system in another transport environment. &amp;nbsp;&amp;nbsp; Differences in protocols or message semantics between the transport &amp;nbsp;&amp;nbsp; environments on either side of a gateway may require that the gateway &amp;nbsp;&amp;nbsp; system perform transformations to the message that are not permitted &amp;nbsp;&amp;nbsp; to SMTP relay systems.&amp;nbsp; For the purposes of this specification, &amp;nbsp;&amp;nbsp; firewalls that rewrite addresses should be considered as gateways, &amp;nbsp;&amp;nbsp; even if SMTP is used on both sides of them (see [11]).&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 12] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.9 Message Content and Mail Data&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The terms &quot;message content&quot; and &quot;mail data&quot; are used interchangeably &amp;nbsp;&amp;nbsp; in this document to describe the material transmitted after the DATA &amp;nbsp;&amp;nbsp; command is accepted and before the end of data indication is &amp;nbsp;&amp;nbsp; transmitted.&amp;nbsp; Message content includes message headers and the &amp;nbsp;&amp;nbsp; possibly-structured message body.&amp;nbsp; The MIME specification [12] &amp;nbsp;&amp;nbsp; provides the standard mechanisms for structured message bodies.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.10 Mailbox and Address&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; As used in this specification, an &quot;address&quot; is a character string &amp;nbsp;&amp;nbsp; that identifies a user to whom mail will be sent or a location into &amp;nbsp;&amp;nbsp; which mail will be deposited.&amp;nbsp; The term &quot;mailbox&quot; refers to that &amp;nbsp;&amp;nbsp; depository.&amp;nbsp; The two terms are typically used interchangeably unless &amp;nbsp;&amp;nbsp; the distinction between the location in which mail is placed (the &amp;nbsp;&amp;nbsp; mailbox) and a reference to it (the address) is important.&amp;nbsp; An &amp;nbsp;&amp;nbsp; address normally consists of user and domain specifications.&amp;nbsp; The &amp;nbsp;&amp;nbsp; standard mailbox naming convention is defined to be &quot;local- &amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;A href=&quot;mailto:part@domain&quot;&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;part@domain&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&quot;: contemporary usage permits a much broader set of &amp;nbsp;&amp;nbsp; applications than simple &quot;user names&quot;.&amp;nbsp; Consequently, and due to a &amp;nbsp;&amp;nbsp; long history of problems when intermediate hosts have attempted to &amp;nbsp;&amp;nbsp; optimize transport by modifying them, the local-part MUST be &amp;nbsp;&amp;nbsp; interpreted and assigned semantics only by the host specified in the &amp;nbsp;&amp;nbsp; domain part of the address.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.3.11 Reply&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; An SMTP reply is an acknowledgment (positive or negative) sent from &amp;nbsp;&amp;nbsp; receiver to sender via the transmission channel in response to a &amp;nbsp;&amp;nbsp; command.&amp;nbsp; The general form of a reply is a numeric completion code &amp;nbsp;&amp;nbsp; (indicating failure or success) usually followed by a text string. &amp;nbsp;&amp;nbsp; The codes are for use by programs and the text is usually intended &amp;nbsp;&amp;nbsp; for human users.&amp;nbsp; Recent work [34] has specified further structuring &amp;nbsp;&amp;nbsp; of the reply strings, including the use of supplemental and more &amp;nbsp;&amp;nbsp; specific completion codes.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;2.4 General Syntax Principles and Transaction Model&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; SMTP commands and replies have a rigid syntax.&amp;nbsp; All commands begin &amp;nbsp;&amp;nbsp; with a command verb.&amp;nbsp; All Replies begin with a three digit numeric &amp;nbsp;&amp;nbsp; code.&amp;nbsp; In some commands and replies, arguments MUST follow the verb &amp;nbsp;&amp;nbsp; or reply code.&amp;nbsp; Some commands do not accept arguments (after the &amp;nbsp;&amp;nbsp; verb), and some reply codes are followed, sometimes optionally, by &amp;nbsp;&amp;nbsp; free form text.&amp;nbsp; In both cases, where text appears, it is separated &amp;nbsp;&amp;nbsp; from the verb or reply code by a space character.&amp;nbsp; Complete &amp;nbsp;&amp;nbsp; definitions of commands and replies appear in section 4.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 13] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Verbs and argument values (e.g., &quot;TO:&quot; or &quot;to:&quot; in the RCPT command &amp;nbsp;&amp;nbsp; and extension name keywords) are not case sensitive, with the sole &amp;nbsp;&amp;nbsp; exception in this specification of a mailbox local-part (SMTP &amp;nbsp;&amp;nbsp; Extensions may explicitly specify case-sensitive elements).&amp;nbsp; That is, &amp;nbsp;&amp;nbsp; a command verb, an argument value other than a mailbox local-part, &amp;nbsp;&amp;nbsp; and free form text MAY be encoded in upper case, lower case, or any &amp;nbsp;&amp;nbsp; mixture of upper and lower case with no impact on its meaning.&amp;nbsp; This &amp;nbsp;&amp;nbsp; is NOT true of a mailbox local-part.&amp;nbsp; The local-part of a mailbox &amp;nbsp;&amp;nbsp; MUST BE treated as case sensitive.&amp;nbsp; Therefore, SMTP implementations &amp;nbsp;&amp;nbsp; MUST take care to preserve the case of mailbox local-parts.&amp;nbsp; Mailbox &amp;nbsp;&amp;nbsp; domains are not case sensitive.&amp;nbsp; In particular, for some hosts the &amp;nbsp;&amp;nbsp; user &quot;smith&quot; is different from the user &quot;Smith&quot;.&amp;nbsp; However, exploiting &amp;nbsp;&amp;nbsp; the case sensitivity of mailbox local-parts impedes interoperability &amp;nbsp;&amp;nbsp; and is discouraged.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; A few SMTP servers, in violation of this specification (and RFC 821) &amp;nbsp;&amp;nbsp; require that command verbs be encoded by clients in upper case. &amp;nbsp;&amp;nbsp; Implementations MAY wish to employ this encoding to accommodate those &amp;nbsp;&amp;nbsp; servers.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The argument field consists of a variable length character string &amp;nbsp;&amp;nbsp; ending with the end of the line, i.e., with the character sequence &amp;nbsp;&amp;nbsp; &amp;lt;CRLF&amp;gt;.&amp;nbsp; The receiver will take no action until this sequence is &amp;nbsp;&amp;nbsp; received.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The syntax for each command is shown with the discussion of that &amp;nbsp;&amp;nbsp; command.&amp;nbsp; Common elements and parameters are shown in section 4.1.2.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Commands and replies are composed of characters from the ASCII &amp;nbsp;&amp;nbsp; character set [1].&amp;nbsp; When the transport service provides an 8-bit byte &amp;nbsp;&amp;nbsp; (octet) transmission channel, each 7-bit character is transmitted &amp;nbsp;&amp;nbsp; right justified in an octet with the high order bit cleared to zero. &amp;nbsp;&amp;nbsp; More specifically, the unextended SMTP service provides seven bit &amp;nbsp;&amp;nbsp; transport only.&amp;nbsp; An originating SMTP client which has not &amp;nbsp;&amp;nbsp; successfully negotiated an appropriate extension with a particular &amp;nbsp;&amp;nbsp; server MUST NOT transmit messages with information in the high-order &amp;nbsp;&amp;nbsp; bit of octets.&amp;nbsp; If such messages are transmitted in violation of this &amp;nbsp;&amp;nbsp; rule, receiving SMTP servers MAY clear the high-order bit or reject &amp;nbsp;&amp;nbsp; the message as invalid.&amp;nbsp; In general, a relay SMTP SHOULD assume that &amp;nbsp;&amp;nbsp; the message content it has received is valid and, assuming that the &amp;nbsp;&amp;nbsp; envelope permits doing so, relay it without inspecting that content. &amp;nbsp;&amp;nbsp; Of course, if the content is mislabeled and the data path cannot &amp;nbsp;&amp;nbsp; accept the actual content, this may result in ultimate delivery of a &amp;nbsp;&amp;nbsp; severely garbled message to the recipient.&amp;nbsp; Delivery SMTP systems MAY &amp;nbsp;&amp;nbsp; reject (&quot;bounce&quot;) such messages rather than deliver them.&amp;nbsp; No sending &amp;nbsp;&amp;nbsp; SMTP system is permitted to send envelope commands in any character&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 14] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; set other than US-ASCII; receiving systems SHOULD reject such &amp;nbsp;&amp;nbsp; commands, normally using &quot;500 syntax error - invalid character&quot; &amp;nbsp;&amp;nbsp; replies.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Eight-bit message content transmission MAY be requested of the server &amp;nbsp;&amp;nbsp; by a client using extended SMTP facilities, notably the &quot;8BITMIME&quot; &amp;nbsp;&amp;nbsp; extension [20].&amp;nbsp; 8BITMIME SHOULD be supported by SMTP servers. &amp;nbsp;&amp;nbsp; However, it MUST not be construed as authorization to transmit &amp;nbsp;&amp;nbsp; unrestricted eight bit material.&amp;nbsp; 8BITMIME MUST NOT be requested by &amp;nbsp;&amp;nbsp; senders for material with the high bit on that is not in MIME format &amp;nbsp;&amp;nbsp; with an appropriate content-transfer encoding; servers MAY reject &amp;nbsp;&amp;nbsp; such messages.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The metalinguistic notation used in this document corresponds to the &amp;nbsp;&amp;nbsp; &quot;Augmented BNF&quot; used in other Internet mail system documents.&amp;nbsp; The &amp;nbsp;&amp;nbsp; reader who is not familiar with that syntax should consult the ABNF &amp;nbsp;&amp;nbsp; specification [8].&amp;nbsp; Metalanguage terms used in running text are &amp;nbsp;&amp;nbsp; surrounded by pointed brackets (e.g., &amp;lt;CRLF&amp;gt;) for clarity.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;3. The SMTP Procedures: An Overview&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; This section contains descriptions of the procedures used in SMTP: &amp;nbsp;&amp;nbsp; session initiation, the mail transaction, forwarding mail, verifying &amp;nbsp;&amp;nbsp; mailbox names and expanding mailing lists, and the opening and &amp;nbsp;&amp;nbsp; closing exchanges.&amp;nbsp; Comments on relaying, a note on mail domains, and &amp;nbsp;&amp;nbsp; a discussion of changing roles are included at the end of this &amp;nbsp;&amp;nbsp; section.&amp;nbsp; Several complete scenarios are presented in appendix D.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;3.1 Session Initiation&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; An SMTP session is initiated when a client opens a connection to a &amp;nbsp;&amp;nbsp; server and the server responds with an opening message.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; SMTP server implementations MAY include identification of their &amp;nbsp;&amp;nbsp; software and version information in the connection greeting reply &amp;nbsp;&amp;nbsp; after the 220 code, a practice that permits more efficient isolation &amp;nbsp;&amp;nbsp; and repair of any problems.&amp;nbsp; Implementations MAY make provision for &amp;nbsp;&amp;nbsp; SMTP servers to disable the software and version announcement where &amp;nbsp;&amp;nbsp; it causes security concerns.&amp;nbsp; While some systems also identify their &amp;nbsp;&amp;nbsp; contact point for mail problems, this is not a substitute for &amp;nbsp;&amp;nbsp; maintaining the required &quot;postmaster&quot; address (see section 4.5.1).&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The SMTP protocol allows a server to formally reject a transaction &amp;nbsp;&amp;nbsp; while still allowing the initial connection as follows: a 554 &amp;nbsp;&amp;nbsp; response MAY be given in the initial connection opening message &amp;nbsp;&amp;nbsp; instead of the 220.&amp;nbsp; A server taking this approach MUST still wait &amp;nbsp;&amp;nbsp; for the client to send a QUIT (see section 4.1.1.10) before closing &amp;nbsp;&amp;nbsp; the connection and SHOULD respond to any intervening commands with&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;Klensin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards Track&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Page 15] RFC 2821&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple Mail Transfer Protocol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; April 2001&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt; &lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; &quot;503 bad sequence of commands&quot;.&amp;nbsp; Since an attempt to make an SMTP &amp;nbsp;&amp;nbsp; connection to such a system is probably in error, a server returning &amp;nbsp;&amp;nbsp; a 554 response on connection opening SHOULD provide enough &amp;nbsp;&amp;nbsp; information in the reply text to facilitate debugging of the sending &amp;nbsp;&amp;nbsp; system.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;3.2 Client Initiation&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; Once the server has sent the welcoming message and the client has &amp;nbsp;&amp;nbsp; received it, the client normally sends the EHLO command to the &amp;nbsp;&amp;nbsp; server, indicating the client&#039;s identity.&amp;nbsp; In addition to opening the &amp;nbsp;&amp;nbsp; session, use of EHLO indicates that the client is able to process &amp;nbsp;&amp;nbsp; service extensions and requests that the server provide a list of the &amp;nbsp;&amp;nbsp; extensions it supports.&amp;nbsp; Older SMTP systems which are unable to &amp;nbsp;&amp;nbsp; support service extensions and contemporary clients which do not &amp;nbsp;&amp;nbsp; require service extensions in the mail session being initiated, MAY &amp;nbsp;&amp;nbsp; use HELO instead of EHLO.&amp;nbsp; Servers MUST NOT return the extended &amp;nbsp;&amp;nbsp; EHLO-style response to a HELO command.&amp;nbsp; For a particular connection &amp;nbsp;&amp;nbsp; attempt, if the server returns a &quot;command not recognized&quot; response to &amp;nbsp;&amp;nbsp; EHLO, the client SHOULD be able to fall back and send HELO.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; In the EHLO command the host sending the command identifies itself; &amp;nbsp;&amp;nbsp; the command may be interpreted as saying &quot;Hello, I am &amp;lt;domain&amp;gt;&quot; (and, &amp;nbsp;&amp;nbsp; in the case of EHLO, &quot;and I support service extension requests&quot;).&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;3.3 Mail Transactions&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; There are three steps to SMTP mail transactions.&amp;nbsp; The transaction &amp;nbsp;&amp;nbsp; starts with a MAIL command which gives the sender identification. &amp;nbsp;&amp;nbsp; (In general, the MAIL command may be sent only when no mail &amp;nbsp;&amp;nbsp; transaction is in progress; see section 4.1.4.)&amp;nbsp; A series of one or &amp;nbsp;&amp;nbsp; more RCPT commands follows giving the receiver information.&amp;nbsp; Then a &amp;nbsp;&amp;nbsp; DATA command initiates transfer of the mail data and is terminated by &amp;nbsp;&amp;nbsp; the &quot;end of mail&quot; data indicator, which also confirms the &amp;nbsp;&amp;nbsp; transaction.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; The first step in the procedure is the MAIL command.&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAIL FROM:&amp;lt;reverse-path&amp;gt; [SP &amp;lt;mail-parameters&amp;gt; ] &amp;lt;CRLF&amp;gt;&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=&quot;courier new,courier&quot;&gt;&amp;nbsp;&amp;nbsp; This command tells the SMTP-receiver that a new mail transaction is &amp;nbsp;&amp;nbsp; starting and to reset all its state tables and buffers, including any &amp;nbsp;&amp;nbsp; recipients or mail data.&amp;nbsp; The &amp;lt;reverse-path&amp;gt; portion of the firs
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft