RFC 821 (rfc821) - Page 2 of 68


Simple Mail Transfer Protocol



Alternative Format: Original Text Document




                                                                        
August 1982                                                      RFC 821
Simple Mail Transfer Protocol                                           



2.  THE SMTP MODEL

   The SMTP design is based on the following model of communication:  as
   the result of a user mail request, the sender-SMTP establishes a
   two-way transmission channel to a receiver-SMTP.  The receiver-SMTP
   may be either the ultimate destination or an intermediate.  SMTP
   commands are generated by the sender-SMTP and sent to the
   receiver-SMTP.  SMTP replies are sent from the receiver-SMTP to the
   sender-SMTP in response to the commands.

   Once the transmission channel is established, the SMTP-sender sends a
   MAIL command indicating the sender of the mail.  If the SMTP-receiver
   can accept mail it responds with an OK reply.  The SMTP-sender then
   sends a RCPT command identifying a recipient of the mail.  If the
   SMTP-receiver can accept mail for that recipient it responds with an
   OK reply; if not, it responds with a reply rejecting that recipient
   (but not the whole mail transaction).  The SMTP-sender and
   SMTP-receiver may negotiate several recipients.  When the recipients
   have been negotiated the SMTP-sender sends the mail data, terminating
   with a special sequence.  If the SMTP-receiver successfully processes
   the mail data it responds with an OK reply.  The dialog is purposely
   lock-step, one-at-a-time.

     -------------------------------------------------------------

   
               +----------+                +----------+
   +------+    |          |                |          |
   | User ||          |      SMTP      |          |
   +------+    |  Sender- |Commands/Replies| Receiver-|
   +------+    |   SMTP   ||    SMTP  |    +------+
   | File ||          |    and Mail    |          || File |
   |System|    |          |                |          |    |System|
   +------+    +----------+                +----------+    +------+
   

                Sender-SMTP                Receiver-SMTP

                           Model for SMTP Use

                                Figure 1

     -------------------------------------------------------------

   The SMTP provides mechanisms for the transmission of mail; directly
   from the sending user's host to the receiving user's host when the