1 / 13

Special Topics in Computer Engineering Application layer: E-Mail

Special Topics in Computer Engineering Application layer: E-Mail. Some of these Slides are Based on Slides by Kurose and Ross Prepared for Section 2.4 of the Book Computer Networking: A Top Down Approach Featuring the Internet. Three major components: user agents mail servers

bertha-guy
Download Presentation

Special Topics in Computer Engineering Application layer: E-Mail

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Special Topics in Computer EngineeringApplication layer: E-Mail Some of these Slides are Based on Slides by Kurose and Ross Prepared for Section 2.4 of the Book Computer Networking: A Top Down Approach Featuring the Internet CPE 0907532: Application Layer_Email

  2. Three major components: user agents mail servers simple mail transfer protocol: SMTP User Agent a.k.a. “mail reader” read, reply to, forward, save, and compose messages Example GUI user agents: Eudora, Outlook, elm, Netscape Messenger Example text-based user agents: elm, pine, mail outgoing, incoming messages stored on server Electronic Mail CPE 0907532: Application Layer_Email

  3. 1) Alice uses UA to compose message “to” bob@someschool.edu 2) Alice’s UA sends message to her mail server; message placed in outgoing message queue 3) Client side of SMTP running on Alice’s mail server opens TCP connection with Bob’s mail server 4) SMTP client sends Alice’s message over the TCP connection 5) Bob’s mail server places the message in Bob’s mailbox 6) Bob invokes his user agent to read message user agent user agent mail server mail server Scenario: Alice sends message to Bob 1 2 6 3 4 5 CPE 0907532: Application Layer_Email

  4. Mail Servers mailbox contains incoming messages for user messagequeue of outgoing (to be sent) mail messages SMTP protocol between mail servers to send email messages client side: sending mail “server” side: receiving mail user agent user agent user agent user agent user agent user agent SMTP SMTP SMTP mail server mail server mail server Electronic Mail: mail servers CPE 0907532: Application Layer_Email

  5. uses TCP to reliably transfer email message from client to server, port 25 direct transfer: sending server to receiving server three phases of transfer handshaking (greeting) transfer of messages closure command/response interaction commands: ASCII text response: status code and ( optional ) phrase messages must be in 7-bit ASCII Electronic Mail: SMTP[RFC 2821] CPE 0907532: Application Layer_Email

  6. server host name S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection client host name Example Transcript of Messages Exchanged between SMTP Client & Server (TCP Connection Established) CPE 0907532: Application Layer_Email

  7. Try SMTP interaction for yourself: • telnet servername 25 • see 220 reply from server • enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands above lets you send email without using email client (reader) CPE 0907532: Application Layer_Email

  8. SMTP uses persistent connections SMTP requires message (header & body) to be in 7-bit ASCII SMTP server uses CRLF.CRLF to determine end of message Comparison with HTTP: HTTP: a pull protocol user initiates TCP connection ; use HTTP to pull the information off the server SMTP: a push protocol sending mail server pushes the file to the receiving mail server ( initiates TCP connection ) both have ASCII command/response interaction, status codes HTTP: each object encapsulated in its own response msg SMTP: multiple objects sent in one multipart msg SMTP: final words CPE 0907532: Application Layer_Email

  9. SMTP: protocol for exchanging email msgs RFC 822: standard for text message format: header lines, e.g., To: From: Subject: differentfrom SMTP commands which were part of the SMTP handshaking protocol body the “message”, ASCII characters only Mail message format header blank line body CPE 0907532: Application Layer_Email

  10. Multipurpose Internet Mail Extensions, MIME : extra header lines defined in RFC 2045, 2056 to send content other than ASCII text From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data ..... ......................... ......base64 encoded data MIME version method used to encode data multimedia data type, subtype, parameter declaration encoded data Message format: multimedia extensions User agent first uses value of the Content-Transfer-Encoding header to convert message body to its original non-ASCII form, and then uses Content-Type header to determine what actions to take on the message body CPE 0907532: Application Layer_Email

  11. SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server POP: Post Office Protocol [RFC 1939] authorization (agent <-->server) and download IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server HTTP: Hotmail , Yahoo! Mail, etc. user agent user agent sender’s mail server SMTP Mail access protocols SMTP access protocol receiver’s mail server CPE 0907532: Application Layer_Email

  12. authorization phase client commands: user: declare username pass: password server responses +OK -ERR transaction phase, client: list: list message numbers retr: retrieve message by number dele: delete quit POP3 protocol S: +OK POP3 server ready C: user bob S: +OK C: pass hungry S: +OK user successfully logged on C: list S: 1 498 S: 2 912 S: . C: retr 1 S: <message 1 contents> S: . C: dele 1 C: retr 2 S: <message 2 contents> S: . C: dele 2 C: quit S: +OK POP3 server signing off CPE 0907532: Application Layer_Email

  13. More about POP3 Previous example uses “download and delete” mode. Bob cannot re-read e-mail if he changes client “Download-and-keep” mode: copies of messages on different clients POP3 is stateless across sessions IMAP Keep all messages in one place: the server Allows user to organize messages in folders IMAP keeps user state across sessions: names of folders and mappings between message IDs and folder name POP3 (more) and IMAP CPE 0907532: Application Layer_Email

More Related