Exclusive Details of Email Protocols – SMTP, POP, and IMAP

Email is one of the primary services running on the Internet. So, what application, protocol, and services are required for email? The email server stores email messages in a database. Email uses the store-and-forward method for sending and storing messages. Email clients communicate with the servers running mail services to send and receive an email. The client-connected server communicates with other mail servers to transport messages from one domain to another.

When sending an email, the client does not communicate directly with another email client. However, both mail clients rely on the mail server to transport messages. The Email process uses three types of protocols: Simple Mail Transfer Protocol (SMTP), Post Office Protocol (POP), and Internet Messaging Access Protocol (IMAP). The application layer process sends mail using SMTP, but a client retrieves email using POP or IMAP.

Simple Mail Transfer Protocol (SMTP) Operation

The SMTP message formats required a message body with the message header. The body of the message can hold any amount of text; the message header must have a properly formatted recipient email address and a sender address.

When a client sends an email message, the client SMTP process connects with a server SMTP process on port 25. When the client and server set up a connection, then the client tries to send the email message to the server. After the server receives the email message, it either places the message in a local account in case of the local recipient or forwards the message to another mail server for delivery.

If the destination email server is busy or not online, then the SMTP spool message will be sent later. The server periodically checks for the queue and attempts to send messages again. When the message expiration time is over and still in the queue, the message is returned to the sender as an undeliverable message.

SMTP, POP, and IMAP

The figure above illustrates the technique of message sending. The client sends an email message to admin@fschub.com. The SMTP / POP server-1 will receive the message. Server-1 will check the recipient’s list of local recipients. If found, the message will be placed on the local account. The message will be forwarded to SMTP / POP server-2 if not found.

Post Office Protocol (POP) Operation

The POP server passively listens on TCP port 110 for client connection requests. When a client needs to use the POP service, it requests to start a TCP connection with the server. On establishing a connection, the POP server welcomes the client.

When the client and POP server set up a connection, both exchange commands and responses until the connection terminates. With POP, when clients download email messages, the server removes these messages.

The POP server has a temporary holding area for mail until it is downloaded to the clients. Because there is no central place for email message storage, it is not an attractive choice for a small business that needs centralized storage for backup.

Internet Messaging Access Protocol (IMAP) Operation

The Internet Message Access Protocol (commonly known as IMAP) is another protocol that describes a technique for retrieving email messages from a remote mail server. An IMAP server usually listens on port 143, and IMAP over SSL is assigned port number 993. Unlike POP, when the user connects to an IMAP server, mail copies are downloaded to the client application.

The original messages are reserved on the server until the user explicitly deletes them. Users view copies of the messages in their email client software.

The server stores Incoming email messages in the recipient’s email box. The user retrieves the messages with an email client that uses one of several email retrieval protocols. Most clients support the standard protocols, such as SMTP for sending an e-mail message and POP and IMAP for retrieving email.

The IMAP client can make a file hierarchy on the server to organize and store emails. When a user wants to delete a message, the server synchronizes that command and deletes the message from the mail server.

Differences Between POP, SMTP, and IMAP

The following table summarizes the key differences between POP, SMTP, and IMAP regarding their functions, port numbers, security, email storage, syncing capabilities, offline access, message management, server load, everyday use cases, and examples of applications or services that utilize each protocol.

FeaturePOP (Post Office Protocol)SMTP (Simple Mail Transfer Protocol)IMAP (Internet Message Access Protocol)
PurposeRetrieve emails from a serverSend emails to a server for deliveryAccess emails stored on a server
Port Number11025143 (without SSL/TLS), 993 (with SSL/TLS)
SecurityTypically lacks encryptionCan use encryption (SMTPS)Supports encryption (IMAPS)
Email StorageDownloads emails to a local deviceDoes not store emailsLeaves emails on the server
SyncingGenerally does not sync emails across devicesDoes not sync emailsSynchronizes emails across multiple devices
Offline AccessProvides limited offline access to downloaded emailsDoes not provide offline accessProvides full offline access to emails
Message ManagementLimited capabilities for organizing messagesPrimarily focuses on sending messagesOffers extensive message management features
Server LoadRelatively low as emails are typically removed from the server after retrievalModerate, as it involves transferring emails to different serversRelatively high, as emails are stored and managed on the server
Common Use CasesUsed when internet connectivity is limited or sporadicEssential for sending emails from email clientsPreferred for accessing emails from multiple devices
ExamplesMicrosoft Outlook, Apple MailSendmail, PostfixGmail, Outlook.com, Mozilla Thunderbird