1 Kyung Hee University Chapter 22 Simple Mail Transfer Protocol (SMTP)
2 Kyung Hee University Introduction TCP/IP protocol that supports electronic mail on the Internet is called Simple Mail Transfer Protocol (SMTP) It is a system for sending messages to other computer users based on addresses. SMTP supports : l Sending a single message to one or more recipients. l Sending messages that include text, voice, video, or graphics. l Sending messages to users on networks outside the Internet
3 Kyung Hee University Introduction (cont’d) SMTP concept
4 Kyung Hee University Introduction (cont’d) The components of SMTP system user agent (UA) l prepares the message, creates the envelope, and puts the message in the envelope mail transfer agent (MTA) l transfers the mail across the Internet.
5 Kyung Hee University Introduction (cont’d) Relay MTAs : relaying the mail
6 Kyung Hee University Introduction (cont’d) Mail gateway can receive mail prepared by a protocol other than SMTP and transform it to SMTP format before sending
7 Kyung Hee University 22.1 User Agent (UA) is defined in SMTP, but the implementation details are not Popular user agent programs are MH, Berkeley Mail, Elm, Zmail, and Mush Some user agents have an extra user interface that allows window-type interactions with the system. Eudora is an example of this type of user interface
8 Kyung Hee University User Agent (cont’d) Sending mail
9 Kyung Hee University User Agent (cont’d) Receiving mail The UA periodically checks the mailboxes If a user has mail, the UA informs the user first by giving a notice. If the user is ready to read the mail, a list is displayed in which each line contains a summary of the information about a particular message in the mailbox The summary usually includes the sender mail address, the subject, and the time the mail was sent or received.
10 Kyung Hee University 22.2 Addresses The addressing system used by SMTP consists of two parts : a local part and a domain name
11 Kyung Hee University 22.3 Delayed Delivery The message does not necessarily have to be delivered immediately but can be delayed at the sender site, receiver site, or the intermediate servers. Sender-site Delay SMTP specifies that the sender site must accommodate a spooling system in which messages are stored before being sent. The mail transfer system periodically checks the mail stored in the pool to see if the mail can be sent.
12 Kyung Hee University Delayed Delivery (cont’d) Sender-site Delay
13 Kyung Hee University Delayed Delivery (cont’d) Receiver-site Delay
14 Kyung Hee University Delayed Delivery (cont’d) Intermediate Delay receiving mail, keeping mail messages in their own mailboxes and spooling and sending them appropriate.
15 Kyung Hee University 22.4 Aliases SMTP allows one name, an alias, to represent several different addresses; this is called one-to-many alias expansion. Also, a single user can be defined by several different addresses, called many-to-one alias expansion. To handle these, the system must include an alias expansion facility at both the sender and receiver site
16 Kyung Hee University Aliases (cont’d) Alias expansion
17 Kyung Hee University Aliases (cont’d) one-to-many expansion
18 Kyung Hee University Aliases (cont’d) Many-to-one expansion
19 Kyung Hee University 22.5 Mail Transfer Agent (MTA) Doing the actual mail transfer. SMTP simply defines how commands and responses must be sent back and forth.
20 Kyung Hee University Mail Transfer Agent (cont’d) MTA in the entire system
21 Kyung Hee University 22.6 Command and Responses Commands and responses to transfer messages between an MTA client and an MTA server Each command or reply is terminated by a two- character (CR and LF) end-of-line token
22 Kyung Hee University Command and Responses (cont’d) Command format it consists of a keyword followed by zero or more arguments. SMTP defines 14 commands.
23 Kyung Hee University Command and Responses (cont’d) Responses
24 Kyung Hee University Command and Responses (cont’d) Responses (cont’d)
25 Kyung Hee University 22.7 Mail Transfer Phases Three phases : connection establishment, mail transfer, and connection termination. Connection Establishment
26 Kyung Hee University Mail Transfer Phases (cont’d) Message Transfer
27 Kyung Hee University Mail Transfer Phases (cont’d) Connection Termination
28 Kyung Hee University 22.8 Multipurpose Internet Mail Extensions (MINE) SMTP cannot be used for languages that are not supported by seven-bit ASCII characters (such as French, German, Hebrew, Russian, Chinese, and Japanese, Korea) Also, SMTP cannot be used to send binary files or to send video or audio data. MIME is supplementary protocol that allows non-ASCII data to be sent through SMTP. it is not mail protocol and cannot replace SMTP; it is only an extension to SMTP
29 Kyung Hee University MINE (cont’d) MINE as set of software function
30 Kyung Hee University MINE (cont’d) MINE defines five headers that can be added to the original SMTP header section to define the transformation parameters : 1. MIME version 2. Content-type 3. Content-Transfer-Encoding 4. Content-Id 5. Content-Description
31 Kyung Hee University MINE (cont’d) MINE header
32 Kyung Hee University MINE (cont’d) header, MINE Header, body
33 Kyung Hee University MINE (cont’d) Data types for Content-Type
34 Kyung Hee University 22.9 Mail Delivery
35 Kyung Hee University Mail Access Protocols In many organization, mail is received by an SMTP sever that is always on-line this SMTP sever provides a mail-drop service Workstations interact with the SMTP host to retrieve messages by using a client-server protocol such as POP, version 3 POP3 uses TCP well-known port 110
36 Kyung Hee University Mail Access Protocols POP3
37 Kyung Hee University Mail Access Protocols IMAP4 More powerful and more complex than POP3 Extra functions l A user can check the header prior to downloading. l A use can search the contents of the for a specific string of characteristics prior to downloading. l A user can partially download l A user can create, delete, or rename mailboxes on the mail server l A user can create a hierarchy of mailboxes in a folder for storage