Presentation is loading. Please wait.

Presentation is loading. Please wait.

SMTP Simple Mail Transfer Protocol. Content I.What is SMTP? II.History of SMTP III.General Features IV.SMTP Commands V.SMTP Replies VI.A typical SMTP.

Similar presentations


Presentation on theme: "SMTP Simple Mail Transfer Protocol. Content I.What is SMTP? II.History of SMTP III.General Features IV.SMTP Commands V.SMTP Replies VI.A typical SMTP."— Presentation transcript:

1 SMTP Simple Mail Transfer Protocol

2 Content I.What is SMTP? II.History of SMTP III.General Features IV.SMTP Commands V.SMTP Replies VI.A typical SMTP Session VII.The Mail Object VIII.Relaying

3 What is SMTP? The Simple Mail Transfer Protocol (SMTP) is the actual protocol used to transfer mail from MTA to MTA. MTA: Mail Transfer Agent.... A program that actually routes and delivers mail. MUA: Mail User Agent... A program that is used to access mail after delivery.

4 What is SMTP? The objective of SMTP is to transfer mail reliably and efficiently. SMTP is widely deployed and proven to be very robust. The SMTP model is based on what is called a mail transaction. Sender and receiver MTAs send commands and replies in a structured, lock-step process.

5 History of SMTP The SMTP specification originally started with the Mail Transfer Protocol in 1980 The SMTP specification originally started with the Mail Transfer Protocol in 1980 It evolved into Simple Mail Transfer Protocol (SMTP) in 1981 It evolved into Simple Mail Transfer Protocol (SMTP) in 1981 Specified in RFC 821 Specified in RFC 821 Most recent RFC is 2821 Most recent RFC is 2821 First and most important implementation is sendmail First and most important implementation is sendmail

6 General Features Independent of underlying transmission subsystem Independent of underlying transmission subsystem Just needs a reliable ordered data stream channel Just needs a reliable ordered data stream channel Operates over TCP port 25 Operates over TCP port 25 Uses an request-response protocol that is useful to human readers (SMTP commands) Uses an request-response protocol that is useful to human readers (SMTP commands) SMTP sessions are stateful, with both parties carefully maintaining a common view of the current state. SMTP sessions are stateful, with both parties carefully maintaining a common view of the current state.

7 SMTP Commands

8 SMTP Replies

9 A typical SMTP Session SMTP commands are generated by the SMTP client and sent to the SMTP server. SMTP commands are generated by the SMTP client and sent to the SMTP server. SMTP replies are sent from the SMTP server to the SMTP client in response to the commands. SMTP replies are sent from the SMTP server to the SMTP client in response to the commands. To effect a mail transfer to an SMTP server, an SMTP client establishes a two-way transmission channel to that SMTP server. To effect a mail transfer to an SMTP server, an SMTP client establishes a two-way transmission channel to that SMTP server. Client resolves either final target host or intermediate MX host via DNS MX RRs Client resolves either final target host or intermediate MX host via DNS MX RRs

10 A typical SMTP Session Sender: Open TCP connection to port 25 Receiver: 220 starfleet.org ready Sender: HELO remulaner.net Receiver: 250 starfleet.org Sender: MAIL FROM: checker@remulaner.net checker@remulaner.net Receiver: 250 Ok Sender: RCPT TO: riker@starfleet.org riker@starfleet.org Receiver 250 Ok

11 A typical SMTP Session Sender: DATA Receiver: 354 start mail input Sender: SUBJECT: Hi Riker Du Lutscher! Sender: Bla blabla Bla Blaaa! Willste ein Spacetrip? Sender:<CRLF>.<CRLF> Receiver: 250 Ok Sender: QUIT Receiver: 221 starfleet.org closing transmission channel

12 The Mail Object SMTP transports a mail object SMTP transports a mail object Consists of envelope and content Consists of envelope and content Envelope: Envelope: Originator Address (MAIL FROM: xx@xx.net) Originator Address (MAIL FROM: xx@xx.net)xx@xx.net Recipient Address(es) (RCPT TO: x@x.net) Recipient Address(es) (RCPT TO: x@x.net)x@x.net Extensions Extensions Content: Content: Header and Body (DATA) Header and Body (DATA)

13 Relaying SMTP Server maybe ultimate destination or intermediate relay host SMTP Server maybe ultimate destination or intermediate relay host SMTP server becomes client if it sends the message on SMTP server becomes client if it sends the message on Responsibility for the message is handed over to relay host: Responsibility for the message is handed over to relay host: Deliver Message Deliver Message Or report failure to do so! Or report failure to do so!

14 Thank you for listening Thank you for listening Any questions ??


Download ppt "SMTP Simple Mail Transfer Protocol. Content I.What is SMTP? II.History of SMTP III.General Features IV.SMTP Commands V.SMTP Replies VI.A typical SMTP."

Similar presentations


Ads by Google