Electronic Mail outgoing message queue u Three major

  • Slides: 10
Download presentation
Electronic Mail outgoing message queue u Three major components: u user agents mail servers

Electronic Mail outgoing message queue u Three major components: u user agents mail servers simple mail transfer protocol: SMTP u User Agent u u a. k. a. “mail reader” composing, editing, reading mail messages e. g. , Eudora, Outlook, elm, Netscape Messenger outgoing, incoming messages stored on server user agent user mailbox mail server SMTP mail server user agent SMTP user agent mail server user agent 1

Electronic Mail: Mail Servers user agent u Mail Servers u u u mailbox contains

Electronic Mail: Mail Servers user agent u Mail Servers u u u mailbox contains incoming messages (yet to be read) for user message queue of outgoing (to be sent) mail messages SMTP protocol between mail servers to send email messages uclient: sending mail server u“server”: receiving mail server SMTP mail server user agent SMTP user agent mail server user agent 2

Electronic Mail: SMTP [RFC 821] u Uses TCP to reliably transfer email message from

Electronic Mail: SMTP [RFC 821] u Uses TCP to reliably transfer email message from client to server, port 25 u Direct transfer: sending server to receiving server u Three phases of transfer u handshaking (greeting) u transfer of messages u closure u Command/response interaction u Commands: ASCII text u Response: status code and phrase u Messages must be in 7 -bit ASCII 3

Sample SMTP interaction S: C: S: C: C: C: S: 220 hamburger. edu HELO

Sample SMTP interaction S: C: S: C: C: C: S: 220 hamburger. edu HELO crepes. fr 250 Hello crepes. fr, pleased to meet you MAIL FROM: <alice@crepes. fr> 250 alice@crepes. fr. . . Sender ok RCPT TO: <bob@hamburger. edu> 250 bob@hamburger. edu. . . Recipient ok DATA 354 Enter mail, end with ". " on a line by itself Do you like ketchup? How about pickles? . 250 Message accepted for delivery QUIT 221 hamburger. edu closing connection 4

Mail Message Format u SMTP: protocol for exchanging email messages u RFC 822: standard

Mail Message Format u SMTP: protocol for exchanging email messages u RFC 822: standard for text message format: u blank line header lines, e. g. , u To: u From: u Subject: u different from SMTP commands! u header body u the “message”, ASCII characters only 5

Message Format: Multimedia Extensions u MIME: multimedia mail extension, RFC 2045, 2056 u additional

Message Format: Multimedia Extensions u MIME: multimedia mail extension, RFC 2045, 2056 u additional lines in message header declare MIME content type MIME version method used to encode data multimedia data type, subtype, parameter declaration encoded data From: alice@crepes. fr To: bob@hamburger. edu Subject: Picture of yummy crepe. MIME-Version: 1. 0 Content-Transfer-Encoding: base 64 Content-Type: image/jpeg base 64 encoded data. . . . . base 64 encoded data 6

MIME Types Content-Type: type/subtype; parameters u Text u example subtypes: plain, html (e. g.

MIME Types Content-Type: type/subtype; parameters u Text u example subtypes: plain, html (e. g. , text/html) u Image u example subtypes: jpeg, gif (e. g. , image/jpeg) u Audio u example subtypes: basic (8 bit mu-law encoded), 32 kadpcm (32 kbps coding) (e. g. , audio/basic) u Video u example subtypes: mpeg, quicktime (e. g. , video/mpeg) u Application u u other data that must be processed by reader before “viewable” example subtypes: msword, octet-stream, postscript (e. g. , application/postscript) 7

Multi-part Type From: alice@crepes. fr To: bob@hamburger. edu Subject: Picture of yummy crepe. MIME-Version:

Multi-part Type From: alice@crepes. fr To: bob@hamburger. edu Subject: Picture of yummy crepe. MIME-Version: 1. 0 Content-Type: multipart/mixed; boundary=98766789 --98766789 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Dear Bob, Please find a picture of a crepe. --98766789 Content-Transfer-Encoding: base 64 Content-Type: image/jpeg base 64 encoded data. . . . . base 64 encoded data --98766789 -8

Mail Access Protocols user agent SMTP sender’s mail server POP 3 or IMAP user

Mail Access Protocols user agent SMTP sender’s mail server POP 3 or IMAP user agent receiver’s mail server u SMTP: delivery/storage to receiver’s server u Mail access protocol: retrieval from server u u u POP: Post Office Protocol [RFC 1939] uauthorization (agent <-->server) and download IMAP: Internet Mail Access Protocol [RFC 1730] umore features (more complex) umanipulation of stored msgs on server HTTP: Hotmail , Yahoo! Mail, etc. 9

POP 3 Protocol u Authorization phase u u client commands: uuser: declare username upass:

POP 3 Protocol u Authorization phase u u client commands: uuser: declare username upass: password server responses u+OK u-ERR u Transaction phase u client: u list: list message numbers u retr: retrieve message by number u dele: delete u quit S: C: S: +OK POP 3 server ready user alice +OK pass hungry +OK user successfully logged C: S: S: S: C: C: S: list 1 498 2 912. retr 1 <message 1 contents>. dele 1 retr 2 <message 1 contents>. dele 2 quit +OK POP 3 server signing off 10 on