Electronic Mail: SMTP, POP3, IMAP

E-mail (electronic mail) is the exchange of computer-stored messages by telecommunication. Components of email (User agent, Message Transfer Agent, Message Access Agent). Simple Mail Transfer Protocol (SMTP) is the an Internet standard for electronic mail (email) transmission. Although electronic mail servers and other mail transfer agents use SMTP to send and receive mail messages, user-level client mail applications typically use SMTP only for sending messages to a mail server for relaying. POP3 begins wh

Summary

E-mail (electronic mail) is the exchange of computer-stored messages by telecommunication. Components of email (User agent, Message Transfer Agent, Message Access Agent). Simple Mail Transfer Protocol (SMTP) is the an Internet standard for electronic mail (email) transmission. Although electronic mail servers and other mail transfer agents use SMTP to send and receive mail messages, user-level client mail applications typically use SMTP only for sending messages to a mail server for relaying. POP3 begins wh

Things to Remember

The three phases of transfer of SMTP  

1) handshaking (greeting)

2) transfer of messages

3) closure

3 phases for POP3 communication:(Authorization, Transaction, Update)

 

MCQs

No MCQs found.

Subjective Questions

No subjective questions found.

Videos

No videos found.

Electronic Mail: SMTP, POP3, IMAP

Electronic Mail: SMTP, POP3, IMAP

Electronic Mail

E-mail (electronic mail) is the process of exchanging of computer-stored messages by telecommunication between the computers. (Some publications spell it email; we prefer the currently more established spelling of e-mail.) The E-mail messages that we use are usually encoded in ASCII text. However, you can also send non-text files, such as graphic images (in formats like jpeg, png, gif ) and sound files (mp3, mp2), as attachments sent in binary streams. E-mail was one of the first uses of the Internet which helps to share messages between the computers on an internet and is still the most popular use. In present scenario a large percentage of the total traffic over the Internet is e-mail. The E-mail that we are using to transfer the information can also be exchanged between online service provider users and in networks other than the Internet and we can easily transfer both public and private message securely.

1. Mail Send Protocol

1.1 Simple Mail Transfer Protocol(SMTP)

1.2 Port Number 25/TCP

1.3 Relay Mail From One domain to another or within same domain

2. Mail Access Protocol

2.1 Post Office Protocol v3 (POP3)

2.1.1 Port number 110/TCP

2.1.2 Access mail from Mail server

2.2 Internet Mail Access Protocol (IMAP)

2.2.1 Web Based mail access protocol

2.2.2 Port Number 143/TCP

Fig: A High-level view of the Internet E-mail System
Fig: A High-level view of the Internet E-mail System
Fig: E-mail System
Fig: E-mail System

Components of Email System

User Agent: - The first component of an electronic mail system is the user agent (UA). The user agent provides the services to the user to make the process of sending and receiving a message easier and efficient manner.

Message Transfer Agent: - The actual mail transfer is done through message transfer agents (MTAs). To send mail we must have a system the possess the MTA client and to receive the mail, a system must have a server MTA. The MTA client and server on the Internet is called Simple Mail Transfer Protocol (SMTP) defines the formal protocol that defines.In the message transfer agent, the basic two pairs of MTA are the client-server programs which are used in the most common situation.

Message Access Agents: - The first and the second stages of mail delivery use SMTP. But, the SMTP is not involved in the third stage because of the SMTP is a push protocol; it pushes the message from the client to the server. On the other hand, the third stage needs a pull protocol; the client must pull messages from the server. The third stage uses a message access agent

SMTP

Simple Mail Transfer Protocol (SMTP) is a regarded as the Internet standard used for electronic mail (email) transmission. Although the e-mail servers and other mail transfer agents use SMTP to send and receive mail messages between the users. The user-level client mail applications typically use the SMTP only for sending messages to a mail server for relaying. For retrieving messages, the clients applications basically use either POP3 or IMAP. SMTP is a principle application-layer protocol for Internet e-mail. It uses the reliable transfer service of TCP, uses port 25. It is a direct transfer: sending a server to receiving server. The three phases of transfer:

1) handshaking (greeting)

2) transfer of messages

3) closure

Sample SMTP Interaction

Server: 220 interaction.edu.np

Client : HELLO creeps.fr

Server: 250 Hello creepes.fr, glad to meet you

Client : MAIL FROM: <alice@creepes.fr>

Server: 250 alice@creepes.fr... Sender are you ok to send!!!!

Client : mail RECEIPT TO: <bob@interaction.edu>

Server: 250 bob@interaction.edu ... Recipient are you ready??? ok!!!!

Client : DATA

Server: 354 Enter mail, end with "." on a line by itself

Client : Do you like to have the ketchup?

Client : How about having the pickles?

Client : .

Server: 250 !!!! The message you tried is accepted for delivery!!!!

Client : QUIT!!!!

Server: 221 interaction.edu terminating the connection

Fig: Send E-mail: Alice sends message to BOB
Fig: Send E-mail: Alice sends message to BOB

