Transcript
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 1/14
Simple Mail Transfer Protocol
SMTP
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 2/14
What is SMTP?y It is the standard protocol for transferring e-mail between
hosts in the TCP/IP suite
y It is defined in RFC 821
y It is a relatively simple, text-based protocol
y SMTP standardized the message character set as 7-bit
ASCII
y SMTP uses TCP port 25.
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 3/14
What is mail?
y Mail is a text file
Envelope -
y sender address
y receiver address
Message y Mail Header defines
the sender, the receiver,the subject of themessage, and someother information
y Mail Body Containsthe actual informationin the message
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 4/14
How messages are sent to SMTP
server?
E-mail communication using Relaying
y Used during initial days of SMTP.y SMTP routing information is included along with E-mail address.y Problem with this method.
Using DNS
y This method is used at present.y The senders SMTP server makes the use of DNS to find MX record of the
domain to which the E-mail is to be sent.
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 5/14
E-MAIL COMMUNICATION USING RELAYING
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 6/14
SMTP architecture
y SMTP clients andservers have two maincomponents
y User Agents Prepares the
message, encloses it in an envelope.(Eudora, Outlook express etc forexample)
y Mail Transfer Agent (MTA) Transfers the mail across the
internet
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 7/14
SMTP PROCEDURE
y Client·s SMTP mail server establishes a TCP
connection to the recipients SMTP server using Port 25
y three phases in message transfery Connection establishment
y Transfer of messages
y Connection termination
y command/response interactiony commands: ASCII text
y response: status code and phrase
y messages must be in 7-bit ASCII
7
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 8/14
Commands of SMTP
HELOHELO : Request to initiate SMTP session: Request to initiate SMTP session
MAIL FROM : Sender¶s EMAIL FROM : Sender¶s E--Mail addressMail address
RCPT TORCPT TO :: Receiver¶s EReceiver¶s E--Mail addressMail address
DATADATA :: Body of messageBody of message
QUITQUIT :: Terminates SMTP connectionTerminates SMTP connection
RSETRSET :: Aborts mail transactionAborts mail transaction
VRFYVRFY :: Asks receiver to verify the validity of the mailboxAsks receiver to verify the validity of the mailbox
EXPNEXPN :: Asks receiver to identify mailing listAsks receiver to identify mailing list
HELPHELP :: Causes receiver to send help informationCauses receiver to send help information
NOOP NOOP :: Forces server to verify the communication with SMTPForces server to verify the communication with SMTP
receiver receiver
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 9/14
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 10/14
Status Codesy 211 System status, or system help reply .
y 214 Help message.
y 220 <domain> Service ready.
y 221 <domain> Service closing transmission channel.
y250 Requested mail action okay, completed.
y 251 User not local; will forward to <forward-path>.
y 354 Start mail input; end with <CRLF>.<CRLF>.
y 421 <domain> Service not available, closing transmission channel.[This may be a reply to any command if the service knows itmust shut down].
y 450 Requested mail action not taken: mailbox unavailable.y 451 Requested action aborted: local error in processing
y 452 Requested action not taken: insufficient system storage.
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 11/14
Status Codes
y 500 Syntax error, command unrecognized. [This may include errorssuch as command line too long]
y 501 Syntax error in parameters or arguments.
y 502 Command not implemented.
y 50
3 Bad sequence of commands.y 504 Command parameter not implemented.
y 550 Requested action not taken: mailbox unavailable.
y 551 User not local; please try <forward-path>.
y 552 Requested mail action aborted: exceeded storage allocation.
y 553 Requested action not taken: mailbox name not allowed.
[E.g., mailbox syntax incorrect]y 554 Transaction failed.
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 12/14
Connection EstablishmentTCP Connection
Establishment
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 13/14
Message Progress
8/7/2019 SMTP final
http://slidepdf.com/reader/full/smtp-final 14/14
Connection Termination
TCP Connection Termination
top related