Docsity

SMTP Communication Model: A Detailed Analysis of SMTP Commands and Replies, Study notes of Computer Science

Toggle sidebar
bg1
S M T P M O D E L
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.
COMMANDS - STEPS
HELO: This command is used to identify the sender-SMTP to the receiver-SMTP.
The argument field contains the host name of the sender-SMTP. The receiver-SMTP
identifies itself to the sender-SMTP in the connection greeting reply, and in the
response to this command. This command and an OK reply to it confirm that both
the sender-SMTP and the receiver-SMTP are in the initial state, that is, there is no
transaction in progress and all state tables and buffers are cleared.
MAIL: This command is used to initiate a mail transaction in which the mail data is
delivered to one or more mailboxes. The argument field contains a reverse-path.
RECIPIENT (RCPT): This command is used to identify an individual recipient of the
mail data.
DATA: The receiver treats the lines following the command as mail data from the
sender. This command causes the mail data from this command to be appended to
the mail data buffer. The mail data is terminated by a line containing only a period
that is the character sequence "<CRLF>.<CRLF>". This is the end of mail data
indication. The end of mail data indication requires that the receiver must now
process the stored mail transaction information. If the processing is successful the
receiver must send an OK reply. If the processing fails completely the receiver must
send a failure reply.
SEND: This command is used to initiate a mail transaction in which the mail data is
delivered to one or more terminals. The argument field contains a reverse-path. This
command is successful if the message is delivered to a terminal.
QUIT: This command specifies that the receiver must send an OK reply, and then
close the transmission channel. The receiver should not close the transmission
channel until it receives and replies to a QUIT command (even if there was an error).
The sender should not close the transmission channel until it send a QUIT command
and receives the reply (even if there was an error response to a previous command).
Replies to SMTP commands are devised to ensure the synchronization of requests and
actions in the process of mail transfer, and to guarantee that the sender-SMTP always knows
the state of the receiver-SMTP. Every command must generate exactly one reply.
For more details concerning SMTP, please refer to RFC 821 and RFC 2821.

Partial preview of the text

Download SMTP Communication Model: A Detailed Analysis of SMTP Commands and Replies and more Study notes Computer Science in PDF only on Docsity!

S M T P M O D E L

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. COMMANDS - STEPSHELO: This command is used to identify the sender-SMTP to the receiver-SMTP. The argument field contains the host name of the sender-SMTP. The receiver-SMTP identifies itself to the sender-SMTP in the connection greeting reply, and in the response to this command. This command and an OK reply to it confirm that both the sender-SMTP and the receiver-SMTP are in the initial state, that is, there is no transaction in progress and all state tables and buffers are cleared.  MAIL: This command is used to initiate a mail transaction in which the mail data is delivered to one or more mailboxes. The argument field contains a reverse-path.  RECIPIENT (RCPT): This command is used to identify an individual recipient of the mail data.  DATA: The receiver treats the lines following the command as mail data from the sender. This command causes the mail data from this command to be appended to the mail data buffer. The mail data is terminated by a line containing only a period that is the character sequence ".". This is the end of mail data indication. The end of mail data indication requires that the receiver must now process the stored mail transaction information. If the processing is successful the receiver must send an OK reply. If the processing fails completely the receiver must send a failure reply.  SEND: This command is used to initiate a mail transaction in which the mail data is delivered to one or more terminals. The argument field contains a reverse-path. This command is successful if the message is delivered to a terminal.  QUIT: This command specifies that the receiver must send an OK reply, and then close the transmission channel. The receiver should not close the transmission channel until it receives and replies to a QUIT command (even if there was an error). The sender should not close the transmission channel until it send a QUIT command and receives the reply (even if there was an error response to a previous command). Replies to SMTP commands are devised to ensure the synchronization of requests and actions in the process of mail transfer, and to guarantee that the sender-SMTP always knows the state of the receiver-SMTP. Every command must generate exactly one reply. For more details concerning SMTP, please refer to RFC 821 and RFC 2821.