Scenario: Alice sends (mail) message to Bob BY SMTP

1) Alice uses UA to compose the message to send to: bob@someschool.edu

2) Alice’s UA sends message to her mail server and the message placed in message queue for sending

3) The Client side of SMTP opens the TCP connection with Bob’s mail server

4) SMTP client sends Alice’s message over the TCP connection of bob

5) Bob’s mail server places the message in the mailbox Bob

6) Bob invokes his user agent to read message that he received from alice

Mail Access Protocols (Pull Protocols)

SMTP was a Mail Transfer Protocol or push Protocol and used to push the mail message up to the receiver’s mail server.

Mail Access Protocol: retrieval from server:HTTP is also used to Compose and retrieve Emails. It is also called Web-based email.

E.g. Hotmail, Yahoo Mail Etc.

POP: Post Office Protocol (POP3)

1) authorization (agent server) and download (deleted from server)

2) TCP Port no. 110

IMAP: Internet Mail Access Protocol

1) IMAP has more features (more complex).It's TCP Port no. 143. It has remote manipulation of stored messages on servers.

Fig: POP3 and IMAP
Fig: POP3 and IMAP

POP3 (Post Office Protocol)

POP3 begins when user agent opens a TCP connection to the mail server on port 110. Then POP3 progresses through 3 phases:

  1. Authorization: user agent sends a username and password to authenticate the user
  2. Transaction: user agent retrieves message, user-agent can mark messages for deletion, remove deletion mark
  3. Update: occurs after client has issued the quit command, ending POP3 session, at this time mail server delete the marked messages

POP3 is extremely simple mail access protocol whose functionality is limited and it can be configured to “download and delete” (which is a default configuration) or “download and keep” as per the need. A problem with download and delete mode –here, a user may want to access his/her mail messages from multiple machines. During POP3 session, POP3 server maintains some state information about which user messages have been marked for deletion. However, POP3 server does not carry state information across POP3 session.

Fig: POP3 example
Fig: POP3 example

IMAP (Internet MAP)

User prefers to maintain a folder hierarchy on the remote server that can be accessed from any computer. This is not possible with POP3 however IMAP protocol is defined to solve the issue. IMAP has more feature along with more complexity. When the message first arrives, it is associated with recipient’s INBOX folder. The recipient can then move the message from one folder to another. Unlike POP3, IMAP maintains state information across IMAP session, - for example, names of folders and which messages are associated with which folders. IMAP enable to obtain components of messages. (useful for low bandwidth).

MIME (Multipurpose Internet Mail Extensions)

Multipurpose Internet Mail Extensions (MIME) can send messages only in NVT (Network Virtual Terminal) 7-bit ASCII format. In other words, MIME has some limitations on its function or use. An E-mail (Electronic mail) has a simple structure so, its simplicity, however, comes with a price. Multipurpose Internet Mail Extensions (MIME) is a supplementary protocol for sending a message in NVT that allows non-ASCII data to be sent through e-mail. MIME transforms all the non-ASCII data intended at the sender site to NVT ASCII data and delivers it to the client MTA to be sent through the Internet to the receiver. The message at the receiving site is transformed back to the original data after the ASCII data is received.

Fig: MIME Example
Fig: MIME Example

Common MIME types

Content-Type: type/subtype; parameters

  1. Text:plain; HTML
  2. Image:jpeg; gif
  3. Audio:basic; 32kadpcm
  4. Video:QuickTime
  5. Application:msword; octet-stream

Securing Email Using Pretty Good Privacy (PGP)

It is an e-mail encryption scheme that has become a de-facto standard, with thousands of users all over the globe because of its encryption scheme. Depending on the version, the PGP software uses MD5 or SHA for calculating the message digest; the CAST, Triple-DES or IDEA is used for symmetric key encryption; and the RSA is used for the public key encryption. In addition, PGP also provides the feature of data compression. When PGP is installed, the software creates a public key pair for the user and that public key can be posted on the user's Web site or placed on a public key server as per the need of the situation. The private key is protected by the use of a password and the password has to be entered by the user every time the user wishes to accesses the private key of the system. PGP gives the user the option to choose between the digitally signing of the message, encrypting the message, or both digitally signing and encrypting.

Fig: (PGP) Using hash function and digital signatures to provide sender authentication and message integrity
Fig: (PGP) Using hash function and digital signatures to provide sender authentication and message integrity

References:

  1. A.S. Tanenbaum, “Computer Networks”, 3rd Edition, Prentice Hall India, 1997.
  2. W. Stallings, “Data and Computer Communication”, Macmillan Press, 1989.
  3. Kurose Ross, “Computer Networking: A top-down approach”, 2nd Edition, Pearson Education
  4. Larry L. Peterson, Bruce S. Davie, “Computer Networks: A Systems Approach”, 3rd Edition, Morgan Kaufmann Publishers

Lesson

Application Layer

Subject

Computer Engineering

Grade

Engineering

Recent Notes

No recent notes.

Related Notes

No related notes.