[
  {
    "section_number": "1.",
    "section_name": "Introduction",
    "tag": "Section 1. Introduction",
    "content": "1.1.  Transport of Electronic Mail\n   The objective of the Simple Mail Transfer Protocol (SMTP) is to\n   transfer mail reliably and efficiently.\n   SMTP is independent of the particular transmission subsystem and\n   requires only a reliable ordered data stream channel.  While this\n   document specifically discusses transport over TCP, other transports\n   are possible.  Appendices to RFC 821 [1] describe some of them.\n   An important feature of SMTP is its capability to transport mail\n   across multiple networks, usually referred to as \"SMTP mail relaying\"\n   (see Section 3.6).  A network consists of the mutually-TCP-accessible\n   hosts on the public Internet, the mutually-TCP-accessible hosts on a\n   firewall-isolated TCP/IP Intranet, or hosts in some other LAN or WAN\n   environment utilizing a non-TCP transport-level protocol.  Using\n   SMTP, a process can transfer mail to another process on the same\n   network or to some other network via a relay or gateway process\n   accessible to both networks.\n   In this way, a mail message may pass through a number of intermediate\n   relay or gateway hosts on its path from sender to ultimate recipient.\n   The Mail eXchanger mechanisms of the domain name system (RFC 1035\n   [2], RFC 974 [12], and Section 5 of this document) are used to\n   identify the appropriate next-hop destination for a message being\n   transported.\n1.2.  History and Context for This Document\n   This document is a specification of the basic protocol for the\n   Internet electronic mail transport.  It consolidates, updates and\n   clarifies, but does not add new or change existing functionality of\n   the following:\n   o  the original SMTP (Simple Mail Transfer Protocol) specification of\n      RFC 821 [1],\n   o  domain name system requirements and implications for mail\n      transport from RFC 1035 [2] and RFC 974 [12],\n   o  the clarifications and applicability statements in RFC 1123 [3],\n      and\n   o  material drawn from the SMTP Extension mechanisms in RFC 1869\n      [13].\n   o  Editorial and clarification changes to RFC 2821 [14] to bring that\n      specification to Draft Standard.\n   It obsoletes RFC 821, RFC 974, RFC 1869, and RFC 2821 and updates RFC\n   1123 (replacing the mail transport materials of RFC 1123).  However,\n   RFC 821 specifies some features that were not in significant use in\n   the Internet by the mid-1990s and (in appendices) some additional\n   transport models.  Those sections are omitted here in the interest of\n   clarity and brevity; readers needing them should refer to RFC 821.\n   It also includes some additional material from RFC 1123 that required\n   amplification.  This material has been identified in multiple ways,\n   mostly by tracking flaming on various lists and newsgroups and\n   problems of unusual readings or interpretations that have appeared as\n   the SMTP extensions have been deployed.  Where this specification\n   moves beyond consolidation and actually differs from earlier\n   documents, it supersedes them technically as well as textually.\n   Although SMTP was designed as a mail transport and delivery protocol,\n   this specification also contains information that is important to its\n   use as a \"mail submission\" protocol, as recommended for Post Office\n   Protocol (POP) (RFC 937 [15], RFC 1939 [16]) and IMAP (RFC 3501\n   [17]).  In general, the separate mail submission protocol specified\n   in RFC 4409 [18] is now preferred to direct use of SMTP; more\n   discussion of that subject appears in that document.\n   Section 2.3 provides definitions of terms specific to this document.\n   Except when the historical terminology is necessary for clarity, this\n   document uses the current 'client' and 'server' terminology to\n   identify the sending and receiving SMTP processes, respectively.\n   A companion document, RFC 5322 [4], discusses message header sections\n   and bodies and specifies formats and structures for them.\n1.3.  Document Conventions\n   The key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\",\n   \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this\n   document are to be interpreted as described in RFC 2119 [5].  As each\n   of these terms was intentionally and carefully chosen to improve the\n   interoperability of email, each use of these terms is to be treated\n   as a conformance requirement.\n   Because this document has a long history and to avoid the risk of\n   various errors and of confusing readers and documents that point to\n   this one, most examples and the domain names they contain are\n   preserved from RFC 2821.  Readers are cautioned that these are\n   illustrative examples that should not actually be used in either code\n   or configuration files."
  },
  {
    "section_number": "2.",
    "section_name": "The SMTP Model",
    "tag": "Section 2. The SMTP Model",
    "content": "2.1.  Basic Structure\n   The SMTP design can be pictured as:\n                  +----------+                +----------+\n      +------+    |          |                |          |\n      | User |<-->|          |      SMTP      |          |\n      +------+    |  Client- |Commands/Replies| Server-  |\n      +------+    |   SMTP   |<-------------->|    SMTP  |    +------+\n      | File |<-->|          |    and Mail    |          |<-->| File |\n      |System|    |          |                |          |    |System|\n      +------+    +----------+                +----------+    +------+\n                   SMTP client                SMTP server\n   When an SMTP client has a message to transmit, it establishes a two-\n   way transmission channel to an SMTP server.  The responsibility of an\n   SMTP client is to transfer mail messages to one or more SMTP servers,\n   or report its failure to do so.\n   The means by which a mail message is presented to an SMTP client, and\n   how that client determines the identifier(s) (\"names\") of the\n   domain(s) to which mail messages are to be transferred, is a local\n   matter, and is not addressed by this document.  In some cases, the\n   designated domain(s), or those determined by an SMTP client, will\n   identify the final destination(s) of the mail message.  In other\n   cases, common with SMTP clients associated with implementations of\n   the POP (RFC 937 [15], RFC 1939 [16]) or IMAP (RFC 3501 [17])\n   protocols, or when the SMTP client is inside an isolated transport\n   service environment, the domain determined will identify an\n   intermediate destination through which all mail messages are to be\n   relayed.  SMTP clients that transfer all traffic regardless of the\n   target domains associated with the individual messages, or that do\n   not maintain queues for retrying message transmissions that initially\n   cannot be completed, may otherwise conform to this specification but\n   are not considered fully-capable.  Fully-capable SMTP\n   implementations, including the relays used by these less capable\n   ones, and their destinations, are expected to support all of the\n   queuing, retrying, and alternate address functions discussed in this\n   specification.  In many situations and configurations, the less-\n   capable clients discussed above SHOULD be using the message\n   submission protocol (RFC 4409 [18]) rather than SMTP.\n   The means by which an SMTP client, once it has determined a target\n   domain, determines the identity of an SMTP server to which a copy of\n   a message is to be transferred, and then performs that transfer, is\n   covered by this document.  To effect a mail transfer to an SMTP\n   server, an SMTP client establishes a two-way transmission channel to\n   that SMTP server.  An SMTP client determines the address of an\n   appropriate host running an SMTP server by resolving a destination\n   domain name to either an intermediate Mail eXchanger host or a final\n   target host.\n   An SMTP server may be either the ultimate destination or an\n   intermediate \"relay\" (that is, it may assume the role of an SMTP\n   client after receiving the message) or \"gateway\" (that is, it may\n   transport the message further using some protocol other than SMTP).\n   SMTP commands are generated by the SMTP client and sent to the SMTP\n   server.  SMTP replies are sent from the SMTP server to the SMTP\n   client in response to the commands.\n   In other words, message transfer can occur in a single connection\n   between the original SMTP-sender and the final SMTP-recipient, or can\n   occur in a series of hops through intermediary systems.  In either\n   case, once the server has issued a success response at the end of the\n   mail data, a formal handoff of responsibility for the message occurs:\n   the protocol requires that a server MUST accept responsibility for\n   either delivering the message or properly reporting the failure to do\n   so (see Sections 6.1, 6.2, and 7.8, below).\n   Once the transmission channel is established and initial handshaking\n   is completed, the SMTP client normally initiates a mail transaction.\n   Such a transaction consists of a series of commands to specify the\n   originator and destination of the mail and transmission of the\n   message content (including any lines in the header section or other\n   structure) itself.  When the same message is sent to multiple\n   recipients, this protocol encourages the transmission of only one\n   copy of the data for all recipients at the same destination (or\n   intermediate relay) host.\n   The server responds to each command with a reply; replies may\n   indicate that the command was accepted, that additional commands are\n   expected, or that a temporary or permanent error condition exists.\n   Commands specifying the sender or recipients may include server-\n   permitted SMTP service extension requests, as discussed in\n   Section 2.2.  The dialog is purposely lock-step, one-at-a-time,\n   although this can be modified by mutually agreed upon extension\n   requests such as command pipelining (RFC 2920 [19]).\n   Once a given mail message has been transmitted, the client may either\n   request that the connection be shut down or may initiate other mail\n   transactions.  In addition, an SMTP client may use a connection to an\n   SMTP server for ancillary services such as verification of email\n   addresses or retrieval of mailing list subscriber addresses.\n   As suggested above, this protocol provides mechanisms for the\n   transmission of mail.  Historically, this transmission normally\n   occurred directly from the sending user's host to the receiving\n   user's host when the two hosts are connected to the same transport\n   service.  When they are not connected to the same transport service,\n   transmission occurs via one or more relay SMTP servers.  A very\n   common case in the Internet today involves submission of the original\n   message to an intermediate, \"message submission\" server, which is\n   similar to a relay but has some additional properties; such servers\n   are discussed in Section 2.3.10 and at some length in RFC 4409 [18].\n   An intermediate host that acts as either an SMTP relay or as a\n   gateway into some other transmission environment is usually selected\n   through the use of the domain name service (DNS) Mail eXchanger\n   mechanism.\n   Usually, intermediate hosts are determined via the DNS MX record, not\n   by explicit \"source\" routing (see Section 5 and Appendix C and\n   Appendix F.2).\n2.2.  The Extension Model\n2.2.1.  Background\n   In an effort that started in 1990, approximately a decade after RFC\n   821 was completed, the protocol was modified with a \"service\n   extensions\" model that permits the client and server to agree to\n   utilize shared functionality beyond the original SMTP requirements.\n   The SMTP extension mechanism defines a means whereby an extended SMTP\n   client and server may recognize each other, and the server can inform\n   the client as to the service extensions that it supports.\n   Contemporary SMTP implementations MUST support the basic extension\n   mechanisms.  For instance, servers MUST support the EHLO command even\n   if they do not implement any specific extensions and clients SHOULD\n   preferentially utilize EHLO rather than HELO.  (However, for\n   compatibility with older conforming implementations, SMTP clients and\n   servers MUST support the original HELO mechanisms as a fallback.)\n   Unless the different characteristics of HELO must be identified for\n   interoperability purposes, this document discusses only EHLO.\n   SMTP is widely deployed and high-quality implementations have proven\n   to be very robust.  However, the Internet community now considers\n   some services to be important that were not anticipated when the\n   protocol was first designed.  If support for those services is to be\n   added, it must be done in a way that permits older implementations to\n   continue working acceptably.  The extension framework consists of:\n   o  The SMTP command EHLO, superseding the earlier HELO,\n   o  a registry of SMTP service extensions,\n   o  additional parameters to the SMTP MAIL and RCPT commands, and\n   o  optional replacements for commands defined in this protocol, such\n      as for DATA in non-ASCII transmissions (RFC 3030 [20]).\n   SMTP's strength comes primarily from its simplicity.  Experience with\n   many protocols has shown that protocols with few options tend towards\n   ubiquity, whereas protocols with many options tend towards obscurity.\n   Each and every extension, regardless of its benefits, must be\n   carefully scrutinized with respect to its implementation, deployment,\n   and interoperability costs.  In many cases, the cost of extending the\n   SMTP service will likely outweigh the benefit.\n2.2.2.  Definition and Registration of Extensions\n   The IANA maintains a registry of SMTP service extensions.  A\n   corresponding EHLO keyword value is associated with each extension.\n   Each service extension registered with the IANA must be defined in a\n   formal Standards-Track or IESG-approved Experimental protocol\n   document.  The definition must include:\n   o  the textual name of the SMTP service extension;\n   o  the EHLO keyword value associated with the extension;\n   o  the syntax and possible values of parameters associated with the\n      EHLO keyword value;\n   o  any additional SMTP verbs associated with the extension\n      (additional verbs will usually be, but are not required to be, the\n      same as the EHLO keyword value);\n   o  any new parameters the extension associates with the MAIL or RCPT\n      verbs;\n   o  a description of how support for the extension affects the\n      behavior of a server and client SMTP; and\n   o  the increment by which the extension is increasing the maximum\n      length of the commands MAIL and/or RCPT, over that specified in\n      this Standard.\n   In addition, any EHLO keyword value starting with an upper or lower\n   case \"X\" refers to a local SMTP service extension used exclusively\n   through bilateral agreement.  Keywords beginning with \"X\" MUST NOT be\n   used in a registered service extension.  Conversely, keyword values\n   presented in the EHLO response that do not begin with \"X\" MUST\n   correspond to a Standard, Standards-Track, or IESG-approved\n   Experimental SMTP service extension registered with IANA.  A\n   conforming server MUST NOT offer non-\"X\"-prefixed keyword values that\n   are not described in a registered extension.\n   Additional verbs and parameter names are bound by the same rules as\n   EHLO keywords; specifically, verbs beginning with \"X\" are local\n   extensions that may not be registered or standardized.  Conversely,\n   verbs not beginning with \"X\" must always be registered.\n2.2.3.  Special Issues with Extensions\n   Extensions that change fairly basic properties of SMTP operation are\n   permitted.  The text in other sections of this document must be\n   understood in that context.  In particular, extensions can change the\n   minimum limits specified in Section 4.5.3, can change the ASCII\n   character set requirement as mentioned above, or can introduce some\n   optional modes of message handling.\n   In particular, if an extension implies that the delivery path\n   normally supports special features of that extension, and an\n   intermediate SMTP system finds a next hop that does not support the\n   required extension, it MAY choose, based on the specific extension\n   and circumstances, to requeue the message and try later and/or try an\n   alternate MX host.  If this strategy is employed, the timeout to fall\n   back to an unextended format (if one is available) SHOULD be less\n   than the normal timeout for bouncing as undeliverable (e.g., if\n   normal timeout is three days, the requeue timeout before attempting\n   to transmit the mail without the extension might be one day).\n2.3.  SMTP Terminology\n2.3.1.  Mail Objects\n   SMTP transports a mail object.  A mail object contains an envelope\n   and content.\n   The SMTP envelope is sent as a series of SMTP protocol units\n   (described in Section 3).  It consists of an originator address (to\n   which error reports should be directed), one or more recipient\n   addresses, and optional protocol extension material.  Historically,\n   variations on the reverse-path (originator) address specification\n   command (MAIL) could be used to specify alternate delivery modes,\n   such as immediate display; those variations have now been deprecated\n   (see Appendix F and Appendix F.6).\n   The SMTP content is sent in the SMTP DATA protocol unit and has two\n   parts: the header section and the body.  If the content conforms to\n   other contemporary standards, the header section consists of a\n   collection of header fields, each consisting of a header name, a\n   colon, and data, structured as in the message format specification\n   (RFC 5322 [4]); the body, if structured, is defined according to MIME\n   (RFC 2045 [21]).  The content is textual in nature, expressed using\n   the US-ASCII repertoire [6].  Although SMTP extensions (such as\n   \"8BITMIME\", RFC 1652 [22]) may relax this restriction for the content\n   body, the content header fields are always encoded using the US-ASCII\n   repertoire.  Two MIME extensions (RFC 2047 [23] and RFC 2231 [24])\n   define an algorithm for representing header values outside the US-\n   ASCII repertoire, while still encoding them using the US-ASCII\n   repertoire.\n2.3.2.  Senders and Receivers\n   In RFC 821, the two hosts participating in an SMTP transaction were\n   described as the \"SMTP-sender\" and \"SMTP-receiver\".  This document\n   has been changed to reflect current industry terminology and hence\n   refers to them as the \"SMTP client\" (or sometimes just \"the client\")\n   and \"SMTP server\" (or just \"the server\"), respectively.  Since a\n   given host may act both as server and client in a relay situation,\n   \"receiver\" and \"sender\" terminology is still used where needed for\n   clarity.\n2.3.3.  Mail Agents and Message Stores\n   Additional mail system terminology became common after RFC 821 was\n   published and, where convenient, is used in this specification.  In\n   particular, SMTP servers and clients provide a mail transport service\n   and therefore act as \"Mail Transfer Agents\" (MTAs).  \"Mail User\n   Agents\" (MUAs or UAs) are normally thought of as the sources and\n   targets of mail.  At the source, an MUA might collect mail to be\n   transmitted from a user and hand it off to an MTA; the final\n   (\"delivery\") MTA would be thought of as handing the mail off to an\n   MUA (or at least transferring responsibility to it, e.g., by\n   depositing the message in a \"message store\").  However, while these\n   terms are used with at least the appearance of great precision in\n   other environments, the implied boundaries between MUAs and MTAs\n   often do not accurately match common, and conforming, practices with\n   Internet mail.  Hence, the reader should be cautious about inferring\n   the strong relationships and responsibilities that might be implied\n   if these terms were used elsewhere.\n2.3.4.  Host\n   For the purposes of this specification, a host is a computer system\n   attached to the Internet (or, in some cases, to a private TCP/IP\n   network) and supporting the SMTP protocol.  Hosts are known by names\n   (see the next section); they SHOULD NOT be identified by numerical\n   addresses, i.e., by address literals as described in Section 4.1.2.\n2.3.5.  Domain Names\n   A domain name (or often just a \"domain\") consists of one or more\n   components, separated by dots if more than one appears.  In the case\n   of a top-level domain used by itself in an email address, a single\n   string is used without any dots.  This makes the requirement,\n   described in more detail below, that only fully-qualified domain\n   names appear in SMTP transactions on the public Internet,\n   particularly important where top-level domains are involved.  These\n   components (\"labels\" in DNS terminology, RFC 1035 [2]) are restricted\n   for SMTP purposes to consist of a sequence of letters, digits, and\n   hyphens drawn from the ASCII character set [6].  Domain names are\n   used as names of hosts and of other entities in the domain name\n   hierarchy.  For example, a domain may refer to an alias (label of a\n   CNAME RR) or the label of Mail eXchanger records to be used to\n   deliver mail instead of representing a host name.  See RFC 1035 [2]\n   and Section 5 of this specification.\n   The domain name, as described in this document and in RFC 1035 [2],\n   is the entire, fully-qualified name (often referred to as an \"FQDN\").\n   A domain name that is not in FQDN form is no more than a local alias.\n   Local aliases MUST NOT appear in any SMTP transaction.\n   Only resolvable, fully-qualified domain names (FQDNs) are permitted\n   when domain names are used in SMTP.  In other words, names that can\n   be resolved to MX RRs or address (i.e., A or AAAA) RRs (as discussed\n   in Section 5) are permitted, as are CNAME RRs whose targets can be\n   resolved, in turn, to MX or address RRs.  Local nicknames or\n   unqualified names MUST NOT be used.  There are two exceptions to the\n   rule requiring FQDNs:\n   o  The domain name given in the EHLO command MUST be either a primary\n      host name (a domain name that resolves to an address RR) or, if\n      the host has no name, an address literal, as described in\n      Section 4.1.3 and discussed further in the EHLO discussion of\n      Section 4.1.4.\n   o  The reserved mailbox name \"postmaster\" may be used in a RCPT\n      command without domain qualification (see Section 4.1.1.3) and\n      MUST be accepted if so used.\n2.3.6.  Buffer and State Table\n   SMTP sessions are stateful, with both parties carefully maintaining a\n   common view of the current state.  In this document, we model this\n   state by a virtual \"buffer\" and a \"state table\" on the server that\n   may be used by the client to, for example, \"clear the buffer\" or\n   \"reset the state table\", causing the information in the buffer to be\n   discarded and the state to be returned to some previous state.\n2.3.7.  Commands and Replies\n   SMTP commands and, unless altered by a service extension, message\n   data, are transmitted from the sender to the receiver via the\n   transmission channel in \"lines\".\n   An SMTP reply is an acknowledgment (positive or negative) sent in\n   \"lines\" from receiver to sender via the transmission channel in\n   response to a command.  The general form of a reply is a numeric\n   completion code (indicating failure or success) usually followed by a\n   text string.  The codes are for use by programs and the text is\n   usually intended for human users.  RFC 3463 [25], specifies further\n   structuring of the reply strings, including the use of supplemental\n   and more specific completion codes (see also RFC 5248 [26]).\n2.3.8.  Lines\n   Lines consist of zero or more data characters terminated by the\n   sequence ASCII character \"CR\" (hex value 0D) followed immediately by\n   ASCII character \"LF\" (hex value 0A).  This termination sequence is\n   denoted as <CRLF> in this document.  Conforming implementations MUST\n   NOT recognize or generate any other character or character sequence\n   as a line terminator.  Limits MAY be imposed on line lengths by\n   servers (see Section 4).\n   In addition, the appearance of \"bare\" \"CR\" or \"LF\" characters in text\n   (i.e., either without the other) has a long history of causing\n   problems in mail implementations and applications that use the mail\n   system as a tool.  SMTP client implementations MUST NOT transmit\n   these characters except when they are intended as line terminators\n   and then MUST, as indicated above, transmit them only as a <CRLF>\n   sequence.\n2.3.9.  Message Content and Mail Data\n   The terms \"message content\" and \"mail data\" are used interchangeably\n   in this document to describe the material transmitted after the DATA\n   command is accepted and before the end of data indication is\n   transmitted.  Message content includes the message header section and\n   the possibly structured message body.  The MIME specification (RFC\n   2045 [21]) provides the standard mechanisms for structured message\n   bodies.\n2.3.10.  Originator, Delivery, Relay, and Gateway Systems\n   This specification makes a distinction among four types of SMTP\n   systems, based on the role those systems play in transmitting\n   electronic mail.  An \"originating\" system (sometimes called an SMTP\n   originator) introduces mail into the Internet or, more generally,\n   into a transport service environment.  A \"delivery\" SMTP system is\n   one that receives mail from a transport service environment and\n   passes it to a mail user agent or deposits it in a message store that\n   a mail user agent is expected to subsequently access.  A \"relay\" SMTP\n   system (usually referred to just as a \"relay\") receives mail from an\n   SMTP client and transmits it, without modification to the message\n   data other than adding trace information, to another SMTP server for\n   further relaying or for delivery.\n   A \"gateway\" SMTP system (usually referred to just as a \"gateway\")\n   receives mail from a client system in one transport environment and\n   transmits it to a server system in another transport environment.\n   Differences in protocols or message semantics between the transport\n   environments on either side of a gateway may require that the gateway\n   system perform transformations to the message that are not permitted\n   to SMTP relay systems.  For the purposes of this specification,\n   firewalls that rewrite addresses should be considered as gateways,\n   even if SMTP is used on both sides of them (see RFC 2979 [27]).\n2.3.11.  Mailbox and Address\n   As used in this specification, an \"address\" is a character string\n   that identifies a user to whom mail will be sent or a location into\n   which mail will be deposited.  The term \"mailbox\" refers to that\n   depository.  The two terms are typically used interchangeably unless\n   the distinction between the location in which mail is placed (the\n   mailbox) and a reference to it (the address) is important.  An\n   address normally consists of user and domain specifications.  The\n   standard mailbox naming convention is defined to be\n   \"local-part@domain\"; contemporary usage permits a much broader set of\n   applications than simple \"user names\".  Consequently, and due to a\n   long history of problems when intermediate hosts have attempted to\n   optimize transport by modifying them, the local-part MUST be\n   interpreted and assigned semantics only by the host specified in the\n   domain part of the address.\n2.4.  General Syntax Principles and Transaction Model\n   SMTP commands and replies have a rigid syntax.  All commands begin\n   with a command verb.  All replies begin with a three digit numeric\n   code.  In some commands and replies, arguments are required following\n   the verb or reply code.  Some commands do not accept arguments (after\n   the verb), and some reply codes are followed, sometimes optionally,\n   by free form text.  In both cases, where text appears, it is\n   separated from the verb or reply code by a space character.  Complete\n   definitions of commands and replies appear in Section 4.\n   Verbs and argument values (e.g., \"TO:\" or \"to:\" in the RCPT command\n   and extension name keywords) are not case sensitive, with the sole\n   exception in this specification of a mailbox local-part (SMTP\n   Extensions may explicitly specify case-sensitive elements).  That is,\n   a command verb, an argument value other than a mailbox local-part,\n   and free form text MAY be encoded in upper case, lower case, or any\n   mixture of upper and lower case with no impact on its meaning.  The\n   local-part of a mailbox MUST BE treated as case sensitive.\n   Therefore, SMTP implementations MUST take care to preserve the case\n   of mailbox local-parts.  In particular, for some hosts, the user\n   \"smith\" is different from the user \"Smith\".  However, exploiting the\n   case sensitivity of mailbox local-parts impedes interoperability and\n   is discouraged.  Mailbox domains follow normal DNS rules and are\n   hence not case sensitive.\n   A few SMTP servers, in violation of this specification (and RFC 821)\n   require that command verbs be encoded by clients in upper case.\n   Implementations MAY wish to employ this encoding to accommodate those\n   servers.\n   The argument clause consists of a variable-length character string\n   ending with the end of the line, i.e., with the character sequence\n   <CRLF>.  The receiver will take no action until this sequence is\n   received.\n   The syntax for each command is shown with the discussion of that\n   command.  Common elements and parameters are shown in Section 4.1.2.\n   Commands and replies are composed of characters from the ASCII\n   character set [6].  When the transport service provides an 8-bit byte\n   (octet) transmission channel, each 7-bit character is transmitted,\n   right justified, in an octet with the high-order bit cleared to zero.\n   More specifically, the unextended SMTP service provides 7-bit\n   transport only.  An originating SMTP client that has not successfully\n   negotiated an appropriate extension with a particular server (see the\n   next paragraph) MUST NOT transmit messages with information in the\n   high-order bit of octets.  If such messages are transmitted in\n   violation of this rule, receiving SMTP servers MAY clear the high-\n   order bit or reject the message as invalid.  In general, a relay SMTP\n   SHOULD assume that the message content it has received is valid and,\n   assuming that the envelope permits doing so, relay it without\n   inspecting that content.  Of course, if the content is mislabeled and\n   the data path cannot accept the actual content, this may result in\n   the ultimate delivery of a severely garbled message to the recipient.\n   Delivery SMTP systems MAY reject such messages, or return them as\n   undeliverable, rather than deliver them.  In the absence of a server-\n   offered extension explicitly permitting it, a sending SMTP system is\n   not permitted to send envelope commands in any character set other\n   than US-ASCII.  Receiving systems SHOULD reject such commands,\n   normally using \"500 syntax error - invalid character\" replies.\n   8-bit message content transmission MAY be requested of the server by\n   a client using extended SMTP facilities, notably the \"8BITMIME\"\n   extension, RFC 1652 [22]. 8BITMIME SHOULD be supported by SMTP\n   servers.  However, it MUST NOT be construed as authorization to\n   transmit unrestricted 8-bit material, nor does 8BITMIME authorize\n   transmission of any envelope material in other than ASCII. 8BITMIME\n   MUST NOT be requested by senders for material with the high bit on\n   that is not in MIME format with an appropriate content-transfer\n   encoding; servers MAY reject such messages.\n   The metalinguistic notation used in this document corresponds to the\n   \"Augmented BNF\" used in other Internet mail system documents.  The\n   reader who is not familiar with that syntax should consult the ABNF\n   specification in RFC 5234 [7].  Metalanguage terms used in running\n   text are surrounded by pointed brackets (e.g., <CRLF>) for clarity.\n   The reader is cautioned that the grammar expressed in the\n   metalanguage is not comprehensive.  There are many instances in which\n   provisions in the text constrain or otherwise modify the syntax or\n   semantics implied by the grammar."
  },
  {
    "section_number": "3.",
    "section_name": "The SMTP Procedures: An Overview",
    "tag": "Section 3. The SMTP Procedures: An Overview",
    "content": "This section contains descriptions of the procedures used in SMTP:\n   session initiation, mail transaction, forwarding mail, verifying\n   mailbox names and expanding mailing lists, and opening and closing\n   exchanges.  Comments on relaying, a note on mail domains, and a\n   discussion of changing roles are included at the end of this section.\n   Several complete scenarios are presented in Appendix D.\n3.1.  Session Initiation\n   An SMTP session is initiated when a client opens a connection to a\n   server and the server responds with an opening message.\n   SMTP server implementations MAY include identification of their\n   software and version information in the connection greeting reply\n   after the 220 code, a practice that permits more efficient isolation\n   and repair of any problems.  Implementations MAY make provision for\n   SMTP servers to disable the software and version announcement where\n   it causes security concerns.  While some systems also identify their\n   contact point for mail problems, this is not a substitute for\n   maintaining the required \"postmaster\" address (see Section 4).\n   The SMTP protocol allows a server to formally reject a mail session\n   while still allowing the initial connection as follows: a 554\n   response MAY be given in the initial connection opening message\n   instead of the 220.  A server taking this approach MUST still wait\n   for the client to send a QUIT (see Section 4.1.1.10) before closing\n   the connection and SHOULD respond to any intervening commands with\n   \"503 bad sequence of commands\".  Since an attempt to make an SMTP\n   connection to such a system is probably in error, a server returning\n   a 554 response on connection opening SHOULD provide enough\n   information in the reply text to facilitate debugging of the sending\n   system.\n3.2.  Client Initiation\n   Once the server has sent the greeting (welcoming) message and the\n   client has received it, the client normally sends the EHLO command to\n   the server, indicating the client's identity.  In addition to opening\n   the session, use of EHLO indicates that the client is able to process\n   service extensions and requests that the server provide a list of the\n   extensions it supports.  Older SMTP systems that are unable to\n   support service extensions, and contemporary clients that do not\n   require service extensions in the mail session being initiated, MAY\n   use HELO instead of EHLO.  Servers MUST NOT return the extended EHLO-\n   style response to a HELO command.  For a particular connection\n   attempt, if the server returns a \"command not recognized\" response to\n   EHLO, the client SHOULD be able to fall back and send HELO.\n   In the EHLO command, the host sending the command identifies itself;\n   the command may be interpreted as saying \"Hello, I am <domain>\" (and,\n   in the case of EHLO, \"and I support service extension requests\").\n3.3.  Mail Transactions\n   There are three steps to SMTP mail transactions.  The transaction\n   starts with a MAIL command that gives the sender identification.  (In\n   general, the MAIL command may be sent only when no mail transaction\n   is in progress; see Section 4.1.4.)  A series of one or more RCPT\n   commands follows, giving the receiver information.  Then, a DATA\n   command initiates transfer of the mail data and is terminated by the\n   \"end of mail\" data indicator, which also confirms the transaction.\n   The first step in the procedure is the MAIL command.\n      MAIL FROM:<reverse-path> [SP <mail-parameters> ] <CRLF>\n   This command tells the SMTP-receiver that a new mail transaction is\n   starting and to reset all its state tables and buffers, including any\n   recipients or mail data.  The <reverse-path> portion of the first or\n   only argument contains the source mailbox (between \"<\" and \">\"\n   brackets), which can be used to report errors (see Section 4.2 for a\n   discussion of error reporting).  If accepted, the SMTP server returns\n   a \"250 OK\" reply.  If the mailbox specification is not acceptable for\n   some reason, the server MUST return a reply indicating whether the\n   failure is permanent (i.e., will occur again if the client tries to\n   send the same address again) or temporary (i.e., the address might be\n   accepted if the client tries again later).  Despite the apparent\n   scope of this requirement, there are circumstances in which the\n   acceptability of the reverse-path may not be determined until one or\n   more forward-paths (in RCPT commands) can be examined.  In those\n   cases, the server MAY reasonably accept the reverse-path (with a 250\n   reply) and then report problems after the forward-paths are received\n   and examined.  Normally, failures produce 550 or 553 replies.\n   Historically, the <reverse-path> was permitted to contain more than\n   just a mailbox; however, contemporary systems SHOULD NOT use source\n   routing (see Appendix C).\n   The optional <mail-parameters> are associated with negotiated SMTP\n   service extensions (see Section 2.2).\n   The second step in the procedure is the RCPT command.  This step of\n   the procedure can be repeated any number of times.\n      RCPT TO:<forward-path> [ SP <rcpt-parameters> ] <CRLF>\n   The first or only argument to this command includes a forward-path\n   (normally a mailbox and domain, always surrounded by \"<\" and \">\"\n   brackets) identifying one recipient.  If accepted, the SMTP server\n   returns a \"250 OK\" reply and stores the forward-path.  If the\n   recipient is known not to be a deliverable address, the SMTP server\n   returns a 550 reply, typically with a string such as \"no such user -\n   \" and the mailbox name (other circumstances and reply codes are\n   possible).\n   The <forward-path> can contain more than just a mailbox.\n   Historically, the <forward-path> was permitted to contain a source\n   routing list of hosts and the destination mailbox; however,\n   contemporary SMTP clients SHOULD NOT utilize source routes (see\n   Appendix C).  Servers MUST be prepared to encounter a list of source\n   routes in the forward-path, but they SHOULD ignore the routes or MAY\n   decline to support the relaying they imply.  Similarly, servers MAY\n   decline to accept mail that is destined for other hosts or systems.\n   These restrictions make a server useless as a relay for clients that\n   do not support full SMTP functionality.  Consequently, restricted-\n   capability clients MUST NOT assume that any SMTP server on the\n   Internet can be used as their mail processing (relaying) site.  If a\n   RCPT command appears without a previous MAIL command, the server MUST\n   return a 503 \"Bad sequence of commands\" response.  The optional\n   <rcpt-parameters> are associated with negotiated SMTP service\n   extensions (see Section 2.2).\n   Since it has been a common source of errors, it is worth noting that\n   spaces are not permitted on either side of the colon following FROM\n   in the MAIL command or TO in the RCPT command.  The syntax is exactly\n   as given above.\n   The third step in the procedure is the DATA command (or some\n   alternative specified in a service extension).\n      DATA <CRLF>\n   If accepted, the SMTP server returns a 354 Intermediate reply and\n   considers all succeeding lines up to but not including the end of\n   mail data indicator to be the message text.  When the end of text is\n   successfully received and stored, the SMTP-receiver sends a \"250 OK\"\n   reply.\n   Since the mail data is sent on the transmission channel, the end of\n   mail data must be indicated so that the command and reply dialog can\n   be resumed.  SMTP indicates the end of the mail data by sending a\n   line containing only a \".\" (period or full stop).  A transparency\n   procedure is used to prevent this from interfering with the user's\n   text (see Section 4.5.2).\n   The end of mail data indicator also confirms the mail transaction and\n   tells the SMTP server to now process the stored recipients and mail\n   data.  If accepted, the SMTP server returns a \"250 OK\" reply.  The\n   DATA command can fail at only two points in the protocol exchange:\n   If there was no MAIL, or no RCPT, command, or all such commands were\n   rejected, the server MAY return a \"command out of sequence\" (503) or\n   \"no valid recipients\" (554) reply in response to the DATA command.\n   If one of those replies (or any other 5yz reply) is received, the\n   client MUST NOT send the message data; more generally, message data\n   MUST NOT be sent unless a 354 reply is received.\n   If the verb is initially accepted and the 354 reply issued, the DATA\n   command should fail only if the mail transaction was incomplete (for\n   example, no recipients), if resources were unavailable (including, of\n   course, the server unexpectedly becoming unavailable), or if the\n   server determines that the message should be rejected for policy or\n   other reasons.\n   However, in practice, some servers do not perform recipient\n   verification until after the message text is received.  These servers\n   SHOULD treat a failure for one or more recipients as a \"subsequent\n   failure\" and return a mail message as discussed in Section 6 and, in\n   particular, in Section 6.1.  Using a \"550 mailbox not found\" (or\n   equivalent) reply code after the data are accepted makes it difficult\n   or impossible for the client to determine which recipients failed.\n   When the RFC 822 format ([28], [4]) is being used, the mail data\n   include the header fields such as those named Date, Subject, To, Cc,\n   and From.  Server SMTP systems SHOULD NOT reject messages based on\n   perceived defects in the RFC 822 or MIME (RFC 2045 [21]) message\n   header section or message body.  In particular, they MUST NOT reject\n   messages in which the numbers of Resent-header fields do not match or\n   Resent-to appears without Resent-from and/or Resent-date.\n   Mail transaction commands MUST be used in the order discussed above.\n3.4.  Forwarding for Address Correction or Updating\n   Forwarding support is most often required to consolidate and simplify\n   addresses within, or relative to, some enterprise and less frequently\n   to establish addresses to link a person's prior address with a\n   current one.  Silent forwarding of messages (without server\n   notification to the sender), for security or non-disclosure purposes,\n   is common in the contemporary Internet.\n   In both the enterprise and the \"new address\" cases, information\n   hiding (and sometimes security) considerations argue against exposure\n   of the \"final\" address through the SMTP protocol as a side effect of\n   the forwarding activity.  This may be especially important when the\n   final address may not even be reachable by the sender.  Consequently,\n   the \"forwarding\" mechanisms described in Section 3.2 of RFC 821, and\n   especially the 251 (corrected destination) and 551 reply codes from\n   RCPT must be evaluated carefully by implementers and, when they are\n   available, by those configuring systems (see also Section 7.4).\n   In particular:\n   o  Servers MAY forward messages when they are aware of an address\n      change.  When they do so, they MAY either provide address-updating\n      information with a 251 code, or may forward \"silently\" and return\n      a 250 code.  However, if a 251 code is used, they MUST NOT assume\n      that the client will actually update address information or even\n      return that information to the user.\n   Alternately,\n   o  Servers MAY reject messages or return them as non-deliverable when\n      they cannot be delivered precisely as addressed.  When they do so,\n      they MAY either provide address-updating information with a 551\n      code, or may reject the message as undeliverable with a 550 code\n      and no address-specific information.  However, if a 551 code is\n      used, they MUST NOT assume that the client will actually update\n      address information or even return that information to the user.\n   SMTP server implementations that support the 251 and/or 551 reply\n   codes SHOULD provide configuration mechanisms so that sites that\n   conclude that they would undesirably disclose information can disable\n   or restrict their use.\n3.5.  Commands for Debugging Addresses\n3.5.1.  Overview\n   SMTP provides commands to verify a user name or obtain the content of\n   a mailing list.  This is done with the VRFY and EXPN commands, which\n   have character string arguments.  Implementations SHOULD support VRFY\n   and EXPN (however, see Section 3.5.2 and Section 7.3).\n   For the VRFY command, the string is a user name or a user name and\n   domain (see below).  If a normal (i.e., 250) response is returned,\n   the response MAY include the full name of the user and MUST include\n   the mailbox of the user.  It MUST be in either of the following\n   forms:\n      User Name <local-part@domain>\n      local-part@domain\n   When a name that is the argument to VRFY could identify more than one\n   mailbox, the server MAY either note the ambiguity or identify the\n   alternatives.  In other words, any of the following are legitimate\n   responses to VRFY:\n      553 User ambiguous\n   or\n      553- Ambiguous; Possibilities are\n      553-Joe Smith <jsmith@foo.com>\n      553-Harry Smith <hsmith@foo.com>\n      553 Melvin Smith <dweep@foo.com>\n   or\n      553-Ambiguous; Possibilities\n      553- <jsmith@foo.com>\n      553- <hsmith@foo.com>\n      553 <dweep@foo.com>\n   Under normal circumstances, a client receiving a 553 reply would be\n   expected to expose the result to the user.  Use of exactly the forms\n   given, and the \"user ambiguous\" or \"ambiguous\" keywords, possibly\n   supplemented by extended reply codes, such as those described in RFC\n   3463 [25], will facilitate automated translation into other languages\n   as needed.  Of course, a client that was highly automated or that was\n   operating in another language than English might choose to try to\n   translate the response to return some other indication to the user\n   than the literal text of the reply, or to take some automated action\n   such as consulting a directory service for additional information\n   before reporting to the user.\n   For the EXPN command, the string identifies a mailing list, and the\n   successful (i.e., 250) multiline response MAY include the full name\n   of the users and MUST give the mailboxes on the mailing list.\n   In some hosts, the distinction between a mailing list and an alias\n   for a single mailbox is a bit fuzzy, since a common data structure\n   may hold both types of entries, and it is possible to have mailing\n   lists containing only one mailbox.  If a request is made to apply\n   VRFY to a mailing list, a positive response MAY be given if a message\n   so addressed would be delivered to everyone on the list, otherwise an\n   error SHOULD be reported (e.g., \"550 That is a mailing list, not a\n   user\" or \"252 Unable to verify members of mailing list\").  If a\n   request is made to expand a user name, the server MAY return a\n   positive response consisting of a list containing one name, or an\n   error MAY be reported (e.g., \"550 That is a user name, not a mailing\n   list\").\n   In the case of a successful multiline reply (normal for EXPN),\n   exactly one mailbox is to be specified on each line of the reply.\n   The case of an ambiguous request is discussed above.\n   \"User name\" is a fuzzy term and has been used deliberately.  An\n   implementation of the VRFY or EXPN commands MUST include at least\n   recognition of local mailboxes as \"user names\".  However, since\n   current Internet practice often results in a single host handling\n   mail for multiple domains, hosts, especially hosts that provide this\n   functionality, SHOULD accept the \"local-part@domain\" form as a \"user\n   name\"; hosts MAY also choose to recognize other strings as \"user\n   names\".\n   The case of expanding a mailbox list requires a multiline reply, such\n   as:\n      C: EXPN Example-People\n      S: 250-Jon Postel <Postel@isi.edu>\n      S: 250-Fred Fonebone <Fonebone@physics.foo-u.edu>\n      S: 250 Sam Q. Smith <SQSmith@specific.generic.com>\n   or\n      C: EXPN Executive-Washroom-List\n      S: 550 Access Denied to You.\n   The character string arguments of the VRFY and EXPN commands cannot\n   be further restricted due to the variety of implementations of the\n   user name and mailbox list concepts.  On some systems, it may be\n   appropriate for the argument of the EXPN command to be a file name\n   for a file containing a mailing list, but again there are a variety\n   of file naming conventions in the Internet.  Similarly, historical\n   variations in what is returned by these commands are such that the\n   response SHOULD be interpreted very carefully, if at all, and SHOULD\n   generally only be used for diagnostic purposes.\n3.5.2.  VRFY Normal Response\n   When normal (2yz or 551) responses are returned from a VRFY or EXPN\n   request, the reply MUST include the <Mailbox> name using a\n   \"<local-part@domain>\" construction, where \"domain\" is a fully-\n   qualified domain name.  In circumstances exceptional enough to\n   justify violating the intent of this specification, free-form text\n   MAY be returned.  In order to facilitate parsing by both computers\n   and people, addresses SHOULD appear in pointed brackets.  When\n   addresses, rather than free-form debugging information, are returned,\n   EXPN and VRFY MUST return only valid domain addresses that are usable\n   in SMTP RCPT commands.  Consequently, if an address implies delivery\n   to a program or other system, the mailbox name used to reach that\n   target MUST be given.  Paths (explicit source routes) MUST NOT be\n   returned by VRFY or EXPN.\n   Server implementations SHOULD support both VRFY and EXPN.  For\n   security reasons, implementations MAY provide local installations a\n   way to disable either or both of these commands through configuration\n   options or the equivalent (see Section 7.3).  When these commands are\n   supported, they are not required to work across relays when relaying\n   is supported.  Since they were both optional in RFC 821, but VRFY was\n   made mandatory in RFC 1123 [3], if EXPN is supported, it MUST be\n   listed as a service extension in an EHLO response.  VRFY MAY be\n   listed as a convenience but, since support for it is required, SMTP\n   clients are not required to check for its presence on the extension\n   list before using it.\n3.5.3.  Meaning of VRFY or EXPN Success Response\n   A server MUST NOT return a 250 code in response to a VRFY or EXPN\n   command unless it has actually verified the address.  In particular,\n   a server MUST NOT return 250 if all it has done is to verify that the\n   syntax given is valid.  In that case, 502 (Command not implemented)\n   or 500 (Syntax error, command unrecognized) SHOULD be returned.  As\n   stated elsewhere, implementation (in the sense of actually validating\n   addresses and returning information) of VRFY and EXPN are strongly\n   recommended.  Hence, implementations that return 500 or 502 for VRFY\n   are not in full compliance with this specification.\n   There may be circumstances where an address appears to be valid but\n   cannot reasonably be verified in real time, particularly when a\n   server is acting as a mail exchanger for another server or domain.\n   \"Apparent validity\", in this case, would normally involve at least\n   syntax checking and might involve verification that any domains\n   specified were ones to which the host expected to be able to relay\n   mail.  In these situations, reply code 252 SHOULD be returned.  These\n   cases parallel the discussion of RCPT verification in Section 2.1.\n   Similarly, the discussion in Section 3.4 applies to the use of reply\n   codes 251 and 551 with VRFY (and EXPN) to indicate addresses that are\n   recognized but that would be forwarded or rejected were mail received\n   for them.  Implementations generally SHOULD be more aggressive about\n   address verification in the case of VRFY than in the case of RCPT,\n   even if it takes a little longer to do so.\n3.5.4.  Semantics and Applications of EXPN\n   EXPN is often very useful in debugging and understanding problems\n   with mailing lists and multiple-target-address aliases.  Some systems\n   have attempted to use source expansion of mailing lists as a means of\n   eliminating duplicates.  The propagation of aliasing systems with\n   mail on the Internet for hosts (typically with MX and CNAME DNS\n   records), for mailboxes (various types of local host aliases), and in\n   various proxying arrangements has made it nearly impossible for these\n   strategies to work consistently, and mail systems SHOULD NOT attempt\n   them.\n3.6.  Relaying and Mail Routing\n3.6.1.  Source Routes and Relaying\n   In general, the availability of Mail eXchanger records in the domain\n   name system (RFC 1035 [2], RFC 974 [12]) makes the use of explicit\n   source routes in the Internet mail system unnecessary.  Many\n   historical problems with the interpretation of explicit source routes\n   have made their use undesirable.  SMTP clients SHOULD NOT generate\n   explicit source routes except under unusual circumstances.  SMTP\n   servers MAY decline to act as mail relays or to accept addresses that\n   specify source routes.  When route information is encountered, SMTP\n   servers MAY ignore the route information and simply send to the final\n   destination specified as the last element in the route and SHOULD do\n   so.  There has been an invalid practice of using names that do not\n   appear in the DNS as destination names, with the senders counting on\n   the intermediate hosts specified in source routing to resolve any\n   problems.  If source routes are stripped, this practice will cause\n   failures.  This is one of several reasons why SMTP clients MUST NOT\n   generate invalid source routes or depend on serial resolution of\n   names.\n   When source routes are not used, the process described in RFC 821 for\n   constructing a reverse-path from the forward-path is not applicable\n   and the reverse-path at the time of delivery will simply be the\n   address that appeared in the MAIL command.\n3.6.2.  Mail eXchange Records and Relaying\n   A relay SMTP server is usually the target of a DNS MX record that\n   designates it, rather than the final delivery system.  The relay\n   server may accept or reject the task of relaying the mail in the same\n   way it accepts or rejects mail for a local user.  If it accepts the\n   task, it then becomes an SMTP client, establishes a transmission\n   channel to the next SMTP server specified in the DNS (according to\n   the rules in Section 5), and sends it the mail.  If it declines to\n   relay mail to a particular address for policy reasons, a 550 response\n   SHOULD be returned.\n   This specification does not deal with the verification of return\n   paths for use in delivery notifications.  Recent work, such as that\n   on SPF [29] and DKIM [30] [31], has been done to provide ways to\n   ascertain that an address is valid or belongs to the person who\n   actually sent the message.  A server MAY attempt to verify the return\n   path before using its address for delivery notifications, but methods\n   of doing so are not defined here nor is any particular method\n   recommended at this time.\n3.6.3.  Message Submission Servers as Relays\n   Many mail-sending clients exist, especially in conjunction with\n   facilities that receive mail via POP3 or IMAP, that have limited\n   capability to support some of the requirements of this specification,\n   such as the ability to queue messages for subsequent delivery\n   attempts.  For these clients, it is common practice to make private\n   arrangements to send all messages to a single server for processing\n   and subsequent distribution.  SMTP, as specified here, is not ideally\n   suited for this role.  A standardized mail submission protocol has\n   been developed that is gradually superseding practices based on SMTP\n   (see RFC 4409 [18]).  In any event, because these arrangements are\n   private and fall outside the scope of this specification, they are\n   not described here.\n   It is important to note that MX records can point to SMTP servers\n   that act as gateways into other environments, not just SMTP relays\n   and final delivery systems; see Sections 3.7 and 5.\n   If an SMTP server has accepted the task of relaying the mail and\n   later finds that the destination is incorrect or that the mail cannot\n   be delivered for some other reason, then it MUST construct an\n   \"undeliverable mail\" notification message and send it to the\n   originator of the undeliverable mail (as indicated by the reverse-\n   path).  Formats specified for non-delivery reports by other standards\n   (see, for example, RFC 3461 [32] and RFC 3464 [33]) SHOULD be used if\n   possible.\n   This notification message must be from the SMTP server at the relay\n   host or the host that first determines that delivery cannot be\n   accomplished.  Of course, SMTP servers MUST NOT send notification\n   messages about problems transporting notification messages.  One way\n   to prevent loops in error reporting is to specify a null reverse-path\n   in the MAIL command of a notification message.  When such a message\n   is transmitted, the reverse-path MUST be set to null (see\n   Section 4.5.5 for additional discussion).  A MAIL command with a null\n   reverse-path appears as follows:\n      MAIL FROM:<>\n   As discussed in Section 6.4, a relay SMTP has no need to inspect or\n   act upon the header section or body of the message data and MUST NOT\n   do so except to add its own \"Received:\" header field (Section 4.4)\n   and, optionally, to attempt to detect looping in the mail system (see\n   Section 6.3).  Of course, this prohibition also applies to any\n   modifications of these header fields or text (see also Section 7.9).\n3.7.  Mail Gatewaying\n   While the relay function discussed above operates within the Internet\n   SMTP transport service environment, MX records or various forms of\n   explicit routing may require that an intermediate SMTP server perform\n   a translation function between one transport service and another.  As\n   discussed in Section 2.3.10, when such a system is at the boundary\n   between two transport service environments, we refer to it as a\n   \"gateway\" or \"gateway SMTP\".\n   Gatewaying mail between different mail environments, such as\n   different mail formats and protocols, is complex and does not easily\n   yield to standardization.  However, some general requirements may be\n   given for a gateway between the Internet and another mail\n   environment.\n3.7.1.  Header Fields in Gatewaying\n   Header fields MAY be rewritten when necessary as messages are\n   gatewayed across mail environment boundaries.  This may involve\n   inspecting the message body or interpreting the local-part of the\n   destination address in spite of the prohibitions in Section 6.4.\n   Other mail systems gatewayed to the Internet often use a subset of\n   the RFC 822 header section or provide similar functionality with a\n   different syntax, but some of these mail systems do not have an\n   equivalent to the SMTP envelope.  Therefore, when a message leaves\n   the Internet environment, it may be necessary to fold the SMTP\n   envelope information into the message header section.  A possible\n   solution would be to create new header fields to carry the envelope\n   information (e.g., \"X-SMTP-MAIL:\" and \"X-SMTP-RCPT:\"); however, this\n   would require changes in mail programs in foreign environments and\n   might risk disclosure of private information (see Section 7.2).\n3.7.2.  Received Lines in Gatewaying\n   When forwarding a message into or out of the Internet environment, a\n   gateway MUST prepend a Received: line, but it MUST NOT alter in any\n   way a Received: line that is already in the header section.\n   \"Received:\" header fields of messages originating from other\n   environments may not conform exactly to this specification.  However,\n   the most important use of Received: lines is for debugging mail\n   faults, and this debugging can be severely hampered by well-meaning\n   gateways that try to \"fix\" a Received: line.  As another consequence\n   of trace header fields arising in non-SMTP environments, receiving\n   systems MUST NOT reject mail based on the format of a trace header\n   field and SHOULD be extremely robust in the light of unexpected\n   information or formats in those header fields.\n   The gateway SHOULD indicate the environment and protocol in the \"via\"\n   clauses of Received header field(s) that it supplies.\n3.7.3.  Addresses in Gatewaying\n   From the Internet side, the gateway SHOULD accept all valid address\n   formats in SMTP commands and in the RFC 822 header section, and all\n   valid RFC 822 messages.  Addresses and header fields generated by\n   gateways MUST conform to applicable standards (including this one and\n   RFC 5322 [4]).  Gateways are, of course, subject to the same rules\n   for handling source routes as those described for other SMTP systems\n   in Section 3.3.\n3.7.4.  Other Header Fields in Gatewaying\n   The gateway MUST ensure that all header fields of a message that it\n   forwards into the Internet mail environment meet the requirements for\n   Internet mail.  In particular, all addresses in \"From:\", \"To:\",\n   \"Cc:\", etc., header fields MUST be transformed (if necessary) to\n   satisfy the standard header syntax of RFC 5322 [4], MUST reference\n   only fully-qualified domain names, and MUST be effective and useful\n   for sending replies.  The translation algorithm used to convert mail\n   from the Internet protocols to another environment's protocol SHOULD\n   ensure that error messages from the foreign mail environment are\n   delivered to the reverse-path from the SMTP envelope, not to an\n   address in the \"From:\", \"Sender:\", or similar header fields of the\n   message.\n3.7.5.  Envelopes in Gatewaying\n   Similarly, when forwarding a message from another environment into\n   the Internet, the gateway SHOULD set the envelope return path in\n   accordance with an error message return address, if supplied by the\n   foreign environment.  If the foreign environment has no equivalent\n   concept, the gateway must select and use a best approximation, with\n   the message originator's address as the default of last resort.\n3.8.  Terminating Sessions and Connections\n   An SMTP connection is terminated when the client sends a QUIT\n   command.  The server responds with a positive reply code, after which\n   it closes the connection.\n   An SMTP server MUST NOT intentionally close the connection under\n   normal operational circumstances (see Section 7.8) except:\n   o  After receiving a QUIT command and responding with a 221 reply.\n   o  After detecting the need to shut down the SMTP service and\n      returning a 421 response code.  This response code can be issued\n      after the server receives any command or, if necessary,\n      asynchronously from command receipt (on the assumption that the\n      client will receive it after the next command is issued).\n   o  After a timeout, as specified in Section 4.5.3.2, occurs waiting\n      for the client to send a command or data.\n   In particular, a server that closes connections in response to\n   commands that are not understood is in violation of this\n   specification.  Servers are expected to be tolerant of unknown\n   commands, issuing a 500 reply and awaiting further instructions from\n   the client.\n   An SMTP server that is forcibly shut down via external means SHOULD\n   attempt to send a line containing a 421 response code to the SMTP\n   client before exiting.  The SMTP client will normally read the 421\n   response code after sending its next command.\n   SMTP clients that experience a connection close, reset, or other\n   communications failure due to circumstances not under their control\n   (in violation of the intent of this specification but sometimes\n   unavoidable) SHOULD, to maintain the robustness of the mail system,\n   treat the mail transaction as if a 451 response had been received and\n   act accordingly.\n3.9.  Mailing Lists and Aliases\n   An SMTP-capable host SHOULD support both the alias and the list\n   models of address expansion for multiple delivery.  When a message is\n   delivered or forwarded to each address of an expanded list form, the\n   return address in the envelope (\"MAIL FROM:\") MUST be changed to be\n   the address of a person or other entity who administers the list.\n   However, in this case, the message header section (RFC 5322 [4]) MUST\n   be left unchanged; in particular, the \"From\" field of the header\n   section is unaffected.\n   An important mail facility is a mechanism for multi-destination\n   delivery of a single message, by transforming (or \"expanding\" or\n   \"exploding\") a pseudo-mailbox address into a list of destination\n   mailbox addresses.  When a message is sent to such a pseudo-mailbox\n   (sometimes called an \"exploder\"), copies are forwarded or\n   redistributed to each mailbox in the expanded list.  Servers SHOULD\n   simply utilize the addresses on the list; application of heuristics\n   or other matching rules to eliminate some addresses, such as that of\n   the originator, is strongly discouraged.  We classify such a pseudo-\n   mailbox as an \"alias\" or a \"list\", depending upon the expansion\n   rules.\n3.9.1.  Alias\n   To expand an alias, the recipient mailer simply replaces the pseudo-\n   mailbox address in the envelope with each of the expanded addresses\n   in turn; the rest of the envelope and the message body are left\n   unchanged.  The message is then delivered or forwarded to each\n   expanded address.\n3.9.2.  List\n   A mailing list may be said to operate by \"redistribution\" rather than\n   by \"forwarding\".  To expand a list, the recipient mailer replaces the\n   pseudo-mailbox address in the envelope with each of the expanded\n   addresses in turn.  The return (backward-pointing) address in the\n   envelope is changed so that all error messages generated by the final\n   deliveries will be returned to a list administrator, not to the\n   message originator, who generally has no control over the contents of\n   the list and will typically find error messages annoying.  Note that\n   the key difference between handling aliases (Section 3.9.1) and\n   forwarding (this subsection) is the change to the backward-pointing\n   address in this case.  When a list constrains its processing to the\n   very limited set of modifications and actions described here, it is\n   attempting to emulate an MTA; such lists can be treated as a\n   continuation in email transit.\n   There exist mailing lists that perform additional, sometimes\n   extensive, modifications to a message and its envelope.  Such mailing\n   lists need to be viewed as full MUAs, which accept a delivery and\n   post a new message."
  },
  {
    "section_number": "4.",
    "section_name": "The SMTP Specifications",
    "tag": "Section 4. The SMTP Specifications",
    "content": "4.1.  SMTP Commands\n4.1.1.  Command Semantics and Syntax\n   The SMTP commands define the mail transfer or the mail system\n   function requested by the user.  SMTP commands are character strings\n   terminated by <CRLF>.  The commands themselves are alphabetic\n   characters terminated by <SP> if parameters follow and <CRLF>\n   otherwise.  (In the interest of improved interoperability, SMTP\n   receivers SHOULD tolerate trailing white space before the terminating\n   <CRLF>.)  The syntax of the local part of a mailbox MUST conform to\n   receiver site conventions and the syntax specified in Section 4.1.2.\n   The SMTP commands are discussed below.  The SMTP replies are\n   discussed in Section 4.2.\n   A mail transaction involves several data objects that are\n   communicated as arguments to different commands.  The reverse-path is\n   the argument of the MAIL command, the forward-path is the argument of\n   the RCPT command, and the mail data is the argument of the DATA\n   command.  These arguments or data objects must be transmitted and\n   held, pending the confirmation communicated by the end of mail data\n   indication that finalizes the transaction.  The model for this is\n   that distinct buffers are provided to hold the types of data objects;\n   that is, there is a reverse-path buffer, a forward-path buffer, and a\n   mail data buffer.  Specific commands cause information to be appended\n   to a specific buffer, or cause one or more buffers to be cleared.\n   Several commands (RSET, DATA, QUIT) are specified as not permitting\n   parameters.  In the absence of specific extensions offered by the\n   server and accepted by the client, clients MUST NOT send such\n   parameters and servers SHOULD reject commands containing them as\n   having invalid syntax.\n4.1.1.1.  Extended HELLO (EHLO) or HELLO (HELO)\n   These commands are used to identify the SMTP client to the SMTP\n   server.  The argument clause contains the fully-qualified domain name\n   of the SMTP client, if one is available.  In situations in which the\n   SMTP client system does not have a meaningful domain name (e.g., when\n   its address is dynamically allocated and no reverse mapping record is\n   available), the client SHOULD send an address literal (see\n   Section 4.1.3).\n   RFC 2821, and some earlier informal practices, encouraged following\n   the literal by information that would help to identify the client\n   system.  That convention was not widely supported, and many SMTP\n   servers considered it an error.  In the interest of interoperability,\n   it is probably wise for servers to be prepared for this string to\n   occur, but SMTP clients SHOULD NOT send it.\n   The SMTP server identifies itself to the SMTP client in the\n   connection greeting reply and in the response to this command.\n   A client SMTP SHOULD start an SMTP session by issuing the EHLO\n   command.  If the SMTP server supports the SMTP service extensions, it\n   will give a successful response, a failure response, or an error\n   response.  If the SMTP server, in violation of this specification,\n   does not support any SMTP service extensions, it will generate an\n   error response.  Older client SMTP systems MAY, as discussed above,\n   use HELO (as specified in RFC 821) instead of EHLO, and servers MUST\n   support the HELO command and reply properly to it.  In any event, a\n   client MUST issue HELO or EHLO before starting a mail transaction.\n   These commands, and a \"250 OK\" reply to one of them, confirm that\n   both the SMTP client and the SMTP server are in the initial state,\n   that is, there is no transaction in progress and all state tables and\n   buffers are cleared.\n   Syntax:\n   ehlo           = \"EHLO\" SP ( Domain / address-literal ) CRLF\n   helo           = \"HELO\" SP Domain CRLF\n   Normally, the response to EHLO will be a multiline reply.  Each line\n   of the response contains a keyword and, optionally, one or more\n   parameters.  Following the normal syntax for multiline replies, these\n   keywords follow the code (250) and a hyphen for all but the last\n   line, and the code and a space for the last line.  The syntax for a\n   positive response, using the ABNF notation and terminal symbols of\n   RFC 5234 [7], is:\n   ehlo-ok-rsp    = ( \"250\" SP Domain [ SP ehlo-greet ] CRLF )\n                    / ( \"250-\" Domain [ SP ehlo-greet ] CRLF\n                    *( \"250-\" ehlo-line CRLF )\n                    \"250\" SP ehlo-line CRLF )\n   ehlo-greet     = 1*(%d0-9 / %d11-12 / %d14-127)\n                    ; string of any characters other than CR or LF\n   ehlo-line      = ehlo-keyword *( SP ehlo-param )\n   ehlo-keyword   = (ALPHA / DIGIT) *(ALPHA / DIGIT / \"-\")\n                    ; additional syntax of ehlo-params depends on\n                    ; ehlo-keyword\n   ehlo-param     = 1*(%d33-126)\n                    ; any CHAR excluding <SP> and all\n                    ; control characters (US-ASCII 0-31 and 127\n                    ; inclusive)\n   Although EHLO keywords may be specified in upper, lower, or mixed\n   case, they MUST always be recognized and processed in a case-\n   insensitive manner.  This is simply an extension of practices\n   specified in RFC 821 and Section 2.4.\n   The EHLO response MUST contain keywords (and associated parameters if\n   required) for all commands not listed as \"required\" in Section 4.5.1\n   excepting only private-use commands as described in Section 4.1.5.\n   Private-use commands MAY be listed.\n4.1.1.2.  MAIL (MAIL)\n   This command is used to initiate a mail transaction in which the mail\n   data is delivered to an SMTP server that may, in turn, deliver it to\n   one or more mailboxes or pass it on to another system (possibly using\n   SMTP).  The argument clause contains a reverse-path and may contain\n   optional parameters.  In general, the MAIL command may be sent only\n   when no mail transaction is in progress, see Section 4.1.4.\n   The reverse-path consists of the sender mailbox.  Historically, that\n   mailbox might optionally have been preceded by a list of hosts, but\n   that behavior is now deprecated (see Appendix C).  In some types of\n   reporting messages for which a reply is likely to cause a mail loop\n   (for example, mail delivery and non-delivery notifications), the\n   reverse-path may be null (see Section 3.6).\n   This command clears the reverse-path buffer, the forward-path buffer,\n   and the mail data buffer, and it inserts the reverse-path information\n   from its argument clause into the reverse-path buffer.\n   If service extensions were negotiated, the MAIL command may also\n   carry parameters associated with a particular service extension.\n   Syntax:\n   mail = \"MAIL FROM:\" Reverse-path\n                                       [SP Mail-parameters] CRLF\n4.1.1.3.  RECIPIENT (RCPT)\n   This command is used to identify an individual recipient of the mail\n   data; multiple recipients are specified by multiple uses of this\n   command.  The argument clause contains a forward-path and may contain\n   optional parameters.\n   The forward-path normally consists of the required destination\n   mailbox.  Sending systems SHOULD NOT generate the optional list of\n   hosts known as a source route.  Receiving systems MUST recognize\n   source route syntax but SHOULD strip off the source route\n   specification and utilize the domain name associated with the mailbox\n   as if the source route had not been provided.\n   Similarly, relay hosts SHOULD strip or ignore source routes, and\n   names MUST NOT be copied into the reverse-path.  When mail reaches\n   its ultimate destination (the forward-path contains only a\n   destination mailbox), the SMTP server inserts it into the destination\n   mailbox in accordance with its host mail conventions.\n   This command appends its forward-path argument to the forward-path\n   buffer; it does not change the reverse-path buffer nor the mail data\n   buffer.\n   For example, mail received at relay host xyz.com with envelope\n   commands\n      MAIL FROM:<userx@y.foo.org>\n      RCPT TO:<@hosta.int,@jkl.org:userc@d.bar.org>\n   will normally be sent directly on to host d.bar.org with envelope\n   commands\n      MAIL FROM:<userx@y.foo.org>\n      RCPT TO:<userc@d.bar.org>\n   As provided in Appendix C, xyz.com MAY also choose to relay the\n   message to hosta.int, using the envelope commands\n      MAIL FROM:<userx@y.foo.org>\n      RCPT TO:<@hosta.int,@jkl.org:userc@d.bar.org>\n   or to jkl.org, using the envelope commands\n      MAIL FROM:<userx@y.foo.org>\n      RCPT TO:<@jkl.org:userc@d.bar.org>\n   Attempting to use relaying this way is now strongly discouraged.\n   Since hosts are not required to relay mail at all, xyz.com MAY also\n   reject the message entirely when the RCPT command is received, using\n   a 550 code (since this is a \"policy reason\").\n   If service extensions were negotiated, the RCPT command may also\n   carry parameters associated with a particular service extension\n   offered by the server.  The client MUST NOT transmit parameters other\n   than those associated with a service extension offered by the server\n   in its EHLO response.\n   Syntax:\n      rcpt = \"RCPT TO:\" ( \"<Postmaster@\" Domain \">\" / \"<Postmaster>\" /\n                  Forward-path ) [SP Rcpt-parameters] CRLF\n                  Note that, in a departure from the usual rules for\n                  local-parts, the \"Postmaster\" string shown above is\n                  treated as case-insensitive.\n4.1.1.4.  DATA (DATA)\n   The receiver normally sends a 354 response to DATA, and then treats\n   the lines (strings ending in <CRLF> sequences, as described in\n   Section 2.3.7) following the command as mail data from the sender.\n   This command causes the mail data to be appended to the mail data\n   buffer.  The mail data may contain any of the 128 ASCII character\n   codes, although experience has indicated that use of control\n   characters other than SP, HT, CR, and LF may cause problems and\n   SHOULD be avoided when possible.\n   The mail data are terminated by a line containing only a period, that\n   is, the character sequence \"<CRLF>.<CRLF>\", where the first <CRLF> is\n   actually the terminator of the previous line (see Section 4.5.2).\n   This is the end of mail data indication.  The first <CRLF> of this\n   terminating sequence is also the <CRLF> that ends the final line of\n   the data (message text) or, if there was no mail data, ends the DATA\n   command itself (the \"no mail data\" case does not conform to this\n   specification since it would require that neither the trace header\n   fields required by this specification nor the message header section\n   required by RFC 5322 [4] be transmitted).  An extra <CRLF> MUST NOT\n   be added, as that would cause an empty line to be added to the\n   message.  The only exception to this rule would arise if the message\n   body were passed to the originating SMTP-sender with a final \"line\"\n   that did not end in <CRLF>; in that case, the originating SMTP system\n   MUST either reject the message as invalid or add <CRLF> in order to\n   have the receiving SMTP server recognize the \"end of data\" condition.\n   The custom of accepting lines ending only in <LF>, as a concession to\n   non-conforming behavior on the part of some UNIX systems, has proven\n   to cause more interoperability problems than it solves, and SMTP\n   server systems MUST NOT do this, even in the name of improved\n   robustness.  In particular, the sequence \"<LF>.<LF>\" (bare line\n   feeds, without carriage returns) MUST NOT be treated as equivalent to\n   <CRLF>.<CRLF> as the end of mail data indication.\n   Receipt of the end of mail data indication requires the server to\n   process the stored mail transaction information.  This processing\n   consumes the information in the reverse-path buffer, the forward-path\n   buffer, and the mail data buffer, and on the completion of this\n   command these buffers are cleared.  If the processing is successful,\n   the receiver MUST send an OK reply.  If the processing fails, the\n   receiver MUST send a failure reply.  The SMTP model does not allow\n   for partial failures at this point: either the message is accepted by\n   the server for delivery and a positive response is returned or it is\n   not accepted and a failure reply is returned.  In sending a positive\n   \"250 OK\" completion reply to the end of data indication, the receiver\n   takes full responsibility for the message (see Section 6.1).  Errors\n   that are diagnosed subsequently MUST be reported in a mail message,\n   as discussed in Section 4.4.\n   When the SMTP server accepts a message either for relaying or for\n   final delivery, it inserts a trace record (also referred to\n   interchangeably as a \"time stamp line\" or \"Received\" line) at the top\n   of the mail data.  This trace record indicates the identity of the\n   host that sent the message, the identity of the host that received\n   the message (and is inserting this time stamp), and the date and time\n   the message was received.  Relayed messages will have multiple time\n   stamp lines.  Details for formation of these lines, including their\n   syntax, is specified in Section 4.4.\n   Additional discussion about the operation of the DATA command appears\n   in Section 3.3.\n   Syntax:\n      data = \"DATA\" CRLF\n4.1.1.5.  RESET (RSET)\n   This command specifies that the current mail transaction will be\n   aborted.  Any stored sender, recipients, and mail data MUST be\n   discarded, and all buffers and state tables cleared.  The receiver\n   MUST send a \"250 OK\" reply to a RSET command with no arguments.  A\n   reset command may be issued by the client at any time.  It is\n   effectively equivalent to a NOOP (i.e., it has no effect) if issued\n   immediately after EHLO, before EHLO is issued in the session, after\n   an end of data indicator has been sent and acknowledged, or\n   immediately before a QUIT.  An SMTP server MUST NOT close the\n   connection as the result of receiving a RSET; that action is reserved\n   for QUIT (see Section 4.1.1.10).\n   Since EHLO implies some additional processing and response by the\n   server, RSET will normally be more efficient than reissuing that\n   command, even though the formal semantics are the same.\n   There are circumstances, contrary to the intent of this\n   specification, in which an SMTP server may receive an indication that\n   the underlying TCP connection has been closed or reset.  To preserve\n   the robustness of the mail system, SMTP servers SHOULD be prepared\n   for this condition and SHOULD treat it as if a QUIT had been received\n   before the connection disappeared.\n   Syntax:\n      rset = \"RSET\" CRLF\n4.1.1.6.  VERIFY (VRFY)\n   This command asks the receiver to confirm that the argument\n   identifies a user or mailbox.  If it is a user name, information is\n   returned as specified in Section 3.5.\n   This command has no effect on the reverse-path buffer, the forward-\n   path buffer, or the mail data buffer.\n   Syntax:\n      vrfy = \"VRFY\" SP String CRLF\n4.1.1.7.  EXPAND (EXPN)\n   This command asks the receiver to confirm that the argument\n   identifies a mailing list, and if so, to return the membership of\n   that list.  If the command is successful, a reply is returned\n   containing information as described in Section 3.5.  This reply will\n   have multiple lines except in the trivial case of a one-member list.\n   This command has no effect on the reverse-path buffer, the forward-\n   path buffer, or the mail data buffer, and it may be issued at any\n   time.\n   Syntax:\n      expn = \"EXPN\" SP String CRLF\n4.1.1.8.  HELP (HELP)\n   This command causes the server to send helpful information to the\n   client.  The command MAY take an argument (e.g., any command name)\n   and return more specific information as a response.\n   This command has no effect on the reverse-path buffer, the forward-\n   path buffer, or the mail data buffer, and it may be issued at any\n   time.\n   SMTP servers SHOULD support HELP without arguments and MAY support it\n   with arguments.\n   Syntax:\n      help = \"HELP\" [ SP String ] CRLF\n4.1.1.9.  NOOP (NOOP)\n   This command does not affect any parameters or previously entered\n   commands.  It specifies no action other than that the receiver send a\n   \"250 OK\" reply.\n   This command has no effect on the reverse-path buffer, the forward-\n   path buffer, or the mail data buffer, and it may be issued at any\n   time.  If a parameter string is specified, servers SHOULD ignore it.\n   Syntax:\n      noop = \"NOOP\" [ SP String ] CRLF\n4.1.1.10.  QUIT (QUIT)\n   This command specifies that the receiver MUST send a \"221 OK\" reply,\n   and then close the transmission channel.\n   The receiver MUST NOT intentionally close the transmission channel\n   until it receives and replies to a QUIT command (even if there was an\n   error).  The sender MUST NOT intentionally close the transmission\n   channel until it sends a QUIT command, and it SHOULD wait until it\n   receives the reply (even if there was an error response to a previous\n   command).  If the connection is closed prematurely due to violations\n   of the above or system or network failure, the server MUST cancel any\n   pending transaction, but not undo any previously completed\n   transaction, and generally MUST act as if the command or transaction\n   in progress had received a temporary error (i.e., a 4yz response).\n   The QUIT command may be issued at any time.  Any current uncompleted\n   mail transaction will be aborted.\n   Syntax:\n      quit = \"QUIT\" CRLF\n4.1.1.11.  Mail-Parameter and Rcpt-Parameter Error Responses\n   If the server SMTP does not recognize or cannot implement one or more\n   of the parameters associated with a particular MAIL FROM or RCPT TO\n   command, it will return code 555.\n   If, for some reason, the server is temporarily unable to accommodate\n   one or more of the parameters associated with a MAIL FROM or RCPT TO\n   command, and if the definition of the specific parameter does not\n   mandate the use of another code, it should return code 455.\n   Errors specific to particular parameters and their values will be\n   specified in the parameter's defining RFC.\n4.1.2.  Command Argument Syntax\n   The syntax of the argument clauses of the above commands (using the\n   syntax specified in RFC 5234 [7] where applicable) is given below.\n   Some of the productions given below are used only in conjunction with\n   source routes as described in Appendix C.  Terminals not defined in\n   this document, such as ALPHA, DIGIT, SP, CR, LF, CRLF, are as defined\n   in the \"core\" syntax in Section 6 of RFC 5234 [7] or in the message\n   format syntax in RFC 5322 [4].\n   Reverse-path   = Path / \"<>\"\n   Forward-path   = Path\n   Path           = \"<\" [ A-d-l \":\" ] Mailbox \">\"\n   A-d-l          = At-domain *( \",\" At-domain )\n                  ; Note that this form, the so-called \"source\n                  ; route\", MUST BE accepted, SHOULD NOT be\n                  ; generated, and SHOULD be ignored.\n   At-domain      = \"@\" Domain\n   Mail-parameters  = esmtp-param *(SP esmtp-param)\n   Rcpt-parameters  = esmtp-param *(SP esmtp-param)\n   esmtp-param    = esmtp-keyword [\"=\" esmtp-value]\n   esmtp-keyword  = (ALPHA / DIGIT) *(ALPHA / DIGIT / \"-\")\n   esmtp-value    = 1*(%d33-60 / %d62-126)\n                  ; any CHAR excluding \"=\", SP, and control\n                  ; characters.  If this string is an email address,\n                  ; i.e., a Mailbox, then the \"xtext\" syntax [32]\n                  ; SHOULD be used.\n   Keyword        = Ldh-str\n   Argument       = Atom\n   Domain         = sub-domain *(\".\" sub-domain)\n   sub-domain     = Let-dig [Ldh-str]\n   Let-dig        = ALPHA / DIGIT\n   Ldh-str        = *( ALPHA / DIGIT / \"-\" ) Let-dig\n   address-literal  = \"[\" ( IPv4-address-literal /\n                    IPv6-address-literal /\n                    General-address-literal ) \"]\"\n                    ; See Section 4.1.3\n   Mailbox        = Local-part \"@\" ( Domain / address-literal )\n   Local-part     = Dot-string / Quoted-string\n                  ; MAY be case-sensitive\n   Dot-string     = Atom *(\".\"  Atom)\n   Atom           = 1*atext\n   Quoted-string  = DQUOTE *QcontentSMTP DQUOTE\n   QcontentSMTP   = qtextSMTP / quoted-pairSMTP\n   quoted-pairSMTP  = %d92 %d32-126\n                    ; i.e., backslash followed by any ASCII\n                    ; graphic (including itself) or SPace\n   qtextSMTP      = %d32-33 / %d35-91 / %d93-126\n                  ; i.e., within a quoted string, any\n                  ; ASCII graphic or space is permitted\n                  ; without blackslash-quoting except\n                  ; double-quote and the backslash itself.\n   String         = Atom / Quoted-string\n   While the above definition for Local-part is relatively permissive,\n   for maximum interoperability, a host that expects to receive mail\n   SHOULD avoid defining mailboxes where the Local-part requires (or\n   uses) the Quoted-string form or where the Local-part is case-\n   sensitive.  For any purposes that require generating or comparing\n   Local-parts (e.g., to specific mailbox names), all quoted forms MUST\n   be treated as equivalent, and the sending system SHOULD transmit the\n   form that uses the minimum quoting possible.\n   Systems MUST NOT define mailboxes in such a way as to require the use\n   in SMTP of non-ASCII characters (octets with the high order bit set\n   to one) or ASCII \"control characters\" (decimal value 0-31 and 127).\n   These characters MUST NOT be used in MAIL or RCPT commands or other\n   commands that require mailbox names.\n   Note that the backslash, \"\\\", is a quote character, which is used to\n   indicate that the next character is to be used literally (instead of\n   its normal interpretation).  For example, \"Joe\\,Smith\" indicates a\n   single nine-character user name string with the comma being the\n   fourth character of that string.\n   To promote interoperability and consistent with long-standing\n   guidance about conservative use of the DNS in naming and applications\n   (e.g., see Section 2.3.1 of the base DNS document, RFC 1035 [2]),\n   characters outside the set of alphabetic characters, digits, and\n   hyphen MUST NOT appear in domain name labels for SMTP clients or\n   servers.  In particular, the underscore character is not permitted.\n   SMTP servers that receive a command in which invalid character codes\n   have been employed, and for which there are no other reasons for\n   rejection, MUST reject that command with a 501 response (this rule,\n   like others, could be overridden by appropriate SMTP extensions).\n4.1.3.  Address Literals\n   Sometimes a host is not known to the domain name system and\n   communication (and, in particular, communication to report and repair\n   the error) is blocked.  To bypass this barrier, a special literal\n   form of the address is allowed as an alternative to a domain name.\n   For IPv4 addresses, this form uses four small decimal integers\n   separated by dots and enclosed by brackets such as [123.255.37.2],\n   which indicates an (IPv4) Internet Address in sequence-of-octets\n   form.  For IPv6 and other forms of addressing that might eventually\n   be standardized, the form consists of a standardized \"tag\" that\n   identifies the address syntax, a colon, and the address itself, in a\n   format specified as part of the relevant standards (i.e., RFC 4291\n   [8] for IPv6).\n   Specifically:\n   IPv4-address-literal  = Snum 3(\".\"  Snum)\n   IPv6-address-literal  = \"IPv6:\" IPv6-addr\n   General-address-literal  = Standardized-tag \":\" 1*dcontent\n   Standardized-tag  = Ldh-str\n                     ; Standardized-tag MUST be specified in a\n                     ; Standards-Track RFC and registered with IANA\n   dcontent       = %d33-90 / ; Printable US-ASCII\n                  %d94-126 ; excl. \"[\", \"\\\", \"]\"\n   Snum           = 1*3DIGIT\n                  ; representing a decimal integer\n                  ; value in the range 0 through 255\n   IPv6-addr      = IPv6-full / IPv6-comp / IPv6v4-full / IPv6v4-comp\n   IPv6-hex       = 1*4HEXDIG\n   IPv6-full      = IPv6-hex 7(\":\" IPv6-hex)\n   IPv6-comp      = [IPv6-hex *5(\":\" IPv6-hex)] \"::\"\n                  [IPv6-hex *5(\":\" IPv6-hex)]\n                  ; The \"::\" represents at least 2 16-bit groups of\n                  ; zeros.  No more than 6 groups in addition to the\n                  ; \"::\" may be present.\n   IPv6v4-full    = IPv6-hex 5(\":\" IPv6-hex) \":\" IPv4-address-literal\n   IPv6v4-comp    = [IPv6-hex *3(\":\" IPv6-hex)] \"::\"\n                  [IPv6-hex *3(\":\" IPv6-hex) \":\"]\n                  IPv4-address-literal\n                  ; The \"::\" represents at least 2 16-bit groups of\n                  ; zeros.  No more than 4 groups in addition to the\n                  ; \"::\" and IPv4-address-literal may be present.\n4.1.4.  Order of Commands\n   There are restrictions on the order in which these commands may be\n   used.\n   A session that will contain mail transactions MUST first be\n   initialized by the use of the EHLO command.  An SMTP server SHOULD\n   accept commands for non-mail transactions (e.g., VRFY or EXPN)\n   without this initialization.\n   An EHLO command MAY be issued by a client later in the session.  If\n   it is issued after the session begins and the EHLO command is\n   acceptable to the SMTP server, the SMTP server MUST clear all buffers\n   and reset the state exactly as if a RSET command had been issued.  In\n   other words, the sequence of RSET followed immediately by EHLO is\n   redundant, but not harmful other than in the performance cost of\n   executing unnecessary commands.\n   If the EHLO command is not acceptable to the SMTP server, 501, 500,\n   502, or 550 failure replies MUST be returned as appropriate.  The\n   SMTP server MUST stay in the same state after transmitting these\n   replies that it was in before the EHLO was received.\n   The SMTP client MUST, if possible, ensure that the domain parameter\n   to the EHLO command is a primary host name as specified for this\n   command in Section 2.3.5.  If this is not possible (e.g., when the\n   client's address is dynamically assigned and the client does not have\n   an obvious name), an address literal SHOULD be substituted for the\n   domain name.\n   An SMTP server MAY verify that the domain name argument in the EHLO\n   command actually corresponds to the IP address of the client.\n   However, if the verification fails, the server MUST NOT refuse to\n   accept a message on that basis.  Information captured in the\n   verification attempt is for logging and tracing purposes.  Note that\n   this prohibition applies to the matching of the parameter to its IP\n   address only; see Section 7.9 for a more extensive discussion of\n   rejecting incoming connections or mail messages.\n   The NOOP, HELP, EXPN, VRFY, and RSET commands can be used at any time\n   during a session, or without previously initializing a session.  SMTP\n   servers SHOULD process these normally (that is, not return a 503\n   code) even if no EHLO command has yet been received; clients SHOULD\n   open a session with EHLO before sending these commands.\n   If these rules are followed, the example in RFC 821 that shows \"550\n   access denied to you\" in response to an EXPN command is incorrect\n   unless an EHLO command precedes the EXPN or the denial of access is\n   based on the client's IP address or other authentication or\n   authorization-determining mechanisms.\n   The MAIL command (or the obsolete SEND, SOML, or SAML commands)\n   begins a mail transaction.  Once started, a mail transaction consists\n   of a transaction beginning command, one or more RCPT commands, and a\n   DATA command, in that order.  A mail transaction may be aborted by\n   the RSET, a new EHLO, or the QUIT command.  There may be zero or more\n   transactions in a session.  MAIL (or SEND, SOML, or SAML) MUST NOT be\n   sent if a mail transaction is already open, i.e., it should be sent\n   only if no mail transaction had been started in the session, or if\n   the previous one successfully concluded with a successful DATA\n   command, or if the previous one was aborted, e.g., with a RSET or new\n   EHLO.\n   If the transaction beginning command argument is not acceptable, a\n   501 failure reply MUST be returned and the SMTP server MUST stay in\n   the same state.  If the commands in a transaction are out of order to\n   the degree that they cannot be processed by the server, a 503 failure\n   reply MUST be returned and the SMTP server MUST stay in the same\n   state.\n   The last command in a session MUST be the QUIT command.  The QUIT\n   command SHOULD be used by the client SMTP to request connection\n   closure, even when no session opening command was sent and accepted.\n4.1.5.  Private-Use Commands\n   As specified in Section 2.2.2, commands starting in \"X\" may be used\n   by bilateral agreement between the client (sending) and server\n   (receiving) SMTP agents.  An SMTP server that does not recognize such\n   a command is expected to reply with \"500 Command not recognized\".  An\n   extended SMTP server MAY list the feature names associated with these\n   private commands in the response to the EHLO command.\n   Commands sent or accepted by SMTP systems that do not start with \"X\"\n   MUST conform to the requirements of Section 2.2.2.\n4.2.  SMTP Replies\n   Replies to SMTP commands serve to ensure the synchronization of\n   requests and actions in the process of mail transfer and to guarantee\n   that the SMTP client always knows the state of the SMTP server.\n   Every command MUST generate exactly one reply.\n   The details of the command-reply sequence are described in\n   Section 4.3.\n   An SMTP reply consists of a three digit number (transmitted as three\n   numeric characters) followed by some text unless specified otherwise\n   in this document.  The number is for use by automata to determine\n   what state to enter next; the text is for the human user.  The three\n   digits contain enough encoded information that the SMTP client need\n   not examine the text and may either discard it or pass it on to the\n   user, as appropriate.  Exceptions are as noted elsewhere in this\n   document.  In particular, the 220, 221, 251, 421, and 551 reply codes\n   are associated with message text that must be parsed and interpreted\n   by machines.  In the general case, the text may be receiver dependent\n   and context dependent, so there are likely to be varying texts for\n   each reply code.  A discussion of the theory of reply codes is given\n   in Section 4.2.1.  Formally, a reply is defined to be the sequence: a\n   three-digit code, <SP>, one line of text, and <CRLF>, or a multiline\n   reply (as defined in the same section).  Since, in violation of this\n   specification, the text is sometimes not sent, clients that do not\n   receive it SHOULD be prepared to process the code alone (with or\n   without a trailing space character).  Only the EHLO, EXPN, and HELP\n   commands are expected to result in multiline replies in normal\n   circumstances; however, multiline replies are allowed for any\n   command.\n   In ABNF, server responses are:\n   Greeting       = ( \"220 \" (Domain / address-literal)\n                  [ SP textstring ] CRLF ) /\n                  ( \"220-\" (Domain / address-literal)\n                  [ SP textstring ] CRLF\n                  *( \"220-\" [ textstring ] CRLF )\n                  \"220\" [ SP textstring ] CRLF )\n   textstring     = 1*(%d09 / %d32-126) ; HT, SP, Printable US-ASCII\n   Reply-line     = *( Reply-code \"-\" [ textstring ] CRLF )\n                  Reply-code [ SP textstring ] CRLF\n   Reply-code     = %x32-35 %x30-35 %x30-39\n   where \"Greeting\" appears only in the 220 response that announces that\n   the server is opening its part of the connection.  (Other possible\n   server responses upon connection follow the syntax of Reply-line.)\n   An SMTP server SHOULD send only the reply codes listed in this\n   document.  An SMTP server SHOULD use the text shown in the examples\n   whenever appropriate.\n   An SMTP client MUST determine its actions only by the reply code, not\n   by the text (except for the \"change of address\" 251 and 551 and, if\n   necessary, 220, 221, and 421 replies); in the general case, any text,\n   including no text at all (although senders SHOULD NOT send bare\n   codes), MUST be acceptable.  The space (blank) following the reply\n   code is considered part of the text.  Whenever possible, a receiver-\n   SMTP SHOULD test the first digit (severity indication) of the reply\n   code.\n   The list of codes that appears below MUST NOT be construed as\n   permanent.  While the addition of new codes should be a rare and\n   significant activity, with supplemental information in the textual\n   part of the response being preferred, new codes may be added as the\n   result of new Standards or Standards-Track specifications.\n   Consequently, a sender-SMTP MUST be prepared to handle codes not\n   specified in this document and MUST do so by interpreting the first\n   digit only.\n   In the absence of extensions negotiated with the client, SMTP servers\n   MUST NOT send reply codes whose first digits are other than 2, 3, 4,\n   or 5.  Clients that receive such out-of-range codes SHOULD normally\n   treat them as fatal errors and terminate the mail transaction.\n4.2.1.  Reply Code Severities and Theory\n   The three digits of the reply each have a special significance.  The\n   first digit denotes whether the response is good, bad, or incomplete.\n   An unsophisticated SMTP client, or one that receives an unexpected\n   code, will be able to determine its next action (proceed as planned,\n   redo, retrench, etc.) by examining this first digit.  An SMTP client\n   that wants to know approximately what kind of error occurred (e.g.,\n   mail system error, command syntax error) may examine the second\n   digit.  The third digit and any supplemental information that may be\n   present is reserved for the finest gradation of information.\n   There are four values for the first digit of the reply code:\n   2yz  Positive Completion reply\n      The requested action has been successfully completed.  A new\n      request may be initiated.\n   3yz  Positive Intermediate reply\n      The command has been accepted, but the requested action is being\n      held in abeyance, pending receipt of further information.  The\n      SMTP client should send another command specifying this\n      information.  This reply is used in command sequence groups (i.e.,\n      in DATA).\n   4yz  Transient Negative Completion reply\n      The command was not accepted, and the requested action did not\n      occur.  However, the error condition is temporary, and the action\n      may be requested again.  The sender should return to the beginning\n      of the command sequence (if any).  It is difficult to assign a\n      meaning to \"transient\" when two different sites (receiver- and\n      sender-SMTP agents) must agree on the interpretation.  Each reply\n      in this category might have a different time value, but the SMTP\n      client SHOULD try again.  A rule of thumb to determine whether a\n      reply fits into the 4yz or the 5yz category (see below) is that\n      replies are 4yz if they can be successful if repeated without any\n      change in command form or in properties of the sender or receiver\n      (that is, the command is repeated identically and the receiver\n      does not put up a new implementation).\n   5yz  Permanent Negative Completion reply\n      The command was not accepted and the requested action did not\n      occur.  The SMTP client SHOULD NOT repeat the exact request (in\n      the same sequence).  Even some \"permanent\" error conditions can be\n      corrected, so the human user may want to direct the SMTP client to\n      reinitiate the command sequence by direct action at some point in\n      the future (e.g., after the spelling has been changed, or the user\n      has altered the account status).\n   It is worth noting that the file transfer protocol (FTP) [34] uses a\n   very similar code architecture and that the SMTP codes are based on\n   the FTP model.  However, SMTP uses a one-command, one-response model\n   (while FTP is asynchronous) and FTP's 1yz codes are not part of the\n   SMTP model.\n   The second digit encodes responses in specific categories:\n   x0z  Syntax: These replies refer to syntax errors, syntactically\n      correct commands that do not fit any functional category, and\n      unimplemented or superfluous commands.\n   x1z  Information: These are replies to requests for information, such\n      as status or help.\n   x2z  Connections: These are replies referring to the transmission\n      channel.\n   x3z  Unspecified.\n   x4z  Unspecified.\n   x5z  Mail system: These replies indicate the status of the receiver\n      mail system vis-a-vis the requested transfer or other mail system\n      action.\n   The third digit gives a finer gradation of meaning in each category\n   specified by the second digit.  The list of replies illustrates this.\n   Each reply text is recommended rather than mandatory, and may even\n   change according to the command with which it is associated.  On the\n   other hand, the reply codes must strictly follow the specifications\n   in this section.  Receiver implementations should not invent new\n   codes for slightly different situations from the ones described here,\n   but rather adapt codes already defined.\n   For example, a command such as NOOP, whose successful execution does\n   not offer the SMTP client any new information, will return a 250\n   reply.  The reply is 502 when the command requests an unimplemented\n   non-site-specific action.  A refinement of that is the 504 reply for\n   a command that is implemented, but that requests an unimplemented\n   parameter.\n   The reply text may be longer than a single line; in these cases the\n   complete text must be marked so the SMTP client knows when it can\n   stop reading the reply.  This requires a special format to indicate a\n   multiple line reply.\n   The format for multiline replies requires that every line, except the\n   last, begin with the reply code, followed immediately by a hyphen,\n   \"-\" (also known as minus), followed by text.  The last line will\n   begin with the reply code, followed immediately by <SP>, optionally\n   some text, and <CRLF>.  As noted above, servers SHOULD send the <SP>\n   if subsequent text is not sent, but clients MUST be prepared for it\n   to be omitted.\n   For example:\n      250-First line\n      250-Second line\n      250-234 Text beginning with numbers\n      250 The last line\n   In a multiline reply, the reply code on each of the lines MUST be the\n   same.  It is reasonable for the client to rely on this, so it can\n   make processing decisions based on the code in any line, assuming\n   that all others will be the same.  In a few cases, there is important\n   data for the client in the reply \"text\".  The client will be able to\n   identify these cases from the current context.\n4.2.2.  Reply Codes by Function Groups\n   500  Syntax error, command unrecognized (This may include errors such\n      as command line too long)\n   501  Syntax error in parameters or arguments\n   502  Command not implemented (see Section 4.2.4)\n   503  Bad sequence of commands\n   504  Command parameter not implemented\n   211  System status, or system help reply\n   214  Help message (Information on how to use the receiver or the\n      meaning of a particular non-standard command; this reply is useful\n      only to the human user)\n   220  <domain> Service ready\n   221  <domain> Service closing transmission channel\n   421  <domain> Service not available, closing transmission channel\n      (This may be a reply to any command if the service knows it must\n      shut down)\n   250  Requested mail action okay, completed\n   251  User not local; will forward to <forward-path> (See Section 3.4)\n   252  Cannot VRFY user, but will accept message and attempt delivery\n      (See Section 3.5.3)\n   455  Server unable to accommodate parameters\n   555  MAIL FROM/RCPT TO parameters not recognized or not implemented\n   450  Requested mail action not taken: mailbox unavailable (e.g.,\n      mailbox busy or temporarily blocked for policy reasons)\n   550  Requested action not taken: mailbox unavailable (e.g., mailbox\n      not found, no access, or command rejected for policy reasons)\n   451  Requested action aborted: error in processing\n   551  User not local; please try <forward-path> (See Section 3.4)\n   452  Requested action not taken: insufficient system storage\n   552  Requested mail action aborted: exceeded storage allocation\n   553  Requested action not taken: mailbox name not allowed (e.g.,\n      mailbox syntax incorrect)\n   354  Start mail input; end with <CRLF>.<CRLF>\n   554  Transaction failed (Or, in the case of a connection-opening\n      response, \"No SMTP service here\")\n4.2.3.  Reply Codes in Numeric Order\n   211  System status, or system help reply\n   214  Help message (Information on how to use the receiver or the\n      meaning of a particular non-standard command; this reply is useful\n      only to the human user)\n   220  <domain> Service ready\n   221  <domain> Service closing transmission channel\n   250  Requested mail action okay, completed\n   251  User not local; will forward to <forward-path> (See Section 3.4)\n   252  Cannot VRFY user, but will accept message and attempt delivery\n      (See Section 3.5.3)\n   354  Start mail input; end with <CRLF>.<CRLF>\n   421  <domain> Service not available, closing transmission channel\n      (This may be a reply to any command if the service knows it must\n      shut down)\n   450  Requested mail action not taken: mailbox unavailable (e.g.,\n      mailbox busy or temporarily blocked for policy reasons)\n   451  Requested action aborted: local error in processing\n   452  Requested action not taken: insufficient system storage\n   455  Server unable to accommodate parameters\n   500  Syntax error, command unrecognized (This may include errors such\n      as command line too long)\n   501  Syntax error in parameters or arguments\n   502  Command not implemented (see Section 4.2.4)\n   503  Bad sequence of commands\n   504  Command parameter not implemented\n   550  Requested action not taken: mailbox unavailable (e.g., mailbox\n      not found, no access, or command rejected for policy reasons)\n   551  User not local; please try <forward-path> (See Section 3.4)\n   552  Requested mail action aborted: exceeded storage allocation\n   553  Requested action not taken: mailbox name not allowed (e.g.,\n      mailbox syntax incorrect)\n   554  Transaction failed (Or, in the case of a connection-opening\n      response, \"No SMTP service here\")\n   555  MAIL FROM/RCPT TO parameters not recognized or not implemented\n4.2.4.  Reply Code 502\n   Questions have been raised as to when reply code 502 (Command not\n   implemented) SHOULD be returned in preference to other codes. 502\n   SHOULD be used when the command is actually recognized by the SMTP\n   server, but not implemented.  If the command is not recognized, code\n   500 SHOULD be returned.  Extended SMTP systems MUST NOT list\n   capabilities in response to EHLO for which they will return 502 (or\n   500) replies.\n4.2.5.  Reply Codes after DATA and the Subsequent <CRLF>.<CRLF>\n   When an SMTP server returns a positive completion status (2yz code)\n   after the DATA command is completed with <CRLF>.<CRLF>, it accepts\n   responsibility for:\n   o  delivering the message (if the recipient mailbox exists), or\n   o  if attempts to deliver the message fail due to transient\n      conditions, retrying delivery some reasonable number of times at\n      intervals as specified in Section 4.5.4.\n   o  if attempts to deliver the message fail due to permanent\n      conditions, or if repeated attempts to deliver the message fail\n      due to transient conditions, returning appropriate notification to\n      the sender of the original message (using the address in the SMTP\n      MAIL command).\n   When an SMTP server returns a temporary error status (4yz) code after\n   the DATA command is completed with <CRLF>.<CRLF>, it MUST NOT make a\n   subsequent attempt to deliver that message.  The SMTP client retains\n   responsibility for the delivery of that message and may either return\n   it to the user or requeue it for a subsequent attempt (see\n   Section 4.5.4.1).\n   The user who originated the message SHOULD be able to interpret the\n   return of a transient failure status (by mail message or otherwise)\n   as a non-delivery indication, just as a permanent failure would be\n   interpreted.  If the client SMTP successfully handles these\n   conditions, the user will not receive such a reply.\n   When an SMTP server returns a permanent error status (5yz) code after\n   the DATA command is completed with <CRLF>.<CRLF>, it MUST NOT make\n   any subsequent attempt to deliver the message.  As with temporary\n   error status codes, the SMTP client retains responsibility for the\n   message, but SHOULD not again attempt delivery to the same server\n   without user review of the message and response and appropriate\n   intervention.\n4.3.  Sequencing of Commands and Replies\n4.3.1.  Sequencing Overview\n   The communication between the sender and receiver is an alternating\n   dialogue, controlled by the sender.  As such, the sender issues a\n   command and the receiver responds with a reply.  Unless other\n   arrangements are negotiated through service extensions, the sender\n   MUST wait for this response before sending further commands.  One\n   important reply is the connection greeting.  Normally, a receiver\n   will send a 220 \"Service ready\" reply when the connection is\n   completed.  The sender SHOULD wait for this greeting message before\n   sending any commands.\n   Note: all the greeting-type replies have the official name (the\n   fully-qualified primary domain name) of the server host as the first\n   word following the reply code.  Sometimes the host will have no\n   meaningful name.  See Section 4.1.3 for a discussion of alternatives\n   in these situations.\n   For example,\n      220 ISIF.USC.EDU Service ready\n   or\n      220 mail.example.com SuperSMTP v 6.1.2 Service ready\n   or\n      220 [10.0.0.1] Clueless host service ready\n   The table below lists alternative success and failure replies for\n   each command.  These SHOULD be strictly adhered to.  A receiver MAY\n   substitute text in the replies, but the meanings and actions implied\n   by the code numbers and by the specific command reply sequence MUST\n   be preserved.\n4.3.2.  Command-Reply Sequences\n   Each command is listed with its usual possible replies.  The prefixes\n   used before the possible replies are \"I\" for intermediate, \"S\" for\n   success, and \"E\" for error.  Since some servers may generate other\n   replies under special circumstances, and to allow for future\n   extension, SMTP clients SHOULD, when possible, interpret only the\n   first digit of the reply and MUST be prepared to deal with\n   unrecognized reply codes by interpreting the first digit only.\n   Unless extended using the mechanisms described in Section 2.2, SMTP\n   servers MUST NOT transmit reply codes to an SMTP client that are\n   other than three digits or that do not start in a digit between 2 and\n   5 inclusive.\n   These sequencing rules and, in principle, the codes themselves, can\n   be extended or modified by SMTP extensions offered by the server and\n   accepted (requested) by the client.  However, if the target is more\n   precise granularity in the codes, rather than codes for completely\n   new purposes, the system described in RFC 3463 [25] SHOULD be used in\n   preference to the invention of new codes.\n   In addition to the codes listed below, any SMTP command can return\n   any of the following codes if the corresponding unusual circumstances\n   are encountered:\n   500  For the \"command line too long\" case or if the command name was\n      not recognized.  Note that producing a \"command not recognized\"\n      error in response to the required subset of these commands is a\n      violation of this specification.  Similarly, producing a \"command\n      too long\" message for a command line shorter than 512 characters\n      would violate the provisions of Section 4.5.3.1.4.\n   501  Syntax error in command or arguments.  In order to provide for\n      future extensions, commands that are specified in this document as\n      not accepting arguments (DATA, RSET, QUIT) SHOULD return a 501\n      message if arguments are supplied in the absence of EHLO-\n      advertised extensions.\n   421  Service shutting down and closing transmission channel\n   Specific sequences are:\n      CONNECTION ESTABLISHMENT\n         S: 220\n         E: 554\n      EHLO or HELO\n         S: 250\n         E: 504 (a conforming implementation could return this code only\n         in fairly obscure cases), 550, 502 (permitted only with an old-\n         style server that does not support EHLO)\n      MAIL\n         S: 250\n         E: 552, 451, 452, 550, 553, 503, 455, 555\n      RCPT\n         S: 250, 251 (but see Section 3.4 for discussion of 251 and 551)\n         E: 550, 551, 552, 553, 450, 451, 452, 503, 455, 555\n      DATA\n         I: 354 -> data -> S: 250\n                           E: 552, 554, 451, 452\n                           E: 450, 550 (rejections for policy reasons)\n         E: 503, 554\n      RSET\n         S: 250\n      VRFY\n         S: 250, 251, 252\n         E: 550, 551, 553, 502, 504\n      EXPN\n         S: 250, 252\n         E: 550, 500, 502, 504\n      HELP\n         S: 211, 214\n         E: 502, 504\n      NOOP\n         S: 250\n      QUIT\n         S: 221\n4.4.  Trace Information\n   When an SMTP server receives a message for delivery or further\n   processing, it MUST insert trace (\"time stamp\" or \"Received\")\n   information at the beginning of the message content, as discussed in\n   Section 4.1.1.4.\n   This line MUST be structured as follows:\n   o  The FROM clause, which MUST be supplied in an SMTP environment,\n      SHOULD contain both (1) the name of the source host as presented\n      in the EHLO command and (2) an address literal containing the IP\n      address of the source, determined from the TCP connection.\n   o  The ID clause MAY contain an \"@\" as suggested in RFC 822, but this\n      is not required.\n   o  If the FOR clause appears, it MUST contain exactly one <path>\n      entry, even when multiple RCPT commands have been given.  Multiple\n      <path>s raise some security issues and have been deprecated, see\n      Section 7.2.\n   An Internet mail program MUST NOT change or delete a Received: line\n   that was previously added to the message header section.  SMTP\n   servers MUST prepend Received lines to messages; they MUST NOT change\n   the order of existing lines or insert Received lines in any other\n   location.\n   As the Internet grows, comparability of Received header fields is\n   important for detecting problems, especially slow relays.  SMTP\n   servers that create Received header fields SHOULD use explicit\n   offsets in the dates (e.g., -0800), rather than time zone names of\n   any type.  Local time (with an offset) SHOULD be used rather than UT\n   when feasible.  This formulation allows slightly more information\n   about local circumstances to be specified.  If UT is needed, the\n   receiver need merely do some simple arithmetic to convert the values.\n   Use of UT loses information about the time zone-location of the\n   server.  If it is desired to supply a time zone name, it SHOULD be\n   included in a comment.\n   When the delivery SMTP server makes the \"final delivery\" of a\n   message, it inserts a return-path line at the beginning of the mail\n   data.  This use of return-path is required; mail systems MUST support\n   it.  The return-path line preserves the information in the <reverse-\n   path> from the MAIL command.  Here, final delivery means the message\n   has left the SMTP environment.  Normally, this would mean it had been\n   delivered to the destination user or an associated mail drop, but in\n   some cases it may be further processed and transmitted by another\n   mail system.\n   It is possible for the mailbox in the return path to be different\n   from the actual sender's mailbox, for example, if error responses are\n   to be delivered to a special error handling mailbox rather than to\n   the message sender.  When mailing lists are involved, this\n   arrangement is common and useful as a means of directing errors to\n   the list maintainer rather than the message originator.\n   The text above implies that the final mail data will begin with a\n   return path line, followed by one or more time stamp lines.  These\n   lines will be followed by the rest of the mail data: first the\n   balance of the mail header section and then the body (RFC 5322 [4]).\n   It is sometimes difficult for an SMTP server to determine whether or\n   not it is making final delivery since forwarding or other operations\n   may occur after the message is accepted for delivery.  Consequently,\n   any further (forwarding, gateway, or relay) systems MAY remove the\n   return path and rebuild the MAIL command as needed to ensure that\n   exactly one such line appears in a delivered message.\n   A message-originating SMTP system SHOULD NOT send a message that\n   already contains a Return-path header field.  SMTP servers performing\n   a relay function MUST NOT inspect the message data, and especially\n   not to the extent needed to determine if Return-path header fields\n   are present.  SMTP servers making final delivery MAY remove Return-\n   path header fields before adding their own.\n   The primary purpose of the Return-path is to designate the address to\n   which messages indicating non-delivery or other mail system failures\n   are to be sent.  For this to be unambiguous, exactly one return path\n   SHOULD be present when the message is delivered.  Systems using RFC\n   822 syntax with non-SMTP transports SHOULD designate an unambiguous\n   address, associated with the transport envelope, to which error\n   reports (e.g., non-delivery messages) should be sent.\n   Historical note: Text in RFC 822 that appears to contradict the use\n   of the Return-path header field (or the envelope reverse-path address\n   from the MAIL command) as the destination for error messages is not\n   applicable on the Internet.  The reverse-path address (as copied into\n   the Return-path) MUST be used as the target of any mail containing\n   delivery error messages.\n   In particular:\n   o  a gateway from SMTP -> elsewhere SHOULD insert a return-path\n      header field, unless it is known that the \"elsewhere\" transport\n      also uses Internet domain addresses and maintains the envelope\n      sender address separately.\n   o  a gateway from elsewhere -> SMTP SHOULD delete any return-path\n      header field present in the message, and either copy that\n      information to the SMTP envelope or combine it with information\n      present in the envelope of the other transport system to construct\n      the reverse-path argument to the MAIL command in the SMTP\n      envelope.\n   The server must give special treatment to cases in which the\n   processing following the end of mail data indication is only\n   partially successful.  This could happen if, after accepting several\n   recipients and the mail data, the SMTP server finds that the mail\n   data could be successfully delivered to some, but not all, of the\n   recipients.  In such cases, the response to the DATA command MUST be\n   an OK reply.  However, the SMTP server MUST compose and send an\n   \"undeliverable mail\" notification message to the originator of the\n   message.\n   A single notification listing all of the failed recipients or\n   separate notification messages MUST be sent for each failed\n   recipient.  For economy of processing by the sender, the former\n   SHOULD be used when possible.  Note that the key difference between\n   handling aliases (Section 3.9.1) and forwarding (this subsection) is\n   the change to the backward-pointing address in this case.  All\n   notification messages about undeliverable mail MUST be sent using the\n   MAIL command (even if they result from processing the obsolete SEND,\n   SOML, or SAML commands) and MUST use a null return path as discussed\n   in Section 3.6.\n   The time stamp line and the return path line are formally defined as\n   follows (the definitions for \"FWS\" and \"CFWS\" appear in RFC 5322\n   [4]):\n   Return-path-line  = \"Return-Path:\" FWS Reverse-path <CRLF>\n   Time-stamp-line  = \"Received:\" FWS Stamp <CRLF>\n   Stamp          = From-domain By-domain Opt-info [CFWS] \";\"\n                  FWS date-time\n                  ; where \"date-time\" is as defined in RFC 5322 [4]\n                  ; but the \"obs-\" forms, especially two-digit\n                  ; years, are prohibited in SMTP and MUST NOT be used.\n   From-domain    = \"FROM\" FWS Extended-Domain\n   By-domain      = CFWS \"BY\" FWS Extended-Domain\n   Extended-Domain  = Domain /\n                    ( Domain FWS \"(\" TCP-info \")\" ) /\n                    ( address-literal FWS \"(\" TCP-info \")\" )\n   TCP-info       = address-literal / ( Domain FWS address-literal )\n                  ; Information derived by server from TCP connection\n                  ; not client EHLO.\n   Opt-info       = [Via] [With] [ID] [For]\n                  [Additional-Registered-Clauses]\n   Via            = CFWS \"VIA\" FWS Link\n   With           = CFWS \"WITH\" FWS Protocol\n   ID             = CFWS \"ID\" FWS ( Atom / msg-id )\n                  ; msg-id is defined in RFC 5322 [4]\n   For            = CFWS \"FOR\" FWS ( Path / Mailbox )\n   Additional-Registered-Clauses  = CFWS Atom FWS String\n                                  ; Additional standard clauses may be\n                                  added in this\n                                  ; location by future standards and\n                                  registration with\n                                  ; IANA.  SMTP servers SHOULD NOT use\n                                  unregistered\n                                  ; names.  See Section 8.\n   Link           = \"TCP\" / Addtl-Link\n   Addtl-Link     = Atom\n                  ; Additional standard names for links are\n                  ; registered with the Internet Assigned Numbers\n                  ; Authority (IANA).  \"Via\" is primarily of value\n                  ; with non-Internet transports.  SMTP servers\n                  ; SHOULD NOT use unregistered names.\n   Protocol       = \"ESMTP\" / \"SMTP\" / Attdl-Protocol\n   Attdl-Protocol = Atom\n                  ; Additional standard names for protocols are\n                  ; registered with the Internet Assigned Numbers\n                  ; Authority (IANA) in the \"mail parameters\"\n                  ; registry [9].  SMTP servers SHOULD NOT\n                  ; use unregistered names.\n4.5.  Additional Implementation Issues\n4.5.1.  Minimum Implementation\n   In order to make SMTP workable, the following minimum implementation\n   MUST be provided by all receivers.  The following commands MUST be\n   supported to conform to this specification:\n      EHLO\n      HELO\n      MAIL\n      RCPT\n      DATA\n      RSET\n      NOOP\n      QUIT\n      VRFY\n   Any system that includes an SMTP server supporting mail relaying or\n   delivery MUST support the reserved mailbox \"postmaster\" as a case-\n   insensitive local name.  This postmaster address is not strictly\n   necessary if the server always returns 554 on connection opening (as\n   described in Section 3.1).  The requirement to accept mail for\n   postmaster implies that RCPT commands that specify a mailbox for\n   postmaster at any of the domains for which the SMTP server provides\n   mail service, as well as the special case of \"RCPT TO:<Postmaster>\"\n   (with no domain specification), MUST be supported.\n   SMTP systems are expected to make every reasonable effort to accept\n   mail directed to Postmaster from any other system on the Internet.\n   In extreme cases -- such as to contain a denial of service attack or\n   other breach of security -- an SMTP server may block mail directed to\n   Postmaster.  However, such arrangements SHOULD be narrowly tailored\n   so as to avoid blocking messages that are not part of such attacks.\n4.5.2.  Transparency\n   Without some provision for data transparency, the character sequence\n   \"<CRLF>.<CRLF>\" ends the mail text and cannot be sent by the user.\n   In general, users are not aware of such \"forbidden\" sequences.  To\n   allow all user composed text to be transmitted transparently, the\n   following procedures are used:\n   o  Before sending a line of mail text, the SMTP client checks the\n      first character of the line.  If it is a period, one additional\n      period is inserted at the beginning of the line.\n   o  When a line of mail text is received by the SMTP server, it checks\n      the line.  If the line is composed of a single period, it is\n      treated as the end of mail indicator.  If the first character is a\n      period and there are other characters on the line, the first\n      character is deleted.\n   The mail data may contain any of the 128 ASCII characters.  All\n   characters are to be delivered to the recipient's mailbox, including\n   spaces, vertical and horizontal tabs, and other control characters.\n   If the transmission channel provides an 8-bit byte (octet) data\n   stream, the 7-bit ASCII codes are transmitted, right justified, in\n   the octets, with the high-order bits cleared to zero.  See\n   Section 3.6 for special treatment of these conditions in SMTP systems\n   serving a relay function.\n   In some systems, it may be necessary to transform the data as it is\n   received and stored.  This may be necessary for hosts that use a\n   different character set than ASCII as their local character set, that\n   store data in records rather than strings, or which use special\n   character sequences as delimiters inside mailboxes.  If such\n   transformations are necessary, they MUST be reversible, especially if\n   they are applied to mail being relayed.\n4.5.3.  Sizes and Timeouts\n4.5.3.1.  Size Limits and Minimums\n   There are several objects that have required minimum/maximum sizes.\n   Every implementation MUST be able to receive objects of at least\n   these sizes.  Objects larger than these sizes SHOULD be avoided when\n   possible.  However, some Internet mail constructs such as encoded\n   X.400 addresses (RFC 2156 [35]) will often require larger objects.\n   Clients MAY attempt to transmit these, but MUST be prepared for a\n   server to reject them if they cannot be handled by it.  To the\n   maximum extent possible, implementation techniques that impose no\n   limits on the length of these objects should be used.\n   Extensions to SMTP may involve the use of characters that occupy more\n   than a single octet each.  This section therefore specifies lengths\n   in octets where absolute lengths, rather than character counts, are\n   intended.\n4.5.3.1.1.  Local-part\n   The maximum total length of a user name or other local-part is 64\n   octets.\n4.5.3.1.2.  Domain\n   The maximum total length of a domain name or number is 255 octets.\n4.5.3.1.3.  Path\n   The maximum total length of a reverse-path or forward-path is 256\n   octets (including the punctuation and element separators).\n4.5.3.1.4.  Command Line\n   The maximum total length of a command line including the command word\n   and the <CRLF> is 512 octets.  SMTP extensions may be used to\n   increase this limit.\n4.5.3.1.5.  Reply Line\n   The maximum total length of a reply line including the reply code and\n   the <CRLF> is 512 octets.  More information may be conveyed through\n   multiple-line replies.\n4.5.3.1.6.  Text Line\n   The maximum total length of a text line including the <CRLF> is 1000\n   octets (not counting the leading dot duplicated for transparency).\n   This number may be increased by the use of SMTP Service Extensions.\n4.5.3.1.7.  Message Content\n   The maximum total length of a message content (including any message\n   header section as well as the message body) MUST BE at least 64K\n   octets.  Since the introduction of Internet Standards for multimedia\n   mail (RFC 2045 [21]), message lengths on the Internet have grown\n   dramatically, and message size restrictions should be avoided if at\n   all possible.  SMTP server systems that must impose restrictions\n   SHOULD implement the \"SIZE\" service extension of RFC 1870 [10], and\n   SMTP client systems that will send large messages SHOULD utilize it\n   when possible.\n4.5.3.1.8.  Recipients Buffer\n   The minimum total number of recipients that MUST be buffered is 100\n   recipients.  Rejection of messages (for excessive recipients) with\n   fewer than 100 RCPT commands is a violation of this specification.\n   The general principle that relaying SMTP server MUST NOT, and\n   delivery SMTP servers SHOULD NOT, perform validation tests on message\n   header fields suggests that messages SHOULD NOT be rejected based on\n   the total number of recipients shown in header fields.  A server that\n   imposes a limit on the number of recipients MUST behave in an orderly\n   fashion, such as rejecting additional addresses over its limit rather\n   than silently discarding addresses previously accepted.  A client\n   that needs to deliver a message containing over 100 RCPT commands\n   SHOULD be prepared to transmit in 100-recipient \"chunks\" if the\n   server declines to accept more than 100 recipients in a single\n   message.\n4.5.3.1.9.  Treatment When Limits Exceeded\n   Errors due to exceeding these limits may be reported by using the\n   reply codes.  Some examples of reply codes are:\n      500 Line too long.\n   or\n      501 Path too long\n   or\n      452 Too many recipients (see below)\n   or\n      552 Too much mail data.\n4.5.3.1.10.  Too Many Recipients Code\n   RFC 821 [1] incorrectly listed the error where an SMTP server\n   exhausts its implementation limit on the number of RCPT commands\n   (\"too many recipients\") as having reply code 552.  The correct reply\n   code for this condition is 452.  Clients SHOULD treat a 552 code in\n   this case as a temporary, rather than permanent, failure so the logic\n   below works.\n   When a conforming SMTP server encounters this condition, it has at\n   least 100 successful RCPT commands in its recipients buffer.  If the\n   server is able to accept the message, then at least these 100\n   addresses will be removed from the SMTP client's queue.  When the\n   client attempts retransmission of those addresses that received 452\n   responses, at least 100 of these will be able to fit in the SMTP\n   server's recipients buffer.  Each retransmission attempt that is able\n   to deliver anything will be able to dispose of at least 100 of these\n   recipients.\n   If an SMTP server has an implementation limit on the number of RCPT\n   commands and this limit is exhausted, it MUST use a response code of\n   452 (but the client SHOULD also be prepared for a 552, as noted\n   above).  If the server has a configured site-policy limitation on the\n   number of RCPT commands, it MAY instead use a 5yz response code.  In\n   particular, if the intent is to prohibit messages with more than a\n   site-specified number of recipients, rather than merely limit the\n   number of recipients in a given mail transaction, it would be\n   reasonable to return a 503 response to any DATA command received\n   subsequent to the 452 (or 552) code or to simply return the 503 after\n   DATA without returning any previous negative response.\n4.5.3.2.  Timeouts\n   An SMTP client MUST provide a timeout mechanism.  It MUST use per-\n   command timeouts rather than somehow trying to time the entire mail\n   transaction.  Timeouts SHOULD be easily reconfigurable, preferably\n   without recompiling the SMTP code.  To implement this, a timer is set\n   for each SMTP command and for each buffer of the data transfer.  The\n   latter means that the overall timeout is inherently proportional to\n   the size of the message.\n   Based on extensive experience with busy mail-relay hosts, the minimum\n   per-command timeout values SHOULD be as follows:\n4.5.3.2.1.  Initial 220 Message: 5 Minutes\n   An SMTP client process needs to distinguish between a failed TCP\n   connection and a delay in receiving the initial 220 greeting message.\n   Many SMTP servers accept a TCP connection but delay delivery of the\n   220 message until their system load permits more mail to be\n   processed.\n4.5.3.2.2.  MAIL Command: 5 Minutes\n4.5.3.2.3.  RCPT Command: 5 Minutes\n   A longer timeout is required if processing of mailing lists and\n   aliases is not deferred until after the message was accepted.\n4.5.3.2.4.  DATA Initiation: 2 Minutes\n   This is while awaiting the \"354 Start Input\" reply to a DATA command.\n4.5.3.2.5.  Data Block: 3 Minutes\n   This is while awaiting the completion of each TCP SEND call\n   transmitting a chunk of data.\n4.5.3.2.6.  DATA Termination: 10 Minutes.\n   This is while awaiting the \"250 OK\" reply.  When the receiver gets\n   the final period terminating the message data, it typically performs\n   processing to deliver the message to a user mailbox.  A spurious\n   timeout at this point would be very wasteful and would typically\n   result in delivery of multiple copies of the message, since it has\n   been successfully sent and the server has accepted responsibility for\n   delivery.  See Section 6.1 for additional discussion.\n4.5.3.2.7.  Server Timeout: 5 Minutes.\n   An SMTP server SHOULD have a timeout of at least 5 minutes while it\n   is awaiting the next command from the sender.\n4.5.4.  Retry Strategies\n   The common structure of a host SMTP implementation includes user\n   mailboxes, one or more areas for queuing messages in transit, and one\n   or more daemon processes for sending and receiving mail.  The exact\n   structure will vary depending on the needs of the users on the host\n   and the number and size of mailing lists supported by the host.  We\n   describe several optimizations that have proved helpful, particularly\n   for mailers supporting high traffic levels.\n   Any queuing strategy MUST include timeouts on all activities on a\n   per-command basis.  A queuing strategy MUST NOT send error messages\n   in response to error messages under any circumstances.\n4.5.4.1.  Sending Strategy\n   The general model for an SMTP client is one or more processes that\n   periodically attempt to transmit outgoing mail.  In a typical system,\n   the program that composes a message has some method for requesting\n   immediate attention for a new piece of outgoing mail, while mail that\n   cannot be transmitted immediately MUST be queued and periodically\n   retried by the sender.  A mail queue entry will include not only the\n   message itself but also the envelope information.\n   The sender MUST delay retrying a particular destination after one\n   attempt has failed.  In general, the retry interval SHOULD be at\n   least 30 minutes; however, more sophisticated and variable strategies\n   will be beneficial when the SMTP client can determine the reason for\n   non-delivery.\n   Retries continue until the message is transmitted or the sender gives\n   up; the give-up time generally needs to be at least 4-5 days.  It MAY\n   be appropriate to set a shorter maximum number of retries for non-\n   delivery notifications and equivalent error messages than for\n   standard messages.  The parameters to the retry algorithm MUST be\n   configurable.\n   A client SHOULD keep a list of hosts it cannot reach and\n   corresponding connection timeouts, rather than just retrying queued\n   mail items.\n   Experience suggests that failures are typically transient (the target\n   system or its connection has crashed), favoring a policy of two\n   connection attempts in the first hour the message is in the queue,\n   and then backing off to one every two or three hours.\n   The SMTP client can shorten the queuing delay in cooperation with the\n   SMTP server.  For example, if mail is received from a particular\n   address, it is likely that mail queued for that host can now be sent.\n   Application of this principle may, in many cases, eliminate the\n   requirement for an explicit \"send queues now\" function such as ETRN,\n   RFC 1985 [36].\n   The strategy may be further modified as a result of multiple\n   addresses per host (see below) to optimize delivery time versus\n   resource usage.\n   An SMTP client may have a large queue of messages for each\n   unavailable destination host.  If all of these messages were retried\n   in every retry cycle, there would be excessive Internet overhead and\n   the sending system would be blocked for a long period.  Note that an\n   SMTP client can generally determine that a delivery attempt has\n   failed only after a timeout of several minutes, and even a one-minute\n   timeout per connection will result in a very large delay if retries\n   are repeated for dozens, or even hundreds, of queued messages to the\n   same host.\n   At the same time, SMTP clients SHOULD use great care in caching\n   negative responses from servers.  In an extreme case, if EHLO is\n   issued multiple times during the same SMTP connection, different\n   answers may be returned by the server.  More significantly, 5yz\n   responses to the MAIL command MUST NOT be cached.\n   When a mail message is to be delivered to multiple recipients, and\n   the SMTP server to which a copy of the message is to be sent is the\n   same for multiple recipients, then only one copy of the message\n   SHOULD be transmitted.  That is, the SMTP client SHOULD use the\n   command sequence: MAIL, RCPT, RCPT, ..., RCPT, DATA instead of the\n   sequence: MAIL, RCPT, DATA, ..., MAIL, RCPT, DATA.  However, if there\n   are very many addresses, a limit on the number of RCPT commands per\n   MAIL command MAY be imposed.  This efficiency feature SHOULD be\n   implemented.\n   Similarly, to achieve timely delivery, the SMTP client MAY support\n   multiple concurrent outgoing mail transactions.  However, some limit\n   may be appropriate to protect the host from devoting all its\n   resources to mail.\n4.5.4.2.  Receiving Strategy\n   The SMTP server SHOULD attempt to keep a pending listen on the SMTP\n   port (specified by IANA as port 25) at all times.  This requires the\n   support of multiple incoming TCP connections for SMTP.  Some limit\n   MAY be imposed, but servers that cannot handle more than one SMTP\n   transaction at a time are not in conformance with the intent of this\n   specification.\n   As discussed above, when the SMTP server receives mail from a\n   particular host address, it could activate its own SMTP queuing\n   mechanisms to retry any mail pending for that host address.\n4.5.5.  Messages with a Null Reverse-Path\n   There are several types of notification messages that are required by\n   existing and proposed Standards to be sent with a null reverse-path,\n   namely non-delivery notifications as discussed in Section 3.7, other\n   kinds of Delivery Status Notifications (DSNs, RFC 3461 [32]), and\n   Message Disposition Notifications (MDNs, RFC 3798 [37]).  All of\n   these kinds of messages are notifications about a previous message,\n   and they are sent to the reverse-path of the previous mail message.\n   (If the delivery of such a notification message fails, that usually\n   indicates a problem with the mail system of the host to which the\n   notification message is addressed.  For this reason, at some hosts\n   the MTA is set up to forward such failed notification messages to\n   someone who is able to fix problems with the mail system, e.g., via\n   the postmaster alias.)\n   All other types of messages (i.e., any message which is not required\n   by a Standards-Track RFC to have a null reverse-path) SHOULD be sent\n   with a valid, non-null reverse-path.\n   Implementers of automated email processors should be careful to make\n   sure that the various kinds of messages with a null reverse-path are\n   handled correctly.  In particular, such systems SHOULD NOT reply to\n   messages with a null reverse-path, and they SHOULD NOT add a non-null\n   reverse-path, or change a null reverse-path to a non-null one, to\n   such messages when forwarding."
  },
  {
    "section_number": "5.",
    "section_name": "Address Resolution and Mail Handling",
    "tag": "Section 5. Address Resolution and Mail Handling",
    "content": "5.1.  Locating the Target Host\n   Once an SMTP client lexically identifies a domain to which mail will\n   be delivered for processing (as described in Sections 2.3.5 and 3.6),\n   a DNS lookup MUST be performed to resolve the domain name (RFC 1035\n   [2]).  The names are expected to be fully-qualified domain names\n   (FQDNs): mechanisms for inferring FQDNs from partial names or local\n   aliases are outside of this specification.  Due to a history of\n   problems, SMTP servers used for initial submission of messages SHOULD\n   NOT make such inferences (Message Submission Servers [18] have\n   somewhat more flexibility) and intermediate (relay) SMTP servers MUST\n   NOT make them.\n   The lookup first attempts to locate an MX record associated with the\n   name.  If a CNAME record is found, the resulting name is processed as\n   if it were the initial name.  If a non-existent domain error is\n   returned, this situation MUST be reported as an error.  If a\n   temporary error is returned, the message MUST be queued and retried\n   later (see Section 4.5.4.1).  If an empty list of MXs is returned,\n   the address is treated as if it was associated with an implicit MX\n   RR, with a preference of 0, pointing to that host.  If MX records are\n   present, but none of them are usable, or the implicit MX is unusable,\n   this situation MUST be reported as an error.\n   If one or more MX RRs are found for a given name, SMTP systems MUST\n   NOT utilize any address RRs associated with that name unless they are\n   located using the MX RRs; the \"implicit MX\" rule above applies only\n   if there are no MX records present.  If MX records are present, but\n   none of them are usable, this situation MUST be reported as an error.\n   When a domain name associated with an MX RR is looked up and the\n   associated data field obtained, the data field of that response MUST\n   contain a domain name.  That domain name, when queried, MUST return\n   at least one address record (e.g., A or AAAA RR) that gives the IP\n   address of the SMTP server to which the message should be directed.\n   Any other response, specifically including a value that will return a\n   CNAME record when queried, lies outside the scope of this Standard.\n   The prohibition on labels in the data that resolve to CNAMEs is\n   discussed in more detail in RFC 2181, Section 10.3 [38].\n   When the lookup succeeds, the mapping can result in a list of\n   alternative delivery addresses rather than a single address, because\n   of multiple MX records, multihoming, or both.  To provide reliable\n   mail transmission, the SMTP client MUST be able to try (and retry)\n   each of the relevant addresses in this list in order, until a\n   delivery attempt succeeds.  However, there MAY also be a configurable\n   limit on the number of alternate addresses that can be tried.  In any\n   case, the SMTP client SHOULD try at least two addresses.\n   Two types of information are used to rank the host addresses:\n   multiple MX records, and multihomed hosts.\n   MX records contain a preference indication that MUST be used in\n   sorting if more than one such record appears (see below).  Lower\n   numbers are more preferred than higher ones.  If there are multiple\n   destinations with the same preference and there is no clear reason to\n   favor one (e.g., by recognition of an easily reached address), then\n   the sender-SMTP MUST randomize them to spread the load across\n   multiple mail exchangers for a specific organization.\n   The destination host (perhaps taken from the preferred MX record) may\n   be multihomed, in which case the domain name resolver will return a\n   list of alternative IP addresses.  It is the responsibility of the\n   domain name resolver interface to have ordered this list by\n   decreasing preference if necessary, and the SMTP sender MUST try them\n   in the order presented.\n   Although the capability to try multiple alternative addresses is\n   required, specific installations may want to limit or disable the use\n   of alternative addresses.  The question of whether a sender should\n   attempt retries using the different addresses of a multihomed host\n   has been controversial.  The main argument for using the multiple\n   addresses is that it maximizes the probability of timely delivery,\n   and indeed sometimes the probability of any delivery; the counter-\n   argument is that it may result in unnecessary resource use.  Note\n   that resource use is also strongly determined by the sending strategy\n   discussed in Section 4.5.4.1.\n   If an SMTP server receives a message with a destination for which it\n   is a designated Mail eXchanger, it MAY relay the message (potentially\n   after having rewritten the MAIL FROM and/or RCPT TO addresses), make\n   final delivery of the message, or hand it off using some mechanism\n   outside the SMTP-provided transport environment.  Of course, neither\n   of the latter require that the list of MX records be examined\n   further.\n   If it determines that it should relay the message without rewriting\n   the address, it MUST sort the MX records to determine candidates for\n   delivery.  The records are first ordered by preference, with the\n   lowest-numbered records being most preferred.  The relay host MUST\n   then inspect the list for any of the names or addresses by which it\n   might be known in mail transactions.  If a matching record is found,\n   all records at that preference level and higher-numbered ones MUST be\n   discarded from consideration.  If there are no records left at that\n   point, it is an error condition, and the message MUST be returned as\n   undeliverable.  If records do remain, they SHOULD be tried, best\n   preference first, as described above.\n5.2.  IPv6 and MX Records\n   In the contemporary Internet, SMTP clients and servers may be hosted\n   on IPv4 systems, IPv6 systems, or dual-stack systems that are\n   compatible with either version of the Internet Protocol.  The host\n   domains to which MX records point may, consequently, contain \"A RR\"s\n   (IPv4), \"AAAA RR\"s (IPv6), or any combination of them.  While RFC\n   3974 [39] discusses some operational experience in mixed\n   environments, it was not comprehensive enough to justify\n   standardization, and some of its recommendations appear to be\n   inconsistent with this specification.  The appropriate actions to be\n   taken either will depend on local circumstances, such as performance\n   of the relevant networks and any conversions that might be necessary,\n   or will be obvious (e.g., an IPv6-only client need not attempt to\n   look up A RRs or attempt to reach IPv4-only servers).  Designers of\n   SMTP implementations that might run in IPv6 or dual-stack\n   environments should study the procedures above, especially the\n   comments about multihomed hosts, and, preferably, provide mechanisms\n   to facilitate operational tuning and mail interoperability between\n   IPv4 and IPv6 systems while considering local circumstances."
  },
  {
    "section_number": "6.",
    "section_name": "Problem Detection and Handling",
    "tag": "Section 6. Problem Detection and Handling",
    "content": "6.1.  Reliable Delivery and Replies by Email\n   When the receiver-SMTP accepts a piece of mail (by sending a \"250 OK\"\n   message in response to DATA), it is accepting responsibility for\n   delivering or relaying the message.  It must take this responsibility\n   seriously.  It MUST NOT lose the message for frivolous reasons, such\n   as because the host later crashes or because of a predictable\n   resource shortage.  Some reasons that are not considered frivolous\n   are discussed in the next subsection and in Section 7.8.\n   If there is a delivery failure after acceptance of a message, the\n   receiver-SMTP MUST formulate and mail a notification message.  This\n   notification MUST be sent using a null (\"<>\") reverse-path in the\n   envelope.  The recipient of this notification MUST be the address\n   from the envelope return path (or the Return-Path: line).  However,\n   if this address is null (\"<>\"), the receiver-SMTP MUST NOT send a\n   notification.  Obviously, nothing in this section can or should\n   prohibit local decisions (i.e., as part of the same system\n   environment as the receiver-SMTP) to log or otherwise transmit\n   information about null address events locally if that is desired.  If\n   the address is an explicit source route, it MUST be stripped down to\n   its final hop.\n   For example, suppose that an error notification must be sent for a\n   message that arrived with:\n      MAIL FROM:<@a,@b:user@d>\n   The notification message MUST be sent using:\n      RCPT TO:<user@d>\n   Some delivery failures after the message is accepted by SMTP will be\n   unavoidable.  For example, it may be impossible for the receiving\n   SMTP server to validate all the delivery addresses in RCPT command(s)\n   due to a \"soft\" domain system error, because the target is a mailing\n   list (see earlier discussion of RCPT), or because the server is\n   acting as a relay and has no immediate access to the delivering\n   system.\n   To avoid receiving duplicate messages as the result of timeouts, a\n   receiver-SMTP MUST seek to minimize the time required to respond to\n   the final <CRLF>.<CRLF> end of data indicator.  See RFC 1047 [40] for\n   a discussion of this problem.\n6.2.  Unwanted, Unsolicited, and \"Attack\" Messages\n   Utility and predictability of the Internet mail system requires that\n   messages that can be delivered should be delivered, regardless of any\n   syntax or other faults associated with those messages and regardless\n   of their content.  If they cannot be delivered, and cannot be\n   rejected by the SMTP server during the SMTP transaction, they should\n   be \"bounced\" (returned with non-delivery notification messages) as\n   described above.  In today's world, in which many SMTP server\n   operators have discovered that the quantity of undesirable bulk email\n   vastly exceeds the quantity of desired mail and in which accepting a\n   message may trigger additional undesirable traffic by providing\n   verification of the address, those principles may not be practical.\n   As discussed in Section 7.8 and Section 7.9 below, dropping mail\n   without notification of the sender is permitted in practice.\n   However, it is extremely dangerous and violates a long tradition and\n   community expectations that mail is either delivered or returned.  If\n   silent message-dropping is misused, it could easily undermine\n   confidence in the reliability of the Internet's mail systems.  So\n   silent dropping of messages should be considered only in those cases\n   where there is very high confidence that the messages are seriously\n   fraudulent or otherwise inappropriate.\n   To stretch the principle of delivery if possible even further, it may\n   be a rational policy to not deliver mail that has an invalid return\n   address, although the history of the network is that users are\n   typically better served by delivering any message that can be\n   delivered.  Reliably determining that a return address is invalid can\n   be a difficult and time-consuming process, especially if the putative\n   sending system is not directly accessible or does not fully and\n   accurately support VRFY and, even if a \"drop messages with invalid\n   return addresses\" policy is adopted, it SHOULD be applied only when\n   there is near-certainty that the return addresses are, in fact,\n   invalid.\n   Conversely, if a message is rejected because it is found to contain\n   hostile content (a decision that is outside the scope of an SMTP\n   server as defined in this document), rejection (\"bounce\") messages\n   SHOULD NOT be sent unless the receiving site is confident that those\n   messages will be usefully delivered.  The preference and default in\n   these cases is to avoid sending non-delivery messages when the\n   incoming message is determined to contain hostile content.\n6.3.  Loop Detection\n   Simple counting of the number of \"Received:\" header fields in a\n   message has proven to be an effective, although rarely optimal,\n   method of detecting loops in mail systems.  SMTP servers using this\n   technique SHOULD use a large rejection threshold, normally at least\n   100 Received entries.  Whatever mechanisms are used, servers MUST\n   contain provisions for detecting and stopping trivial loops.\n6.4.  Compensating for Irregularities\n   Unfortunately, variations, creative interpretations, and outright\n   violations of Internet mail protocols do occur; some would suggest\n   that they occur quite frequently.  The debate as to whether a well-\n   behaved SMTP receiver or relay should reject a malformed message,\n   attempt to pass it on unchanged, or attempt to repair it to increase\n   the odds of successful delivery (or subsequent reply) began almost\n   with the dawn of structured network mail and shows no signs of\n   abating.  Advocates of rejection claim that attempted repairs are\n   rarely completely adequate and that rejection of bad messages is the\n   only way to get the offending software repaired.  Advocates of\n   \"repair\" or \"deliver no matter what\" argue that users prefer that\n   mail go through it if at all possible and that there are significant\n   market pressures in that direction.  In practice, these market\n   pressures may be more important to particular vendors than strict\n   conformance to the standards, regardless of the preference of the\n   actual developers.\n   The problems associated with ill-formed messages were exacerbated by\n   the introduction of the split-UA mail reading protocols (Post Office\n   Protocol (POP) version 2 [15], Post Office Protocol (POP) version 3\n   [16], IMAP version 2 [41], and PCMAIL [42]).  These protocols\n   encouraged the use of SMTP as a posting (message submission)\n   protocol, and SMTP servers as relay systems for these client hosts\n   (which are often only intermittently connected to the Internet).\n   Historically, many of those client machines lacked some of the\n   mechanisms and information assumed by SMTP (and indeed, by the mail\n   format protocol, RFC 822 [28]).  Some could not keep adequate track\n   of time; others had no concept of time zones; still others could not\n   identify their own names or addresses; and, of course, none could\n   satisfy the assumptions that underlay RFC 822's conception of\n   authenticated addresses.\n   In response to these weak SMTP clients, many SMTP systems now\n   complete messages that are delivered to them in incomplete or\n   incorrect form.  This strategy is generally considered appropriate\n   when the server can identify or authenticate the client, and there\n   are prior agreements between them.  By contrast, there is at best\n   great concern about fixes applied by a relay or delivery SMTP server\n   that has little or no knowledge of the user or client machine.  Many\n   of these issues are addressed by using a separate protocol, such as\n   that defined in RFC 4409 [18], for message submission, rather than\n   using originating SMTP servers for that purpose.\n   The following changes to a message being processed MAY be applied\n   when necessary by an originating SMTP server, or one used as the\n   target of SMTP as an initial posting (message submission) protocol:\n   o  Addition of a message-id field when none appears\n   o  Addition of a date, time, or time zone when none appears\n   o  Correction of addresses to proper FQDN format\n   The less information the server has about the client, the less likely\n   these changes are to be correct and the more caution and conservatism\n   should be applied when considering whether or not to perform fixes\n   and how.  These changes MUST NOT be applied by an SMTP server that\n   provides an intermediate relay function.\n   In all cases, properly operating clients supplying correct\n   information are preferred to corrections by the SMTP server.  In all\n   cases, documentation SHOULD be provided in trace header fields and/or\n   header field comments for actions performed by the servers."
  },
  {
    "section_number": "7.",
    "section_name": "Security Considerations",
    "tag": "Section 7. Security Considerations",
    "content": "7.1.  Mail Security and Spoofing\n   SMTP mail is inherently insecure in that it is feasible for even\n   fairly casual users to negotiate directly with receiving and relaying\n   SMTP servers and create messages that will trick a naive recipient\n   into believing that they came from somewhere else.  Constructing such\n   a message so that the \"spoofed\" behavior cannot be detected by an\n   expert is somewhat more difficult, but not sufficiently so as to be a\n   deterrent to someone who is determined and knowledgeable.\n   Consequently, as knowledge of Internet mail increases, so does the\n   knowledge that SMTP mail inherently cannot be authenticated, or\n   integrity checks provided, at the transport level.  Real mail\n   security lies only in end-to-end methods involving the message\n   bodies, such as those that use digital signatures (see RFC 1847 [43]\n   and, e.g., Pretty Good Privacy (PGP) in RFC 4880 [44] or Secure/\n   Multipurpose Internet Mail Extensions (S/MIME) in RFC 3851 [45]).\n   Various protocol extensions and configuration options that provide\n   authentication at the transport level (e.g., from an SMTP client to\n   an SMTP server) improve somewhat on the traditional situation\n   described above.  However, in general, they only authenticate one\n   server to another rather than a chain of relays and servers, much\n   less authenticating users or user machines.  Consequently, unless\n   they are accompanied by careful handoffs of responsibility in a\n   carefully designed trust environment, they remain inherently weaker\n   than end-to-end mechanisms that use digitally signed messages rather\n   than depending on the integrity of the transport system.\n   Efforts to make it more difficult for users to set envelope return\n   path and header \"From\" fields to point to valid addresses other than\n   their own are largely misguided: they frustrate legitimate\n   applications in which mail is sent by one user on behalf of another,\n   in which error (or normal) replies should be directed to a special\n   address, or in which a single message is sent to multiple recipients\n   on different hosts.  (Systems that provide convenient ways for users\n   to alter these header fields on a per-message basis should attempt to\n   establish a primary and permanent mailbox address for the user so\n   that Sender header fields within the message data can be generated\n   sensibly.)\n   This specification does not further address the authentication issues\n   associated with SMTP other than to advocate that useful functionality\n   not be disabled in the hope of providing some small margin of\n   protection against a user who is trying to fake mail.\n7.2.  \"Blind\" Copies\n   Addresses that do not appear in the message header section may appear\n   in the RCPT commands to an SMTP server for a number of reasons.  The\n   two most common involve the use of a mailing address as a \"list\n   exploder\" (a single address that resolves into multiple addresses)\n   and the appearance of \"blind copies\".  Especially when more than one\n   RCPT command is present, and in order to avoid defeating some of the\n   purpose of these mechanisms, SMTP clients and servers SHOULD NOT copy\n   the full set of RCPT command arguments into the header section,\n   either as part of trace header fields or as informational or private-\n   extension header fields.  Since this rule is often violated in\n   practice, and cannot be enforced, sending SMTP systems that are aware\n   of \"bcc\" use MAY find it helpful to send each blind copy as a\n   separate message transaction containing only a single RCPT command.\n   There is no inherent relationship between either \"reverse\" (from\n   MAIL, SAML, etc., commands) or \"forward\" (RCPT) addresses in the SMTP\n   transaction (\"envelope\") and the addresses in the header section.\n   Receiving systems SHOULD NOT attempt to deduce such relationships and\n   use them to alter the header section of the message for delivery.\n   The popular \"Apparently-to\" header field is a violation of this\n   principle as well as a common source of unintended information\n   disclosure and SHOULD NOT be used.\n7.3.  VRFY, EXPN, and Security\n   As discussed in Section 3.5, individual sites may want to disable\n   either or both of VRFY or EXPN for security reasons (see below).  As\n   a corollary to the above, implementations that permit this MUST NOT\n   appear to have verified addresses that are not, in fact, verified.\n   If a site disables these commands for security reasons, the SMTP\n   server MUST return a 252 response, rather than a code that could be\n   confused with successful or unsuccessful verification.\n   Returning a 250 reply code with the address listed in the VRFY\n   command after having checked it only for syntax violates this rule.\n   Of course, an implementation that \"supports\" VRFY by always returning\n   550 whether or not the address is valid is equally not in\n   conformance.\n   On the public Internet, the contents of mailing lists have become\n   popular as an address information source for so-called \"spammers.\"\n   The use of EXPN to \"harvest\" addresses has increased as list\n   administrators have installed protections against inappropriate uses\n   of the lists themselves.  However, VRFY and EXPN are still useful for\n   authenticated users and within an administrative domain.  For\n   example, VRFY and EXPN are useful for performing internal audits of\n   how email gets routed to check and to make sure no one is\n   automatically forwarding sensitive mail outside the organization.\n   Sites implementing SMTP authentication may choose to make VRFY and\n   EXPN available only to authenticated requestors.  Implementations\n   SHOULD still provide support for EXPN, but sites SHOULD carefully\n   evaluate the tradeoffs.\n   Whether disabling VRFY provides any real marginal security depends on\n   a series of other conditions.  In many cases, RCPT commands can be\n   used to obtain the same information about address validity.  On the\n   other hand, especially in situations where determination of address\n   validity for RCPT commands is deferred until after the DATA command\n   is received, RCPT may return no information at all, while VRFY is\n   expected to make a serious attempt to determine validity before\n   generating a response code (see discussion above).\n7.4.  Mail Rerouting Based on the 251 and 551 Response Codes\n   Before a client uses the 251 or 551 reply codes from a RCPT command\n   to automatically update its future behavior (e.g., updating the\n   user's address book), it should be certain of the server's\n   authenticity.  If it does not, it may be subject to a man in the\n   middle attack.\n7.5.  Information Disclosure in Announcements\n   There has been an ongoing debate about the tradeoffs between the\n   debugging advantages of announcing server type and version (and,\n   sometimes, even server domain name) in the greeting response or in\n   response to the HELP command and the disadvantages of exposing\n   information that might be useful in a potential hostile attack.  The\n   utility of the debugging information is beyond doubt.  Those who\n   argue for making it available point out that it is far better to\n   actually secure an SMTP server rather than hope that trying to\n   conceal known vulnerabilities by hiding the server's precise identity\n   will provide more protection.  Sites are encouraged to evaluate the\n   tradeoff with that issue in mind; implementations SHOULD minimally\n   provide for making type and version information available in some way\n   to other network hosts.\n7.6.  Information Disclosure in Trace Fields\n   In some circumstances, such as when mail originates from within a LAN\n   whose hosts are not directly on the public Internet, trace\n   (\"Received\") header fields produced in conformance with this\n   specification may disclose host names and similar information that\n   would not normally be available.  This ordinarily does not pose a\n   problem, but sites with special concerns about name disclosure should\n   be aware of it.  Also, the optional FOR clause should be supplied\n   with caution or not at all when multiple recipients are involved lest\n   it inadvertently disclose the identities of \"blind copy\" recipients\n   to others.\n7.7.  Information Disclosure in Message Forwarding\n   As discussed in Section 3.4, use of the 251 or 551 reply codes to\n   identify the replacement address associated with a mailbox may\n   inadvertently disclose sensitive information.  Sites that are\n   concerned about those issues should ensure that they select and\n   configure servers appropriately.\n7.8.  Resistance to Attacks\n   In recent years, there has been an increase of attacks on SMTP\n   servers, either in conjunction with attempts to discover addresses\n   for sending unsolicited messages or simply to make the servers\n   inaccessible to others (i.e., as an application-level denial of\n   service attack).  While the means of doing so are beyond the scope of\n   this Standard, rational operational behavior requires that servers be\n   permitted to detect such attacks and take action to defend\n   themselves.  For example, if a server determines that a large number\n   of RCPT TO commands are being sent, most or all with invalid\n   addresses, as part of such an attack, it would be reasonable for the\n   server to close the connection after generating an appropriate number\n   of 5yz (normally 550) replies.\n7.9.  Scope of Operation of SMTP Servers\n   It is a well-established principle that an SMTP server may refuse to\n   accept mail for any operational or technical reason that makes sense\n   to the site providing the server.  However, cooperation among sites\n   and installations makes the Internet possible.  If sites take\n   excessive advantage of the right to reject traffic, the ubiquity of\n   email availability (one of the strengths of the Internet) will be\n   threatened; considerable care should be taken and balance maintained\n   if a site decides to be selective about the traffic it will accept\n   and process.\n   In recent years, use of the relay function through arbitrary sites\n   has been used as part of hostile efforts to hide the actual origins\n   of mail.  Some sites have decided to limit the use of the relay\n   function to known or identifiable sources, and implementations SHOULD\n   provide the capability to perform this type of filtering.  When mail\n   is rejected for these or other policy reasons, a 550 code SHOULD be\n   used in response to EHLO (or HELO), MAIL, or RCPT as appropriate."
  },
  {
    "section_number": "8.",
    "section_name": "IANA Considerations",
    "tag": "Section 8. IANA Considerations",
    "content": "IANA maintains three registries in support of this specification, all\n   of which were created for RFC 2821 or earlier.  This document expands\n   the third one as specified below.  The registry references listed are\n   as of the time of publication; IANA does not guarantee the locations\n   associated with the URLs.  The registries are as follows:\n   o  The first, \"Simple Mail Transfer Protocol (SMTP) Service\n      Extensions\" [46], consists of SMTP service extensions with the\n      associated keywords, and, as needed, parameters and verbs.  As\n      specified in Section 2.2.2, no entry may be made in this registry\n      that starts in an \"X\".  Entries may be made only for service\n      extensions (and associated keywords, parameters, or verbs) that\n      are defined in Standards-Track or Experimental RFCs specifically\n      approved by the IESG for this purpose.\n   o  The second registry, \"Address Literal Tags\" [47], consists of\n      \"tags\" that identify forms of domain literals other than those for\n      IPv4 addresses (specified in RFC 821 and in this document).  The\n      initial entry in that registry is for IPv6 addresses (specified in\n      this document).  Additional literal types require standardization\n      before being used; none are anticipated at this time.\n   o  The third, \"Mail Transmission Types\" [46], established by RFC 821\n      and renewed by this specification, is a registry of link and\n      protocol identifiers to be used with the \"via\" and \"with\"\n      subclauses of the time stamp (\"Received:\" header field) described\n      in Section 4.4.  Link and protocol identifiers in addition to\n      those specified in this document may be registered only by\n      standardization or by way of an RFC-documented, IESG-approved,\n      Experimental protocol extension.  This name space is for\n      identification and not limited in size: the IESG is encouraged to\n      approve on the basis of clear documentation and a distinct method\n      rather than preferences about the properties of the method itself.\n      An additional subsection has been added to the \"VIA link types\"\n      and \"WITH protocol types\" subsections of this registry to contain\n      registrations of \"Additional-registered-clauses\" as described\n      above.  The registry will contain clause names, a description, a\n      summary of the syntax of the associated String, and a reference.\n      As new clauses are defined, they may, in principle, specify\n      creation of their own registries if the Strings consist of\n      reserved terms or keywords rather than less restricted strings.\n      As with link and protocol identifiers, additional clauses may be\n      registered only by standardization or by way of an RFC-documented,\n      IESG-approved, Experimental protocol extension.  The additional\n      clause name space is for identification and is not limited in\n      size: the IESG is encouraged to approve on the basis of clear\n      documentation, actual use or strong signs that the clause will be\n      used, and a distinct requirement rather than preferences about the\n      properties of the clause itself.\n   In addition, if additional trace header fields (i.e., in addition to\n   Return-path and Received) are ever created, those trace fields MUST\n   be added to the IANA registry established by BCP 90 (RFC 3864) [11]\n   for use with RFC 5322 [4]."
  },
  {
    "section_number": "9.",
    "section_name": "Acknowledgments",
    "tag": "Section 9. Acknowledgments",
    "content": "Many people contributed to the development of RFC 2821.  That\n   document should be consulted for those acknowledgments.  For the\n   present document, the editor and the community owe thanks to Dawn\n   Mann and Tony Hansen who assisted in the very painful process of\n   editing and converting the internal format of the document from one\n   system to another.\n   Neither this document nor RFC 2821 would have been possible without\n   the many contribution and insights of the late Jon Postel.  Those\n   contributions of course include the original specification of SMTP in\n   RFC 821.  A considerable quantity of text from RFC 821 still appears\n   in this document as do several of Jon's original examples that have\n   been updated only as needed to reflect other changes in the\n   specification.\n   Many people made comments or suggestions on the mailing list or in\n   notes to the author.  Important corrections or clarifications were\n   suggested by several people, including Matti Aarnio, Glenn Anderson,\n   Derek J. Balling, Alex van den Bogaerdt, Stephane Bortzmeyer, Vint\n   Cerf, Jutta Degener, Steve Dorner, Lisa Dusseault, Frank Ellerman,\n   Ned Freed, Randy Gellens, Sabahattin Gucukoglu, Philip Guenther, Arnt\n   Gulbrandsen, Eric Hall, Richard O. Hammer, Tony Hansen, Peter J.\n   Holzer, Kari Hurtta, Bryon Roche Kain, Valdis Kletnieks, Mathias\n   Koerber, John Leslie, Bruce Lilly, Jeff Macdonald, Mark E. Mallett,\n   Mark Martinec, S. Moonesamy, Lyndon Nerenberg, Chris Newman, Douglas\n   Otis, Pete Resnick, Robert A. Rosenberg, Vince Sabio, Hector Santos,\n   David F. Skoll, Paul Smith, and Brett Watson.\n   The efforts of the Area Directors -- Lisa Dusseault, Ted Hardie, and\n   Chris Newman -- to get this effort restarted and keep it moving, and\n   of an ad hoc committee with the same purpose, are gratefully\n   acknowledged.  The members of that committee were (in alphabetical\n   order) Dave Crocker, Cyrus Daboo, Tony Finch, Ned Freed, Randall\n   Gellens, Tony Hansen, the author, and Alexey Melnikov.  Tony Hansen\n   also acted as ad hoc chair on the mailing list reviewing this\n   document; without his efforts, sense of balance and fairness, and\n   patience, it clearly would not have been possible."
  },
  {
    "section_number": "10.",
    "section_name": "References",
    "tag": "Section 10. References",
    "content": "10.1.  Normative References\n   [1]   Postel, J., \"Simple Mail Transfer Protocol\", STD 10, RFC 821,\n         August 1982.\n   [2]   Mockapetris, P., \"Domain names - implementation and\n   [3]   Braden, R., \"Requirements for Internet Hosts - Application and\n   [5]   Bradner, S., \"Key words for use in RFCs to Indicate Requirement\n   [6]   American National Standards Institute (formerly United States\n         of America Standards Institute), \"USA Code for Information\n         Interchange\", ANSI X3.4-1968, 1968.\n         ANSI X3.4-1968 has been replaced by newer versions with slight\n         modifications, but the 1968 version remains definitive for the\n         Internet.\n   [7]   Crocker, D. and P. Overell, \"Augmented BNF for Syntax\n   [8]   Hinden, R. and S. Deering, \"IP Version 6 Addressing\n   [9]   Newman, C., \"ESMTP and LMTP Transmission Types Registration\",\n   [10]  Klensin, J., Freed, N., and K. Moore, \"SMTP Service Extension\n   [11]  Klyne, G., Nottingham, M., and J. Mogul, \"Registration\n         Procedures for Message Header Fields\", BCP 90, RFC 3864,\n         September 2004.\n10.2.  Informative References\n   [12]  Partridge, C., \"Mail routing and the domain system\", RFC 974,\n         January 1986.\n   [13]  Klensin, J., Freed, N., Rose, M., Stefferud, E., and D.\n         Crocker, \"SMTP Service Extensions\", STD 10, RFC 1869,\n         November 1995.\n   [14]  Klensin, J., \"Simple Mail Transfer Protocol\", RFC 2821,\n         April 2001.\n   [15]  Butler, M., Postel, J., Chase, D., Goldberger, J., and J.\n         Reynolds, \"Post Office Protocol: Version 2\", RFC 937,\n         February 1985.\n   [16]  Myers, J. and M. Rose, \"Post Office Protocol - Version 3\",\n   [17]  Crispin, M., \"INTERNET MESSAGE ACCESS PROTOCOL - VERSION\n   [18]  Gellens, R. and J. Klensin, \"Message Submission for Mail\",\n   [19]  Freed, N., \"SMTP Service Extension for Command Pipelining\",\n   [20]  Vaudreuil, G., \"SMTP Service Extensions for Transmission of\n   [21]  Freed, N. and N. Borenstein, \"Multipurpose Internet Mail\n         Extensions (MIME) Part One: Format of Internet Message Bodies\",\n   [22]  Klensin, J., Freed, N., Rose, M., Stefferud, E., and D.\n         Crocker, \"SMTP Service Extension for 8bit-MIMEtransport\",\n   [23]  Moore, K., \"MIME (Multipurpose Internet Mail Extensions) Part\n         Three: Message Header Extensions for Non-ASCII Text\", RFC 2047,\n         November 1996.\n   [24]  Freed, N. and K. Moore, \"MIME Parameter Value and Encoded Word\n         Extensions: Character Sets, Languages, and Continuations\",\n   [25]  Vaudreuil, G., \"Enhanced Mail System Status Codes\", RFC 3463,\n         January 2003.\n   [26]  Hansen, T. and J. Klensin, \"A Registry for SMTP Enhanced Mail\n   [27]  Freed, N., \"Behavior of and Requirements for Internet\n   [28]  Crocker, D., \"Standard for the format of ARPA Internet text\n   [29]  Wong, M. and W. Schlitt, \"Sender Policy Framework (SPF) for\n         Authorizing Use of Domains in E-Mail, Version 1\", RFC 4408,\n         April 2006.\n   [30]  Fenton, J., \"Analysis of Threats Motivating DomainKeys\n   [31]  Allman, E., Callas, J., Delany, M., Libbey, M., Fenton, J., and\n         M. Thomas, \"DomainKeys Identified Mail (DKIM) Signatures\",\n   [32]  Moore, K., \"Simple Mail Transfer Protocol (SMTP) Service\n         Extension for Delivery Status Notifications (DSNs)\", RFC 3461,\n         January 2003.\n   [33]  Moore, K. and G. Vaudreuil, \"An Extensible Message Format for\n   [34]  Postel, J. and J. Reynolds, \"File Transfer Protocol\", STD 9,\n   [35]  Kille, S., \"MIXER (Mime Internet X.400 Enhanced Relay): Mapping\n   [36]  De Winter, J., \"SMTP Service Extension for Remote Message Queue\n   [37]  Hansen, T. and G. Vaudreuil, \"Message Disposition\n   [38]  Elz, R. and R. Bush, \"Clarifications to the DNS Specification\",\n   [39]  Nakamura, M. and J. Hagino, \"SMTP Operational Experience in\n   [40]  Partridge, C., \"Duplicate messages and SMTP\", RFC 1047,\n         February 1988.\n   [41]  Crispin, M., \"Interactive Mail Access Protocol: Version 2\",\n   [42]  Lambert, M., \"PCMAIL: A distributed mail system for personal\n   [43]  Galvin, J., Murphy, S., Crocker, S., and N. Freed, \"Security\n         Multiparts for MIME: Multipart/Signed and Multipart/Encrypted\",\n   [44]  Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R.\n   [45]  Ramsdell, B., \"Secure/Multipurpose Internet Mail Extensions\n         (S/MIME) Version 3.1 Message Specification\", RFC 3851,\n         July 2004.\n   [46]  Internet Assigned Number Authority (IANA), \"IANA Mail\n         Parameters\", 2007,\n         <http://www.iana.org/assignments/mail-parameters>.\n   [47]  Internet Assigned Number Authority (IANA), \"Address Literal\n         Tags\", 2007,\n         <http://www.iana.org/assignments/address-literal-tags>."
  },
  {
    "section_number": "Appendix A.",
    "section_name": "TCP Transport Service",
    "tag": "Section Appendix A. TCP Transport Service",
    "content": "The TCP connection supports the transmission of 8-bit bytes.  The\n   SMTP data is 7-bit ASCII characters.  Each character is transmitted\n   as an 8-bit byte with the high-order bit cleared to zero.  Service\n   extensions may modify this rule to permit transmission of full 8-bit\n   data bytes as part of the message body, or, if specifically designed\n   to do so, in SMTP commands or responses.\nAppendix B.  Generating SMTP Commands from RFC 822 Header Fields\n   Some systems use an RFC 822 header section (only) in a mail\n   submission protocol, or otherwise generate SMTP commands from RFC 822\n   header fields when such a message is handed to an MTA from a UA.\n   While the MTA-UA protocol is a private matter, not covered by any\n   Internet Standard, there are problems with this approach.  For\n   example, there have been repeated problems with proper handling of\n   \"bcc\" copies and redistribution lists when information that\n   conceptually belongs to the mail envelope is not separated early in\n   processing from header field information (and kept separate).\n   It is recommended that the UA provide its initial (\"submission\n   client\") MTA with an envelope separate from the message itself.\n   However, if the envelope is not supplied, SMTP commands SHOULD be\n   generated as follows:\n   1.  Each recipient address from a TO, CC, or BCC header field SHOULD\n       be copied to a RCPT command (generating multiple message copies\n       if that is required for queuing or delivery).  This includes any\n       addresses listed in a RFC 822 \"group\".  Any BCC header fields\n       SHOULD then be removed from the header section.  Once this\n       process is completed, the remaining header fields SHOULD be\n       checked to verify that at least one TO, CC, or BCC header field\n       remains.  If none do, then a BCC header field with no additional\n       information SHOULD be inserted as specified in [4].\n   2.  The return address in the MAIL command SHOULD, if possible, be\n       derived from the system's identity for the submitting (local)\n       user, and the \"From:\" header field otherwise.  If there is a\n       system identity available, it SHOULD also be copied to the Sender\n       header field if it is different from the address in the From\n       header field.  (Any Sender header field that was already there\n       SHOULD be removed.)  Systems may provide a way for submitters to\n       override the envelope return address, but may want to restrict\n       its use to privileged users.  This will not prevent mail forgery,\n       but may lessen its incidence; see Section 7.1.\n   When an MTA is being used in this way, it bears responsibility for\n   ensuring that the message being transmitted is valid.  The mechanisms\n   for checking that validity, and for handling (or returning) messages\n   that are not valid at the time of arrival, are part of the MUA-MTA\n   interface and not covered by this specification.\n   A submission protocol based on Standard RFC 822 information alone\n   MUST NOT be used to gateway a message from a foreign (non-SMTP) mail\n   system into an SMTP environment.  Additional information to construct\n   an envelope must come from some source in the other environment,\n   whether supplemental header fields or the foreign system's envelope.\n   Attempts to gateway messages using only their header \"To\" and \"Cc\"\n   fields have repeatedly caused mail loops and other behavior adverse\n   to the proper functioning of the Internet mail environment.  These\n   problems have been especially common when the message originates from\n   an Internet mailing list and is distributed into the foreign\n   environment using envelope information.  When these messages are then\n   processed by a header-section-only remailer, loops back to the\n   Internet environment (and the mailing list) are almost inevitable."
  },
  {
    "section_number": "Appendix C.",
    "section_name": "Source Routes",
    "tag": "Section Appendix C. Source Routes",
    "content": "Historically, the <reverse-path> was a reverse source routing list of\n   hosts and a source mailbox.  The first host in the <reverse-path> was\n   historically the host sending the MAIL command; today, source routes\n   SHOULD NOT appear in the reverse-path.  Similarly, the <forward-path>\n   may be a source routing lists of hosts and a destination mailbox.\n   However, in general, the <forward-path> SHOULD contain only a mailbox\n   and domain name, relying on the domain name system to supply routing\n   information if required.  The use of source routes is deprecated (see\n   Appendix F.2); while servers MUST be prepared to receive and handle\n   them as discussed in Section 3.3 and Appendix F.2, clients SHOULD NOT\n   transmit them and this section is included in the current\n   specification only to provide context.  It has been modified somewhat\n   from the material in RFC 821 to prevent server actions that might\n   confuse clients or subsequent servers that do not expect a full\n   source route implementation.\n   For relay purposes, the forward-path may be a source route of the\n   form \"@ONE,@TWO:JOE@THREE\", where ONE, TWO, and THREE MUST be fully-\n   qualified domain names.  This form is used to emphasize the\n   distinction between an address and a route.  The mailbox (here, JOE@\n   THREE) is an absolute address, and the route is information about how\n   to get there.  The two concepts should not be confused.\n   If source routes are used, RFC 821 and the text below should be\n   consulted for the mechanisms for constructing and updating the\n   forward-path.  A server that is reached by means of a source route\n   (e.g., its domain name appears first in the list in the forward-path)\n   MUST remove its domain name from any forward-paths in which that\n   domain name appears before forwarding the message and MAY remove all\n   other source routing information.  The reverse-path SHOULD NOT be\n   updated by servers conforming to this specification.\n   Notice that the forward-path and reverse-path appear in the SMTP\n   commands and replies, but not necessarily in the message.  That is,\n   there is no need for these paths and especially this syntax to appear\n   in the \"To:\" , \"From:\", \"CC:\", etc. fields of the message header\n   section.  Conversely, SMTP servers MUST NOT derive final message\n   routing information from message header fields.\n   When the list of hosts is present despite the recommendations above,\n   it is a \"reverse\" source route and indicates that the mail was\n   relayed through each host on the list (the first host in the list was\n   the most recent relay).  This list is used as a source route to\n   return non-delivery notices to the sender.  If, contrary to the\n   recommendations here, a relay host adds itself to the beginning of\n   the list, it MUST use its name as known in the transport environment\n   to which it is relaying the mail rather than that of the transport\n   environment from which the mail came (if they are different).  Note\n   that a situation could easily arise in which some relay hosts add\n   their names to the reverse source route and others do not, generating\n   discontinuities in the routing list.  This is another reason why\n   servers needing to return a message SHOULD ignore the source route\n   entirely and simply use the domain as specified in the Mailbox."
  },
  {
    "section_number": "Appendix D.",
    "section_name": "Scenarios",
    "tag": "Section Appendix D. Scenarios",
    "content": "This section presents complete scenarios of several types of SMTP\n   sessions.  In the examples, \"C:\" indicates what is said by the SMTP\n   client, and \"S:\" indicates what is said by the SMTP server.\nD.1.  A Typical SMTP Transaction Scenario\n   This SMTP example shows mail sent by Smith at host bar.com, and to\n   Jones, Green, and Brown at host foo.com.  Here we assume that host\n   bar.com contacts host foo.com directly.  The mail is accepted for\n   Jones and Brown.  Green does not have a mailbox at host foo.com.\n      S: 220 foo.com Simple Mail Transfer Service Ready\n      C: EHLO bar.com\n      S: 250-foo.com greets bar.com\n      S: 250-8BITMIME\n      S: 250-SIZE\n      S: 250-DSN\n      S: 250 HELP\n      C: MAIL FROM:<Smith@bar.com>\n      S: 250 OK\n      C: RCPT TO:<Jones@foo.com>\n      S: 250 OK\n      C: RCPT TO:<Green@foo.com>\n      S: 550 No such user here\n      C: RCPT TO:<Brown@foo.com>\n      S: 250 OK\n      C: DATA\n      S: 354 Start mail input; end with <CRLF>.<CRLF>\n      C: Blah blah blah...\n      C: ...etc. etc. etc.\n      C: .\n      S: 250 OK\n      C: QUIT\n      S: 221 foo.com Service closing transmission channel\nD.2.  Aborted SMTP Transaction Scenario\n      S: 220 foo.com Simple Mail Transfer Service Ready\n      C: EHLO bar.com\n      S: 250-foo.com greets bar.com\n      S: 250-8BITMIME\n      S: 250-SIZE\n      S: 250-DSN\n      S: 250 HELP\n      C: MAIL FROM:<Smith@bar.com>\n      S: 250 OK\n      C: RCPT TO:<Jones@foo.com>\n      S: 250 OK\n      C: RCPT TO:<Green@foo.com>\n      S: 550 No such user here\n      C: RSET\n      S: 250 OK\n      C: QUIT\n      S: 221 foo.com Service closing transmission channel\nD.3.  Relayed Mail Scenario\n   Step 1 -- Source Host to Relay Host\n   The source host performs a DNS lookup on XYZ.COM (the destination\n   address) and finds DNS MX records specifying xyz.com as the best\n   preference and foo.com as a lower preference.  It attempts to open a\n   connection to xyz.com and fails.  It then opens a connection to\n   foo.com, with the following dialogue:\n      S: 220 foo.com Simple Mail Transfer Service Ready\n      C: EHLO bar.com\n      S: 250-foo.com greets bar.com\n      S: 250-8BITMIME\n      S: 250-SIZE\n      S: 250-DSN\n      S: 250 HELP\n      C: MAIL FROM:<JQP@bar.com>\n      S: 250 OK\n      C: RCPT TO:<Jones@XYZ.COM>\n      S: 250 OK\n      C: DATA\n      S: 354 Start mail input; end with <CRLF>.<CRLF>\n      C: Date: Thu, 21 May 1998 05:33:29 -0700\n      C: From: John Q. Public <JQP@bar.com>\n      C: Subject: The Next Meeting of the Board\n      C: To: Jones@xyz.com\n      C:\n      C: Bill:\n      C: The next meeting of the board of directors will be\n      C: on Tuesday.\n      C: John.\n      C: .\n      S: 250 OK\n      C: QUIT\n      S: 221 foo.com Service closing transmission channel\n   Step 2 -- Relay Host to Destination Host\n   foo.com, having received the message, now does a DNS lookup on\n   xyz.com.  It finds the same set of MX records, but cannot use the one\n   that points to itself (or to any other host as a worse preference).\n   It tries to open a connection to xyz.com itself and succeeds.  Then\n   we have:\n           S: 220 xyz.com Simple Mail Transfer Service Ready\n           C: EHLO foo.com\n           S: 250 xyz.com is on the air\n           C: MAIL FROM:<JQP@bar.com>\n           S: 250 OK\n           C: RCPT TO:<Jones@XYZ.COM>\n           S: 250 OK\n           C: DATA\n           S: 354 Start mail input; end with <CRLF>.<CRLF>\n           C: Received: from bar.com by foo.com ; Thu, 21 May 1998\n           C:     05:33:29 -0700\n           C: Date: Thu, 21 May 1998 05:33:22 -0700\n           C: From: John Q. Public <JQP@bar.com>\n           C: Subject:  The Next Meeting of the Board\n           C: To: Jones@xyz.com\n           C:\n           C: Bill:\n           C: The next meeting of the board of directors will be\n           C: on Tuesday.\n           C:                         John.\n           C: .\n           S: 250 OK\n           C: QUIT\n           S: 221 foo.com Service closing transmission channel\nD.4.  Verifying and Sending Scenario\n      S: 220 foo.com Simple Mail Transfer Service Ready\n      C: EHLO bar.com\n      S: 250-foo.com greets bar.com\n      S: 250-8BITMIME\n      S: 250-SIZE\n      S: 250-DSN\n      S: 250-VRFY\n      S: 250 HELP\n      C: VRFY Crispin\n      S: 250 Mark Crispin <Admin.MRC@foo.com>\n      C: MAIL FROM:<EAK@bar.com>\n      S: 250 OK\n      C: RCPT TO:<Admin.MRC@foo.com>\n      S: 250 OK\n      C: DATA\n      S: 354 Start mail input; end with <CRLF>.<CRLF>\n      C: Blah blah blah...\n      C: ...etc. etc. etc.\n      C: .\n      S: 250 OK\n      C: QUIT\n      S: 221 foo.com Service closing transmission channel"
  },
  {
    "section_number": "Appendix E.",
    "section_name": "Other Gateway Issues",
    "tag": "Section Appendix E. Other Gateway Issues",
    "content": "In general, gateways between the Internet and other mail systems\n   SHOULD attempt to preserve any layering semantics across the\n   boundaries between the two mail systems involved.  Gateway-\n   translation approaches that attempt to take shortcuts by mapping\n   (such as mapping envelope information from one system to the message\n   header section or body of another) have generally proven to be\n   inadequate in important ways.  Systems translating between\n   environments that do not support both envelopes and a header section\n   and Internet mail must be written with the understanding that some\n   information loss is almost inevitable."
  },
  {
    "section_number": "Appendix F.",
    "section_name": "Deprecated Features of RFC 821",
    "tag": "Section Appendix F. Deprecated Features of RFC 821",
    "content": "A few features of RFC 821 have proven to be problematic and SHOULD\n   NOT be used in Internet mail.\nF.1.  TURN\n   This command, described in RFC 821, raises important security issues\n   since, in the absence of strong authentication of the host requesting\n   that the client and server switch roles, it can easily be used to\n   divert mail from its correct destination.  Its use is deprecated;\n   SMTP systems SHOULD NOT use it unless the server can authenticate the\n   client.\nF.2.  Source Routing\n   RFC 821 utilized the concept of explicit source routing to get mail\n   from one host to another via a series of relays.  The requirement to\n   utilize source routes in regular mail traffic was eliminated by the\n   introduction of the domain name system \"MX\" record and the last\n   significant justification for them was eliminated by the\n   introduction, in RFC 1123, of a clear requirement that addresses\n   following an \"@\" must all be fully-qualified domain names.\n   Consequently, the only remaining justifications for the use of source\n   routes are support for very old SMTP clients or MUAs and in mail\n   system debugging.  They can, however, still be useful in the latter\n   circumstance and for routing mail around serious, but temporary,\n   problems such as problems with the relevant DNS records.\n   SMTP servers MUST continue to accept source route syntax as specified\n   in the main body of this document and in RFC 1123.  They MAY, if\n   necessary, ignore the routes and utilize only the target domain in\n   the address.  If they do utilize the source route, the message MUST\n   be sent to the first domain shown in the address.  In particular, a\n   server MUST NOT guess at shortcuts within the source route.\n   Clients SHOULD NOT utilize explicit source routing except under\n   unusual circumstances, such as debugging or potentially relaying\n   around firewall or mail system configuration errors.\nF.3.  HELO\n   As discussed in Sections 3.1 and 4.1.1, EHLO SHOULD be used rather\n   than HELO when the server will accept the former.  Servers MUST\n   continue to accept and process HELO in order to support older\n   clients.\nF.4.  #-literals\n   RFC 821 provided for specifying an Internet address as a decimal\n   integer host number prefixed by a pound sign, \"#\".  In practice, that\n   form has been obsolete since the introduction of TCP/IP.  It is\n   deprecated and MUST NOT be used.\nF.5.  Dates and Years\n   When dates are inserted into messages by SMTP clients or servers\n   (e.g., in trace header fields), four-digit years MUST BE used.  Two-\n   digit years are deprecated; three-digit years were never permitted in\n   the Internet mail system.\nF.6.  Sending versus Mailing\n   In addition to specifying a mechanism for delivering messages to\n   user's mailboxes, RFC 821 provided additional, optional, commands to\n   deliver messages directly to the user's terminal screen.  These\n   commands (SEND, SAML, SOML) were rarely implemented, and changes in\n   workstation technology and the introduction of other protocols may\n   have rendered them obsolete even where they are implemented.\n   Clients SHOULD NOT provide SEND, SAML, or SOML as services.  Servers\n   MAY implement them.  If they are implemented by servers, the\n   implementation model specified in RFC 821 MUST be used and the\n   command names MUST be published in the response to the EHLO command.\nAuthor's Address\n   John C. Klensin\n   1770 Massachusetts Ave, Suite 322\n   Cambridge, MA  02140\n   USA\n   EMail: john+smtp@jck.com\nFull Copyright Statement\n   Copyright (C) The IETF Trust (2008).\n   This document is subject to the rights, licenses and restrictions\n   contained in BCP 78, and except as set forth therein, the authors\n   retain all their rights.\n   This document and the information contained herein are provided on an\n   \"AS IS\" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS\n   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND\n   THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS\n   OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF\n   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED\n   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\nIntellectual Property\n   The IETF takes no position regarding the validity or scope of any\n   Intellectual Property Rights or other rights that might be claimed to\n   pertain to the implementation or use of the technology described in\n   this document or the extent to which any license under such rights\n   might or might not be available; nor does it represent that it has\n   made any independent effort to identify any such rights.  Information\n   on the procedures with respect to rights in RFC documents can be\n   found in BCP 78 and BCP 79.\n   Copies of IPR disclosures made to the IETF Secretariat and any\n   assurances of licenses to be made available, or the result of an\n   attempt made to obtain a general license or permission for the use of\n   such proprietary rights by implementers or users of this\n   specification can be obtained from the IETF on-line IPR repository at\n   http://www.ietf.org/ipr.\n   The IETF invites any interested party to bring to its attention any\n   copyrights, patents or patent applications, or other proprietary\n   rights that may cover technology that may be required to implement\n   this standard.  Please address the information to the IETF at\n   ietf-ipr@ietf.org."
  }
]