Chapter 20 SMTP User Agent () Addressing Delayed Delivery Aliases Mail Transfer Agent () MIME POP 20-1 Figure 20-1 SMTP concept User User SMTP client TCP ephemeral port SMTP server TCP well-known port 25 20-2 20-1
Figure 20-2 s and s User A User B client server 20-3 Figure 20-3 Relay s User A User B Server Relay Relay 20-4 20-2
Figure 20-4 Mail gateway User A User B Mail system Mail gateway Private network 20-5 Figure 20-5 Format of an e-mail Behrouz Forouzan De Anza College Cupertino, CA 96014 Sophia Fegan Com-Net Cupertino, CA 95014 Mail From: forouzan@deanza.edu RCPT To: fegan@comnet.com Sophia Fegan Com-Net Cupertino, CA 95014 Jan. 5, 1998 From: Behrouz Forouzan To: Sophia Fegan Date: 1/5/98 Subject: Network Header Subject: Network Dear Mrs. Fegan: We want to inform you that our network is working properly after the last repair. Dear Mrs. Fegan: We want to inform you that our network is working properly after the last repair. Body Message Yours truly, Yours truly, Behrouz Forouzan Behrouz Forouzan 20-6 20-3
Figure 20-6 E-mail address Local part Address of the mailbox on the local site @ Domain name The domain name of the destination 20-7 Figure 20-7 User A Sender-site delay Spool 20-8 20-4
Figure 20-8 Receiver-site delay User B Mailboxes Server 20-9 Figure 20-9 User A User B Alias expansion Spool Mailboxes Alias exp. Alias exp. Database Server Database 20-10 20-5
Figure 20-10 One-to-many expansion Friends (One name) One-to-many alias expander Database... john@nett.com joe@deanza.edu janet@mcgraw.com (Many recipients) 20-11 Figure 20-11 John Many-to-one expansion (One recipient) Many-to-one alias expander... john@nett.com acc@nett.com sell@nett.com Database (Many addresses) 20-12 20-6
Figure 20-12 User A User B The entire e-mail system Interface Interface Spool Mailboxes Mailboxes Spool Alias exp. Alias exp. Database Database Server Server 20-13 Figure 20-13 Commands and responses client Commands Responses server 20-14 20-7
Figure 20-14 Command format Keyword: argument(s) 20-15 Figure 20-15 Connection establishment client server 220 service ready HELO: deanza.edu 250 OK 20-16 20-8
Figure 20-16 Message transfer client server MAIL FROM: forouzan@deanza.edu 250 OK RCPT TO: sophie@net.edu 250 OK DATA 354 start mail input From: Behrouz Forouzan To: Sophia Fegan Date: 1/6/98 Envelope Header Subject: Network Dear Mrs. Fegan We want to inform you that. Yours truly Behrouz Forouzan. 250 OK Blank line Body 20-17 Figure 20-17 Connection termination client server QUIT 221 service closed 20-18 20-9
Figure 20-18 MIME User User MIME Non-ASCII code Non-ASCII code MIME 7-bit NVT ASCII 7-bit NVT ASCII SMTP 7-bit NVT ASCII SMTP 20-19 Figure 20-19 MIME header E-mail header MIME-Version: 1.1 Content-Type: type/subtype Content-Transfer-Encoding: encoding type Content-Id: message id Content-Description: textual explanation of nontextual contents MIME header E-mail body 20-20 20-1
Figure 20-20 Base64 11001100 Non-ASCII data 10000001 00111001 Base 64 converter 110011 (51) 001000 (8) 000100 (4) 111001 (57) z I E 5 01111010 01001001 01000101 00110101 ASCII data 20-21 Figure 20-21 Quoted-printable 00100110 & Mixed ASCII and non-ascii data 01001100 10011101 00111001 L Non-ASCII 9 01001011 K Quotedprintable 00100110 & 01001100 00111101 00111001 01000100 00111001 L = 9 D 9 ASCII data 01001011 K 20-22 20-1
Figure 20-22 POP3 and SMTP Sending mail SMTP Server Receiving mail Checking Downloading mail Server POP3 Desktop Mail server 20-23 20-1