SMTP, IMAP and POP3 – All You Need To Know

SMTP POP3 and IMAP Techhyme

You must have heard about IMAP, SMTP and POP3 quite often. They are TCP/IP protocols that have been in use for email delivery since 1981. Popular Services like Yahoo, Gmail and Outlook use this underlying technology to transact over 100 Billion emails every day.

Simple Mail Transfer Protocol (SMTP)

One of the most popular network services, email is supported by TCP/IP protocol SMTP. It provides system for sending message to other computers and provide a mail exchange between users.

SMTP supports:

  • Sending a message to one or more recipients.
  • Sending message that includes texts,voice, video or graphics.
  • Sending message to users on the network outside the Internet.

SMTP supports sending of email only It cannot pull messages from a remote server on demand. Other protocols, such as the Post Office Protocol (POP) and the Internet Message Access Protocol (IMAP) are specifically designed for retrieving messages and managing mail boxes.

However, SMTP has a feature to initiate mail queue processing on a remote server so that the requesting system may receive any messages destined for it (cf. Remote Message Queue Starting). POP and IMAP are preferred protocols when a user’s personal computer is only intermittently powered up, or Internet connectivity is only transient and hosts cannot receive message during off-line periods.

The overall flow for message creation, mail transport, and delivery may be illustrated as shown. Email is submitted by a mail client (MUA, mail user agent) to a mail server (MSA, mail submission agent) using SMTP on TCP port 587. Most mailbox providers still allow submission on traditional port 25.

From there, the MSA delivers the mail to its mail transfer agent (MTA, mail transfer agent). Often, these two agents are just different instances of the same software launched with different options on the same machine.

Local processing can be done either on a single machine, or split among various appliances; in the former case, involved processes can share files; in the latter case, SMTP is used to transfer the message internally, with each host configured to use the next appliance as a smart host. Each process is an MTA in its own right; that is, an SMTP server.

The boundary MTA has to locate the target host. It uses the Domain name system (DNS) to look up the mail exchanger record (MX record) for the recipient’s domain (the part of the address on the right of @). The returned MX record contains the name of the target host. The MTA next looks up the A record for that name in order to get the IP address and connect to such host as an SMTP client.

Once the MX target accepts the incoming message, it hands it to a mail delivery agent (MDA) for local mail delivery. An MDA is able to save messages in the relevant mailbox format.

Again, mail reception can be done using many computers or just one —the picture displays two nearby boxes in either case. An MDA may deliver messages directly to storage, or forward them over a network using SMTP, or any other means, including the Local Mail Transfer Protocol (LMTP), a derivative of SMTP designed for this purpose.

Once delivered to the local mail server, the mail is stored for batch retrieval by authenticated mail clients (MUAs).

Mail is retrieved by end-user applications, called email clients, using Internet Message Access Protocol (IMAP), a protocol that both facilitates access to mail and manages stored mail, or the Post Office Protocol (POP) which typically uses the traditional mbox mail file format or a proprietary system such as Microsoft Exchange/Outlook or Lotus Notes/Domino. Webmail clients may use either method, but the retrieval protocol is often not a formal standard.

IMAP (Internet Mail Access Protocol)

An Internet standard protocol for storing and retrieving messages from Simple Mail Transfer Protocol (SMTP) hosts. Internet Mail Access Protocol version provides functions similar to Post Office Protocol version 3 (POP3), with additional features as described in this entry.

How It Works

SMTP provides the underlying message transport mechanism for sending e-mail over the Internet, but it does not provide any facility for storing and retrieving messages. SMTP hosts must be continuously connected to one another, but most users do not have a dedicated connection to the Internet.

IMAP4 provides mechanisms for storing messages received by SMTP in a receptacle called a mailbox. An IMAP4 server stores messages received by each user until the user connects to download and read them using an IMAP4 client such as Evolution or Microsoft Outlook Express.

IMAP4 includes a number of features that are not supported by POP3. Specifically, IMAP4 allows users to

  • Access multiple folders, including public folders
  • Create hierarchies of folders for storing messages
  • Leave messages on the server after reading them so that they can access the messages again from another location
  • Search a mailbox for a specific message to download
  • Flag messages as read
  • Selectively download portions of messages or attachments only
  • Review the headers of messages before downloading them

To retrieve a message from an IMAP4 server, an IMAP4 client first establishes a Transmission Control Protocol (TCP) session using TCP port 143. The client then identifies itself to the server and issues a series of IMAP4 commands:

  • LIST: Retrieves a list of folders in the client’s mailbox
  • SELECT: Selects a particular folder to access its messages
  • FETCH: Retrieves individual messages
  • LOGOUT: Ends the IMAP4 session

Post Office Protocol version 3 (POP3)

An Internet standard protocol for storing and retrieving messages from Simple Mail Transfer Protocol (SMTP) hosts.

How It Works

SMTP provides the underlying transport mechanism for sending e-mail messages over the Internet, but it does not provide any facility for storing messages and retrieving them. SMTP hosts must be continuously connected to one another, but most users do not have a dedicated connection to the Internet.

Post Office Protocol version 3 (POP3) provides mechanisms for storing messages sent to each user and received by SMTP in a receptacle called a mailbox. A POP3 server stores messages for each user until the user connects to download and read them using a POP3 client such as Microsoft Outlook 98, Microsoft Outlook Express, or Microsoft Mail and News.

To retrieve a message from a POP3 server, a POP3 client establishes a Transmission Control Protocol (TCP) session using TCP port 110, identifies itself to the server, and then issues a series of POP3 commands:

  • stat: Asks the server for the number of messages waiting to be retrieved
  • list: Determines the size of each message to be retrieved
  • retr: Retrieves individual messages
  • Quit: Ends the POP3 session

After a POP3 client reads a message in its mailbox on a POP3 server, the message is deleted. Primarily because of this, POP3 is being supplanted by Internet Mail Access Protocol version 4 (IMAP4), which offers better support for mobile users. POP3 is supported by Microsoft Exchange Server.

IMAP VS POP:

The main difference, as far as we are concerned here, is the way in which IMAP or POP controls your e-mail inbox.

When you use IMAP you are accessing your inbox on the mail server. IMAP does not actually move messages onto your computer. You can think of an e-mail program using IMAP as a window to your messages on the server. Although the messages appear on your computer while you work with them, they remain on the central mail server.

POP does the opposite. Instead of just showing you what is in your inbox on the U’s mail server, it checks the server for new messages, downloads all the new messages in your inbox onto your computer, and then deletes them from the server. This means that every time you use POP to view your new messages, they are no longer on the central mail server. Figure illustrates these concepts

IMAP makes it easier to view mail from home, work, and other locations Because IMAP leaves all of your messages on the central mail server, you can view these messages from any location with Internet access. This means the U of M e-mail inbox you view from home will be the same one you see at work.

Since POP downloads new messages to your computer and removes them from the server, you will not be able to see those new messages on another computer when you check your inbox. Those messages exist only on the computer that downloaded them using POP.

However, if you use IMAP and create e-mail folders on the server, these folders are accessible from anywhere you read your e-mail using IMAP. If you use POP and create e-mail folders, they are stored locally, and you cannot access these folders from anywhere except the computer on which you created them.

POP can create problems if you alternate between it and IMAP. There is an option in many POP e-mail programs to leave copies of the messages on the server, but this option has complications. When you leave copies of the messages on the server, then access your e-mail using WebMail or another IMAP e-mail client, the POP client may create duplicate messages next time it accesses the inbox; you will see each of the messages more than once, and you will have to clean out (delete) the unwanted ones.

You may also like:

Related Posts

Leave a Reply