1 / 24

Electronic Mail

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

leena
Télécharger la présentation

Electronic 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. Three major components: user agents mail servers simple mail transfer protocol: SMTP User Agent a.k.a. “mail reader” composing, editing, reading mail messages e.g., pine, Outlook, elm, Netscape Messenger outgoing, incoming messages stored on server user agent user agent user agent user agent user agent user agent SMTP SMTP SMTP mail server mail server mail server outgoing message queue user mailbox Electronic Mail

  2. 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: sending mail server “server”: receiving mail server 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

  3. 1) Alice compose message and “to” bob@someschool.edu 2) Alice’s UA sends message to her mail server; message placed in message queue 3) Client side of SMTP 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

  4. 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: HELO, MAIL, RCPT, DATA, QUIT, etc. response: status code and phrase messages must be in 7-bit ASCII MIME: multipurpose internet mail extensions Electronic Mail: SMTP

  5. jadzia:~ % mail -v xinliu@shay.ecn.purdue.edu Subject: hello test . EOT xinliu@shay.ecn.purdue.edu... Connecting to shay.ecn.purdue.edu. via esmtp... 220 shay.ecn.purdue.edu ESMTP Sendmail 8.12.10/8.12.10; Wed, 19 Nov 2003 15:35:00 -0500 (EST) >>> EHLO jadzia.ifp.uiuc.edu 250-shay.ecn.purdue.edu Hello jadzia.ifp.uiuc.edu [130.126.122.22], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-STARTTLS 250-DELIVERBY 250 HELP >>> MAIL From:<xinliu@ifp.uiuc.edu> SIZE=70 250 2.1.0 <xinliu@ifp.uiuc.edu>... Sender ok >>> RCPT To:<xinliu@shay.ecn.purdue.edu> >>> DATA 250 2.1.5 <xinliu@shay.ecn.purdue.edu>... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 hAJKZ06i019357 Message accepted for delivery xinliu@shay.ecn.purdue.edu... Sent (hAJKZ06i019357 Message accepted for delivery) Closing connection to shay.ecn.purdue.edu. >>> QUIT 221 2.0.0 shay.ecn.purdue.edu closing connection Greeting identify

  6. SMTP uses persistent connections Places all of the message’s objects into one message SMTP is a push protocol – the sending mail server pushes the file to the receiving mail server. SMTP requires message (header & body) to be in 7-bit ASCII SMTP server uses CRLF.CRLF to determine end of message SMTP: summary

  7. SMTP: protocol for exchanging email msgs RFC 822: standard for text message format: header lines, e.g., To: From: Subject: differentfrom SMTP commands! body the “message”, ASCII characters only Mail message format header blank line body

  8. MIME: multimedia mail extension, RFC 2045, 2056 additional lines in msg header declare MIME content type Message format: multimedia extensions From srikant@ifp.uiuc.edu Fri Oct 18 14:59:04 2002 Received: from dosai.csl.uiuc.edu (dosai.csl.uiuc.edu [130.126.137.172]) by jadzia.ifp.uiuc.edu (8.10.1/8.10.1) with ESMTP id g9IJwvM27934 for <xinliu@ifp.uiuc.edu>; Fri, 18 Oct 2002 14:58:57 -0500 (CDT) Received: from localhost (srikant@localhost) by dosai.csl.uiuc.edu (8.10.0/8.10.0) with ESMTP id g9IJx2923097 for <xinliu@dosai.csl.uiuc.edu>; Fri, 18 Oct 2002 14:59:02 -0500 (CDT) Date: Fri, 18 Oct 2002 14:59:01 -0500 (CDT) From: Rayadurgam Srikant <srikant@ifp.uiuc.edu> To: Xin Liu <xinliu@ifp.uiuc.edu> Subject: CV Message-ID: <Pine.GSO.4.44.0210181458520.23095-101000@dosai.csl.uiuc.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Length: 274 Status: RO X-Status: X-Keywords: X-UID: 3

  9. Text example subtypes: plain, html Image example subtypes: jpeg, gif Audio exampe subtypes: basic (8-bit mu-law encoded), 32kadpcm (32 kbps coding) Video example subtypes: mpeg, quicktime Application other data that must be processed by reader before “viewable” example subtypes: msword, octet-stream Multipart MIME typesContent-Type: type/subtype; parameters

  10. From: Rayadurgam Srikant <srikant@ifp.uiuc.edu> To: Xin Liu <xinliu@ifp.uiuc.edu> Subject: CV Message-ID: <Pine.GSO.4.44.0210181458520.23095-101000@dosai.csl.uiuc.edu> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-1034971141=:23095" Content-Length: 150065 Status: RO X-Status: X-Keywords: X-UID: 16 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-851401618-1034971141=:23095 Content-Type: TEXT/PLAIN; charset=US-ASCII ------------ R. Srikant 1308 W. Main Street Associate Professor Urbana, IL 61801 Coordinated Science Lab. and (217) 333-2457 (Phone) Department of General Engineering (217) 244-1642 (Fax) University of Illinois rsrikant@uiuc.edu http://comm.csl.uiuc.edu/~srikant ---559023410-851401618-1034971141=:23095 Content-Type: APPLICATION/PostScript; name="my_bio.ps" Content-Transfer-Encoding: BASE64 Content-Description: Content-Disposition: attachment; filename="my_bio.ps"

  11. RFC 821 • 4.5.2. TRANSPARENCY The mail data may contain any of the 128 ASCII characters. All characters are to be delivered to the recipient's mailbox including format effectors and other control characters. If the transmission channel provides an 8-bit byte (octets) data stream, the 7-bit ASCII codes are transmitted right justified in the octets with the high order bits cleared to zero. In some systems it may be necessary to transform the data as it is received and stored. This may be necessary for hosts that use a different character set than ASCII as their local character set, or that store data in records rather than strings. If such transforms are necessary, they must be reversible -- especially if such transforms are applied to mail being relayed.

  12. 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

  13. 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 1 contents> S: . C: dele 2 C: quit S: +OK POP3 server signing off

  14. More about POP3 Previous example uses “download and delete” mode. Bob cannot re-read e-mail “Download-and-keep”: 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 web-based mail

  15. Reading • Chpt. 28

  16. NFS • NFS: network file system • Functionality: transparent file access • A program works on a local file should work on an NFS file. • Different from FTP • Application: • Home directory access • Network software, etc. • Building block: remote procedure call • Nothing needed to be done by the client • Transport layer protocol: • predominantly UDP

  17. RPC: remote procedure call • A client program: just calls functions • What happens: • A local client stub (a function generated by RPC package) sends the procedure arguments to server. • Server stub gets message and call server proc. • Server returns results • Client stub returns to client application. • Easier client coding: function calls • RPC hides all communications • Stub and RFC involve socket programming, not client • data translation details handled by RPC

  18. Format 20 bytes 8 4 distinguish diff. RPC procedures 4 4 4 which procedure on the server 4 4 Up to 408 Client ID Up to 408 security procedure parameters

  19. More • XDR: external data representation • Provide a uniform format, e.g., intergers, booleans, floating point numbers. • Port mapper • RPC procedure: ephemeral port • Port mapper: port 111 • Name binding service

  20. More • Port mapper starts first • RPC server programs starts. Register with port mapper. • Register each program, version, and protocol. • Client starts. Call mapper to obtain the ephemeral port number. • Client sends RPC message to the port number.

  21. NFS User process NFS server Local file access NFS client Local file access TCP/UDP IP TCP/UDP IP Server kernel Client kernel Local disk Local disk

  22. NFS procedure • CREATE • REMOVE • RENAME • LINK • SYMLINK • READLNK • MKDIR • RMDIR • READDIR • GETATTR • SETATTR • STATFS • LOOKUP • READ • WRITE

  23. shannon: more ./imap/tmp.txt [root@shannon liu]# tcpdump -S udp port 2049 tcpdump: listening on eth0 12:23:18.311730 shannon.cs.ucdavis.edu.682819030 > bfs6.cs.ucdavis.edu.nfs: 108 getattr [|nfs] (DF) 12:23:18.312134 bfs6.cs.ucdavis.edu.nfs > shannon.cs.ucdavis.edu.682819030: reply ok 112 getattr DIR 755 ids 12026/0 [|nfs] 12:23:18.312251 shannon.cs.ucdavis.edu.699596246 > bfs6.cs.ucdavis.edu.nfs: 120 lookup [|nfs] (DF) 12:23:18.312758 bfs6.cs.ucdavis.edu.nfs > shannon.cs.ucdavis.edu.699596246: reply ok 240 lookup [|nfs] 12:23:18.312866 shannon.cs.ucdavis.edu.716373462 > bfs6.cs.ucdavis.edu.nfs: 108 getattr [|nfs] (DF) 12:23:18.313382 bfs6.cs.ucdavis.edu.nfs > shannon.cs.ucdavis.edu.716373462: reply ok 112 getattr DIR 755 ids 12026/0 [|nfs] 12:23:18.360277 shannon.cs.ucdavis.edu.749927894 > bfs6.cs.ucdavis.edu.nfs: 120 read [|nfs] (DF) 12:23:18.360850 bfs6.cs.ucdavis.edu.nfs > shannon.cs.ucdavis.edu.749927894: reply ok 136 read

  24. shannon: mkdir test [root@shannon program]# tcpdump -S udp port 2049 tcpdump: listening on eth0 12:40:34.439271 shannon.cs.ucdavis.edu.1454570966 > bfs6.cs.ucdavis.edu.nfs: 108 getattr [|nfs] (DF) 12:40:34.439792 bfs6.cs.ucdavis.edu.nfs > shannon.cs.ucdavis.edu.1454570966: reply ok 112 getattr DIR 755 ids 12026/0 [|nfs] 12:40:38.103369 shannon.cs.ucdavis.edu.1471348182 > bfs6.cs.ucdavis.edu.nfs: 116 lookup [|nfs] (DF) 12:40:38.103829 bfs6.cs.ucdavis.edu.nfs > shannon.cs.ucdavis.edu.1471348182: reply ok 116 lookup ERROR: No such file or directory 12:40:38.104906 shannon.cs.ucdavis.edu.1488125398 > bfs6.cs.ucdavis.edu.nfs: 144 mkdir [|nfs] (DF) 12:40:38.105953 bfs6.cs.ucdavis.edu.nfs > shannon.cs.ucdavis.edu.1488125398: reply ok 272 mkdir [|nfs] 6 packets received by filter 0 packets dropped by kernel

More Related