Download presentation
1
Electronic Mail (SMTP, POP, IMAP, MIME)
Chapter 26
2
Electronic Mail Email used to send memos over an internet Widely used
Popular because it is fast and convenient Can send small notes or large memos More users send files with than file transfer Different concept than other network uses Must provide for unavailable remote machine Temporary outage should not cause sender to wait or the transfer to abort
3
Spooling used to handle delayed delivery
When user sends, mail system stores copy Initiates transfer as a background activity Sender can proceed with other activities Background mail process becomes a client Uses DNS to map destination name to IP address Attempts to form TCP connection to destination mail server If successful, passes copy to remote system’s spool area If not, records attempted time and terminates Background process periodically sweeps spool area If finds undelivered mail, tries again If cannot deliver after an extended time, notifies sender
4
Figure 26.1
5
Three hidden ideas Recipient specified by text string
(ex. Names independent of other machine names Mail destination names decoupled from usual domain names Mail forwarding Mail that arrives on one machine may be forwarded to another Includes a mail alias expansion mechanism
6
TCP/IP Standards for Email Service
Two sets of mail standards Message formats Exact format for headers Body of text formatting up to sender Details of exchanges between computers
7
Simple Mail Transfer Protocol
SMTP Standard for exchange of mail between machines Focuses on how underlying mail delivery system passes messages across internet Not specify how mail system accepts mail from a user Not specify how user presented with incoming mail Not specify how mail is stored Not specify how frequently send attempts made
8
SMTP is straightforward
Client/server communication done in ASCII text Easily readable by humans Client establishes reliable stream connection to server; waits for server to send READY FOR MAIL When get, client sends HELO command Server responds by identifying itself Once communication established, sender can: transmit one or more mail messages terminate the connection Request server to reverse roles (mail go other way) Receiver must acknowledge each message; or can abort connection or abort current message transfer
9
Mail Retrieval & Mailbox Manipulation Protocols
SMTP scheme implies that a server must remain ready to accept at all times What about user with dialup Internet access? Only be available when dialed in Use a two-stage delivery process User given mailbox on system with permanent connection That computer runs a conventional SMTP server User forms dialup connection, runs protocol to get messages Two protocols allows remote user to get mail from permanent mailbox
10
Post Office Protocol Current version is 3; POP3
User invokes POP3 client Creates TCP connection to POP3 server User authenticates by login & password User client sends commands to retrieve messages Computer with permanent mailbox must run two servers SMTP server accepts mail and stores it POP3 server allows user to get messages
11
Internet Message Access Protocol
Current version is 4: IMAP4 Uses same general paradigm as POP3 But allows user to dynamically create, delete, or rename mailboxes Also provides more functionality for message retrieval and processing Examine headers without retrieving Search for string and retrieve portions of a message
12
MIME Extension for Non-ASCII Data
Multipurpose Internet Mail Extensions Defined for transfer of Non-ASCII data Does not replace or change POP3 or SMTP Allows encoding of arbitrary data in ASCII Then can be transmitted in a standard message MIME header lines specify: Version of MIME used Type of data being send Encoding used to covert the data to ASCII
13
Example: From: bill@acollege.edu To: john@example.com
MIME-Version: 1.0 Content-Type: image/gif Content-Transfer-Encoding: base64 …data for the image…
14
MIME-Version: 1.0 Content-Type: multipart/mixed; Content-Type: application/msword; name="assign10.doc" Content-Transfer-Encoding: base64 Content-Description: assign10.doc Content-Disposition: attachment; filename="assign10.doc" 0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAbAAAAAAAAAAA EAAAbgAAAAEAAAD+////AAAAAGsAAAD///////////////////////////////////////// EAAAbgAAAAEAAAD+//// //////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////s pcEAA2AJBAAA8BK/AAAAAAAAEAAAAAAABgAAXA0AAA4AYmpiastzy3MAAAAAAAAAAAAAAAAAAAAA AAAJBBYANBoAAKkZAQCpGQEAXAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//w8AAAAA AAAAAAD//w8AAAAAAAAAAAD//w8AAAAAAAAAAAAAAAAAAAAAAKQAAAAAAHAEAAAAAAAAcAQAAHAE AAAAAAAAcAQAAAAAAABwBAAAAAAAAHAEAAAAAAAAcAQAABQAAAAAAAAAAAAAAIQEAAAAAAAADAoA AAAAAAAMCgAAAAAAAAwKAAAAAAAADAoAABwAAAAoCgAAFAAAAIQEAAAAAAAAhpMAAGgBAABICgAA AAAAAEgKAAAAAAAASAoAAAAAAABICgAAAAAAAEgKAAAAAAAASAoAAAAAAABICgAAAAAAAEgKAAAA AAAAKZMAAAIAAAArkwAAAAAAACuTAAAAAAAAK5MAAAAAAAArkwAAAAAAACuTAAAAAAAAK5MAAAAA AADulAAAaAIAAFaXAACAAAAAK5MAABUAAAAAAAAAAAAAAAAAAAAAAAAAcAQAAAAAAABICgAAAAAA AAAAAAAAAAAAAAAAAAAAAABICgAAAAAAAEgKAAAAAAAASAoAAAAAAABICgAAAAAAACuTAAAAAAAA AAAAAAAAAABwBAAAAAAAAHAEAAAAAAAASAoAAAAAAAAAAAAAAAAAAEgKAAAAAAAAQJMAABYAAABm CwAAAAAAAGYLAAAAAAAAZgsAAAAAAABICgAACgAAAHAEAAAAAAAASAoAAAAAAABwBAAAAAAAAEgK AAAAAAAAKZMAAAAAAAAAAAAAAAAAAGYLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
15
Content-Type must have two identifiers
A content type and a subtype Separated by a slash Figure 26.5
16
MIME Multipart Messages
Multipart content type useful for flexibility Four subtypes defined Mixed Message can have multiple independent submessages Each can have own type and encoding Alternative Message can have multiple representations of the same data Parallel Message can have subparts that should be viewed together Digest Single message can contain a set of other messages
17
Summary Email is one of most widely available application services
Like other TCP/IP services, uses client-server Mail system buffers outgoing/incoming msgs Allows transfer to be done in the background TCP/IP suite has separate standards for: Mail message format Mail transfer
18
SMTP Defines how mail system on one machine transfers mail to a server on another POP3 Specifies how a user can retrieve contents of a mailbox Allows user to have permanent mailbox on a computer with continuous Internet connectivity User can access from a machine with intermittent connectivity
19
MIME Provides mechanism allowing arbitrary data to be transferred using SMTP Lines in header of message define the type of data and the encoding used Mixed multipart type is especially useful Single message can contain multiple data types
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.