Linux online course

Email Protocols: SMTP, POP3, and IMAP

Learn how SMTP, POP3, and IMAP send, retrieve, and store email, including push and pull models, default TCP ports, and practical differences.

Email communication uses different protocols for different stages. SMTP normally transmits outgoing messages, while POP3 and IMAP let a mail client retrieve or access messages in a mailbox.

A mail server is a system that sends, receives, stores, or provides access to email. A mail client is an application used to send, retrieve, read, and manage email. A TCP port is a numbered network endpoint that directs TCP traffic to a particular service.

The Email Delivery and Access Stages

Email delivery and email access are related but separate activities:

  1. A sender's mail client or mail system submits an outgoing message.
  2. Mail servers use SMTP to transmit and relay the message toward the recipient's mail server.
  3. The recipient's message is stored in a mailbox on that server.
  4. The recipient's mail client uses POP3 or IMAP to retrieve or access the mailbox.

This distinction is important. SMTP handles transmission toward a mail server, whereas POP3 and IMAP handle a user's access to messages held by a mail server.

Common Email Protocols

ProtocolFull namePrimary purposeCommunication modelDefault transportDefault TCP port
SMTPSimple Mail Transfer ProtocolSend and relay emailPushTCP25
POP3Post Office Protocol version 3Retrieve email to a clientPullTCP110
IMAPInternet Message Access ProtocolAccess and manage email on a serverPullTCP143

SMTP: Sending and Relaying Email

SMTP stands for Simple Mail Transfer Protocol. It is an Internet standard for transmitting outgoing email, especially between mail servers.

SMTP is a push protocol. In a push model, the sending system starts the transfer. When a sender submits a message, the sender's mail system initiates an SMTP connection and attempts to transmit the message toward the recipient's mail server.

For example, when Alice sends a message to Bob, Alice's mail system uses SMTP to send the message to the appropriate mail server. SMTP can then be used between mail servers to relay the message until it reaches the server that stores Bob's mailbox.

The default SMTP service uses TCP port 25. Port 25 is the standard port to remember for server-to-server SMTP transmission in this introductory model.

SMTP: outgoing transmission and server-to-server relay
Default transport: TCP
Default port: 25

POP3: Downloading Mail to a Client

POP3 means Post Office Protocol version 3. It is used by a local mail client to retrieve messages from a remote mail server.

POP3 is a pull protocol. The receiving mail client initiates the connection and requests messages from the server. Its typical model is download-oriented: messages are transferred to the local computer and are commonly removed from the server afterward.

A POP3 client may provide an option to leave copies of downloaded messages on the server. This changes the default retention behavior, but it does not turn POP3 into a synchronized, server-centered mailbox system.

The default POP3 service uses TCP port 110.

POP3: client retrieves messages for local storage
Default transport: TCP
Default port: 110

POP3 Example

A desktop client connects to a remote mailbox using POP3 and requests new messages. The messages are downloaded to the desktop. If the client is configured to delete messages after download, another device may not find them on the server. If the client is configured to retain copies, the server keeps those copies, although mailbox state is not generally managed as a centrally synchronized workspace.

IMAP: Accessing a Server-Hosted Mailbox

IMAP stands for Internet Message Access Protocol. It lets a local mail client access and manage messages held in a remote mailbox.

IMAP is also a pull protocol: the client initiates access or retrieval. Unlike the typical POP3 download model, IMAP normally keeps messages on the mail server until the user explicitly deletes them.

Because the mailbox remains server-centered, a laptop, phone, and other clients can access the same collection of messages. Actions such as reading, organizing, or deleting mail can be managed against the mailbox on the server, subject to the features supported by the client and server.

The default IMAP service uses TCP port 143.

IMAP: client accesses and manages server-hosted messages
Default transport: TCP
Default port: 143

IMAP Example

A user opens the same mailbox from a laptop and a phone. Both clients use IMAP to access messages that remain on the mail server. The user can work with the same server-hosted mailbox from both devices instead of relying on one device to hold the only downloaded copy.

Push Versus Pull Communication

The terms push and pull describe which side starts a transfer or access request.

  • Push: The sending system starts the transfer. SMTP uses this model when a mail system transmits an outgoing message.
  • Pull: The receiving client starts the request. POP3 and IMAP use this model when a mail client asks to retrieve or access mailbox messages.

In an email workflow, SMTP is associated with the sending stage. POP3 and IMAP are associated with the receiving user's access stage. The recipient's mail client does not normally use POP3 or IMAP to make the original server-to-server delivery; it uses one of them to access the mailbox after delivery.

POP3 and IMAP Compared

FeaturePOP3IMAP
Typical message location after retrievalDownloaded to the local computer; often removed from the server unless retention is enabledRemains on the server until explicitly deleted
Multi-client mailbox useLess suitable for shared, synchronized mailbox accessSupports multiple clients managing the same server mailbox
Transfer initiationClient pulls messagesClient pulls or accesses messages

Choosing Between POP3 and IMAP

  • POP3 suits a primarily single-device workflow when the user wants messages downloaded for local use and may not need a central mailbox.
  • IMAP suits a multiple-client workflow when a laptop, phone, or other clients need access to the same server-hosted mailbox.
  • POP3's server retention depends on the client's configuration. Do not assume that downloaded mail remains on the server.
  • IMAP's server-centered model makes the server mailbox the main location for messages and mailbox management.

Practical Email Workflows

Sending an Email

  1. The sender composes a message in a mail client.
  2. The sender's mail system initiates an SMTP transfer.
  3. SMTP carries the message toward and, where needed, between mail servers.
  4. The recipient's mail server stores the message in the recipient's mailbox.
  5. The recipient later uses POP3 or IMAP to access the message.

Checking Mail with POP3

The mail client connects to the server on TCP port 110, requests available messages, and downloads them. Depending on its settings, it may remove the downloaded messages from the server or leave copies behind.

Checking Mail with IMAP from Multiple Devices

The clients connect to the server on TCP port 143 and access the server-hosted mailbox. Since messages normally remain on the server, multiple devices can work with the same mailbox.

Troubleshooting by Protocol

A Client Cannot Retrieve Mail

  • Verify that the client is configured for the intended protocol.
  • For POP3, check reachability of the service on TCP port 110.
  • For IMAP, check reachability of the service on TCP port 143.
  • Confirm that the mail server actually offers the selected retrieval protocol.

Messages Appear on One Device but Not Another

  • Determine whether POP3 is downloading and deleting messages from the server.
  • Check whether the POP3 client is configured to leave copies on the server.
  • Consider IMAP when multiple clients need access to the same server-hosted mailbox.

Outgoing Mail Cannot Be Transmitted Between Mail Systems

  • Confirm that SMTP is being used for outgoing mail transfer.
  • Check reachability of the SMTP service on TCP port 25 where applicable.

Exam-Ready Summary

  • SMTP means Simple Mail Transfer Protocol and sends or relays outgoing email.
  • SMTP is a push protocol because the sending system initiates transmission.
  • SMTP's default TCP port is 25.
  • POP3 means Post Office Protocol version 3 and retrieves messages to a local client.
  • POP3 is a pull protocol because the receiving client initiates retrieval.
  • POP3 commonly downloads messages and may remove them from the server; clients can be configured to retain copies.
  • POP3's default TCP port is 110.
  • IMAP means Internet Message Access Protocol and accesses and manages messages on a remote server.
  • IMAP is a pull protocol and normally keeps messages on the server until deletion.
  • IMAP's default TCP port is 143.