370 likes | 409 Views
Chapter 22 Simple Mail Transfer Protocol (SMTP). 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 e-mail addresses. SMTP supports :
E N D
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 e-mail addresses. • SMTP supports : • Sending a single message to one or more recipients. • Sending messages that include text, voice, video, or graphics. • Sending messages to users on networks outside the Internet
Introduction (cont’d) • SMTP concept
Introduction (cont’d) • The components of SMTP system • user agent (UA) • prepares the message, creates the envelope, and puts the message in the envelope • mail transfer agent (MTA) • transfers the mail across the Internet.
Introduction (cont’d) • Relay MTAs : relaying the mail
Introduction (cont’d) • Mail gateway • can receive mail prepared by a protocol other than SMTP and transform it to SMTP format before sending
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
User Agent (cont’d) • Sending mail
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.
22.2 Addresses • The addressing system used by SMTP consists of two parts : a local part and a domain name
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.
Delayed Delivery (cont’d) • Sender-site Delay
Delayed Delivery (cont’d) • Receiver-site Delay
Delayed Delivery (cont’d) • Intermediate Delay • receiving mail, keeping mail messages in their own mailboxes and spooling and sending them appropriate.
22.4 Aliases • SMTP allows one name, an alias, to represent several different e-mail addresses; this is called one-to-many alias expansion. • Also, a single user can be defined by several different e-mail 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
Aliases (cont’d) • Alias expansion
Aliases (cont’d) • one-to-many expansion
Aliases (cont’d) • Many-to-one expansion
22.5 Mail Transfer Agent (MTA) • Doing the actual mail transfer. • SMTP simply defines how commands and responses must be sent back and forth.
Mail Transfer Agent (cont’d) • MTA in the entire e-mail system
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
Command and Responses (cont’d) • Command format • it consists of a keyword followed by zero or more arguments. • SMTP defines 14 commands.
Command and Responses (cont’d) • Responses
Command and Responses (cont’d) • Responses (cont’d)
22.7 Mail Transfer Phases • Three phases : connection establishment, mail transfer, and connection termination. • Connection Establishment
Mail Transfer Phases (cont’d) • Message Transfer
Mail Transfer Phases (cont’d) • Connection Termination
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
MINE (cont’d) • MINE as set of software function
MINE (cont’d) • MINE defines five headers that can be added to the original SMTP header section to define the transformation parameters : • MIME version • Content-type • Content-Transfer-Encoding • Content-Id • Content-Description
MINE (cont’d) • MINE header
MINE (cont’d) • Email header, MINE Header, Email body
MINE (cont’d) • Data types for Content-Type
22.10 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
Mail Access Protocols • POP3
Mail Access Protocols • IMAP4 • More powerful and more complex than POP3 • Extra functions • A user can check the email header prior to downloading. • A use can search the contents of the email for a specific string of characteristics prior to downloading. • A user can partially download email • A user can create, delete, or rename mailboxes on the mail server • A user can create a hierarchy of mailboxes in a folder for email storage