9. Application layer protocols

9.4. Electronic mail

Email uses two application layer protocols that work together. One is used to send mail, which is the SMTP protocol, and the other to receive messages, which is POP3. Today, IMAP can also be used to receive e-mail. These protocols are closely related to the applications, the processes running on client computers and servers that create and receive messages. These processes are MUA (Mail User Agent), MTA (Mail Transfer Agent) and MDA (Mail Delivery Agent). The MUA process runs on the client machine and the other two processes run on the mail server.

A simplified process for sending emails using a proxy is as follows:

1. The user creates an e-mail message and uses the MUA process to forward it to the mail server and the MTA process running on that server.

2. This process analyses the message headers to define the recipient of the message and check that the user to whom the message points is in its user list.

3. If so, it passes the message to the MDA process, which is responsible for delivering it to the appropriate recipient.

4. If the recipient of the message does not have an account on this server, the MTA process forwards the message to the MTA process on another server where the user account is located.

5. The server passes the message to the MDA process, which delivers the message to the intended recipient.

The following table shows the ports on which the email protocol operates.

Protocol

Port number

IMAP

143

POP3

110

SMTP

25

Encrypted IMAP

993

Encrypted POP3

995

Encrypted SMTP

465 or 587