OSI Model : E-mail services and SMTP/POP Protocols-V

OSI Model : E-mail services and SMTP/POP Protocols-V 

Through its ease and speed, e-mail, the most popular network service, has revolutionized how people interact. E-mail, however, requires various apps and services to execute on a computer or other end device. Post Office Protocol (POP) and Simple Mail Transfer Protocol (SMTP) are two examples of Application layer protocols displayed in the image. These protocols, like HTTP, specify client/server interactions.

When users write e-mail messages, they commonly utilize an application known as a Mail User Agent (MUA), sometimes known as an e-mail client. The MUA permits messages to be sent and receives messages in the client's inbox, which are two separate operations. 

The e-mail client can utilize POP to receive e-mail messages from an e-mail server. The SMTP protocol defines message formats and command strings for sending e-mail from either a client or a server. Typically, an e-mail client combines the functionality of both protocols into a single application.

⚡ E-mail Server Processes - MTA and MDA 📜

The e-mail server operates two separate processes:

  • Mail Transfer Agent (MTA)
  • Mail Delivery Agent (MDA)

The Mail Transfer Agent (MTA) process is used to forward e-mail. As shown in the figure, the MTA receives messages from the MUA or from another MTA on another e-mail server. Based on the message header, it determines how a message has to be forwarded to reach its destination. If the mail is addressed to a user whose mailbox is on the local server, the mail is passed to the MDA. If the mail is for a user not on the local server, the MTA routes the e-mail to the MTA on the appropriate server. 

Here you can see,that the Mail Delivery Agent (MDA) accepts a piece of e-mail from a Mail Transfer Agent (MTA) and performs the actual delivery. The MDA receives all the inbound mail from the MTA and places it into the appropriate users' mailboxes. The MDA can also resolve final delivery issues, such as virus scanning, spam filtering, and return-receipt handling. Most e-mail communications use the MUA, MTA, and MDA applications. However, there are other alternatives for e-mail delivery.

Email Server -MDA
Fig 1.1- Email Server

A client may be connected to a corporate e-mail system, such as IBM's Lotus Notes, Novell's Group wise, or Microsoft's Exchange. These systems often have their own internal e-mail format, and their clients typically communicate with the e-mail server using a proprietary protocol.

The server sends or receives e-mail via the Internet through the product's Internet mail gateway, which performs any necessary reformatting. If, for example, two people who work for the same company exchange e-mail with each other using a proprietary protocol, their messages may stay completely within the company's corporate e-mail system. 

As another alternative, computers that do not have an MUA can still connect to a mail service on a web browser in order to retrieve and send messages in this manner. Some computers may run their own MTA and manage inter-domain e-mail themselves.

As mentioned earlier, e-mail can use the protocols, POP and SMTP (see the figure for an explanation of how they each work). POP and POP3 (Post Office Protocol, version 3) are inbound mail delivery protocols and are typical client/server protocols. They deliver e-mail from the e-mail server to the client (MUA). The MDA listens for when a client connects to a server. Once a connection is established, the server can deliver the e-mail to the client. 

⚡ Simple Mail Transfer Protocol (SMTP) 📜

The Simple Mail Transfer Protocol (SMTP), on the other hand, governs the transfer of outbound e-mail from the sending client to the e-mail server (MDA), as well as the transport of e-mail between e-mail servers (MTA). SMTP enables e-mail to be transported across data networks between different types of server and client software and makes e-mail exchange over the Internet possible. 

The SMTP protocol message format uses a rigid set of commands and replies. These commands support the procedures used in SMTP, such as session initiation, mail transaction, forwarding mail, verifying mailbox names, expanding mailing lists, and the opening and closing exchanges.

Some of the commands specified in the SMTP protocol are:

  • HELO - identifies the SMTP client process to the SMTP server process
  • EHLO - Is a newer version of HELO, which includes services extensions
  • MAIL FROM - Identifies the sender
  • RCPT TO - Identifies the recipient
  • DATA - Identifies the body of the message