Summary

This document details the SMTP and DNS protocols, outlining interaction examples. It explains email and mail access protocols, including client-server communication. The content is ideal for understanding the underlying mechanisms of email transmission and addressing resolution.

Full Transcript

Scenario: Alice sends e-mail to Bob 1) Alice uses UA to compose e-mail message “to” [email protected] 4) SMTP client sends Alice’s message over the TCP connection 2) Alice’s UA sends message to her mail server using SMTP; message placed in message queue 5) Bob’s mail server places the message in...

Scenario: Alice sends e-mail to Bob 1) Alice uses UA to compose e-mail message “to” [email protected] 4) SMTP client sends Alice’s message over the TCP connection 2) Alice’s UA sends message to her mail server using SMTP; message placed in message queue 5) Bob’s mail server places the message in Bob’s mailbox 3) client side of SMTP at mail server opens TCP connection with Bob’s mail server 6) Bob invokes his user agent to read message 1 user agent 2 mail server 3 Alice’s mail server user agent mail server 6 4 5 Bob’s mail server Application Layer: 2-6 Sample SMTP interaction S: C: S: C: S: C: S: C: S: C: C: C: S: C: S: 220 hamburger.edu HELO crepes.fr 250 Hello crepes.fr, pleased to meet you MAIL FROM: <[email protected]> 250 [email protected]... Sender ok RCPT TO: <[email protected]> 250 [email protected] ... 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 Application Layer: 2-7 SMTP: observations comparison with HTTP: § HTTP: client pull § SMTP: client push § both have ASCII command/response interaction, status codes § HTTP: each object encapsulated in its own response message § SMTP: multiple objects sent in multipart message § 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 Application Layer: 2-8 Mail message format SMTP: protocol for exchanging e-mail messages, defined in RFC 5321 (like RFC 7231 defines HTTP) RFC 2822 defines syntax for e-mail message itself (like HTML defines syntax for web documents) § header lines, e.g., • To: • From: • Subject: these lines, within the body of the email message area different from SMTP MAIL FROM:, RCPT TO: commands! header blank line body § Body: the “message” , ASCII characters only Application Layer: 2-9 Retrieving email: mail access protocols user agent SMTP SMTP e-mail access protocol (e.g., IMAP, HTTP) user agent sender’s e-mail receiver’s e-mail server server § SMTP: delivery/storage of e-mail messages to receiver’s server § mail access protocol: retrieval from server • IMAP: Internet Mail Access Protocol [RFC 3501]: messages stored on server, IMAP provides retrieval, deletion, folders of stored messages on server § HTTP: gmail, Hotmail, Yahoo!Mail, etc. provides web-based interface on top of SMTP (to send), IMAP (or POP) to retrieve e-mail messages Application Layer: 2-10 DNS name resolution: iterated query root DNS server Example: host at engineering.nyu.edu wants IP address for gaia.cs.umass.edu Iterated query: § contacted server replies with name of server to contact § “I don’t know this name, but ask this server” 2 3 TLD DNS server 1 4 8 5 requesting host at local DNS server engineering.nyu.edu dns.nyu.edu 7 6 gaia.cs.umass.edu authoritative DNS server dns.cs.umass.edu Application Layer: 2-20 DNS name resolution: recursive query root DNS server Example: host at engineering.nyu.edu wants IP address for gaia.cs.umass.edu 7 Recursive query: § puts burden of name resolution on contacted name server § heavy load at upper levels of hierarchy? 3 2 1 6 TLD DNS server 8 requesting host at local DNS server engineering.nyu.edu dns.nyu.edu 5 4 gaia.cs.umass.edu authoritative DNS server dns.cs.umass.edu Application Layer: 2-21

Use Quizgecko on...
Browser
Browser