imap options. POP3 and IMAP: history of mail protocols and collection of letters via IMAP in Yandex.Mail

Everyone knows how to work with email. We open the browser, look for the required resource, log in and read the incoming email correspondence. The pop3 and imap mail protocols allow you to work with mail without a browser, through client programs, as if the files were located directly on the local computer.

Understanding POP3 and IMAP

POP3 is an application-level Internet protocol that provides access to the mail server via TCP/IP and using port 110.
IMAP is an application-level Internet protocol that provides access to the mail server via TCP and using port 143.

Difference between POP3 and IMAP

The difference between POP3 and IMAP is application-specific. Both protocols perform identical tasks, only POP3 allows you to download all files at once (correspondence is stored in these files), and IMAP first allows you to download a list of files and then selectively download them yourself. This is the main difference between the protocols, and the newer IMAP was created precisely to implement this difference: clients were not satisfied with the need to parse mail locally, while on the server the files were deleted after downloading. On IMAP servers, the user manages his messages independently.
pop3 clients connect to the network only to download files to local computer, are turned off after the operation is completed and further work of the programs takes place in offline mode. IMAP clients can work offline, but online provides more options for them: for example, managing messages on the server. As a result, offline access requires fewer resources and is faster, while online access is more dependent on network conditions and exhibits a relatively long response time.
POP3 assumes monouser access to a mailbox, IMAP allows multiple clients to connect to it, while the work of any of them is not limited, and everyone sees the changes made by others. IMAP also allows the user to see the status of messages, move them, create folders and delete them as if he were dealing with a local copy. Automatic removal There are no messages from the server.
Another important difference between IMAP and POP3 is the ability to extend the IMAP protocol and ultimately receive fine tuning, for example, client access rights to the server. Despite the fact that POP3, due to its longevity, is more widespread and easier to configure, IMAP seems more convenient when solving many problems, for example, corporate ones.

TheDifference.ru determined that the difference between IMAP and POP3 is as follows:

IMAP uses port 143, POP3 uses port 110.
IMAP works both online and offline, POP3 works only offline.
IMAP allows you to manage messages directly on the server, POP3 downloads files to the user's local computer.
POP3 provides more fast access
In IMAP, you can configure the separation of access rights.

Using IMAP and POP protocols, you can download emails from mail servers to your computer and access them using email clients such as Microsoft Outlook, Mozilla Thunderbird, etc. The main advantage of this technology is that you can access your email through without going to the website of the service itself.

Difference between IMAP and POP.

IMAP and POP are two different protocols. There are many differences between them. The main difference is that IMAP (Internet Messaged Access Protocol) is always synchronized with the mail server, so that any changes made in the mail client (Microsoft Outlook, Thunderbird) will immediately appear in your mailbox.

On the other hand, in POP (Post Office Protocol), the account Email mail client and mail server are not synchronized. This means that changes made to account emails in the mail client will not be transferred to the mailbox.
How to enable these protocols

Various postal services have various settings for working with protocols. In Gmail, you can find options to enable both POP and IMAP protocols (go to Settings -> Forwarding and POP/IMAP). In , POP is only present and it does not support IMAP.

Here is a screenshot from Gmail POP/IMAP settings.

IMAP

The biggest advantage of using IMAP is that you can access mail from multiple email clients and each client detects changes in real time. Let's say a mail server is connected to two different mail clients (say Client 1 Client 2) on different computers. If a user deletes a message in email client 1, the change will be displayed on mail server, as well as directly on the mail client 2. In IMAP, all messages from mail clients and servers are synchronized with each other.

POP

You can download emails from a mail server to a computer using the POP protocol. Once downloaded, the original message is deleted from the server and hence you cannot access from another computer (Note: Gmail has the option to save a copy of the mail in your mailbox, also provides the option to leave messages on the server until you delete them). But there are many other email clients where this function missing (for example. If you send a message from an email client, then you will not find this message in the sent items in your mailbox).

What's better? POP or IMAP?

It's better to use IMAP. This is because IMAP offers two connection methods. Changes are synchronized with the server and you don't have to worry about changes in your mailbox.

Everyone knows how to work with email. We open the browser, look for the required resource, log in and read the incoming email correspondence. The pop3 and imap mail protocols allow you to work with mail without a browser, through client programs, as if the files were located directly on the local computer.

Definition

POP3 is an application-level Internet protocol that provides access to the mail server via TCP/IP and using port 110.

IMAP is an application-level Internet protocol that provides access to the mail server via TCP and using port 143.

Comparison

The difference between POP3 and IMAP is application-specific. Both protocols perform identical tasks, only POP3 allows you to download all files at once (correspondence is stored in these files), and IMAP first allows you to download a list of files and then selectively download them yourself. This is the main difference between the protocols, and the newer IMAP was created precisely to implement this difference: clients were not satisfied with the need to parse mail locally, while on the server the files were deleted after downloading. On IMAP servers, the user manages his messages independently.

pop3 clients connect to the network only to download files to the local computer, disconnect after the operation is completed, and further program operation takes place in offline mode. IMAP clients can work offline, but online provides more options for them: for example, managing messages on the server. As a result, offline access requires fewer resources and is faster, while online access is more dependent on network conditions and exhibits a relatively long response time.

POP3 assumes monouser access to a mailbox, IMAP allows multiple clients to connect to it, while the work of any of them is not limited, and everyone sees the changes made by others. IMAP also allows the user to see the status of messages, move them, create folders and delete them as if he were dealing with a local copy. Messages are not automatically deleted from the server.

Another important difference between IMAP and POP3 is the ability to expand the IMAP protocol and ultimately obtain fine-tuning, for example, client access rights to the server. Despite the fact that POP3, due to its longevity, is more widespread and easier to configure, IMAP seems more convenient for solving many problems, for example, corporate ones.

Conclusions website

  1. IMAP uses port 143, POP3 uses port 110.
  2. IMAP works both online and offline, POP3 works only offline.
  3. IMAP allows you to manage messages directly on the server, POP3 downloads files to the user's local computer.
  4. POP3 provides faster access
  5. In IMAP, you can configure the separation of access rights.

It is unlikely that there is at least one person actively using the Internet who does not have an email. Indeed, having an e-mail makes it easier to maintain correspondence, and is also a prerequisite for using many virtual services - from social networks before registering on the site or subscribing to its updates.

If he talks about using e-mail for its intended purpose, then all you need to do is open any browser, go to the postal service website and log in to read new letters. But it is also possible to view correspondence without a browser - using a special email client. And for this, 2 mail protocols are used - IMAP and POP3.

How is POP3 different from IMAP?

The technical difference between the POP3 and IMAP protocols is generally not significant. Both of them are application layer Internet protocols using ports 110 and 143 respectively to access the server via TCP/IP. The purpose of the protocols is actually the same, but they perform it in several ways. different ways. And in order to more accurately understand how POP3 differs from IMAP, you need to understand in more detail the principle of their operation.

Working with POP3 protocol email clients allow you to simultaneously download files from a mail server, while they connect to the network just for this purpose. This means that further work with electronic correspondence occurs without using the network.

Email clients that use the IMAP protocol can work without a network connection, but access to it greatly expands their capabilities. As a result, the client can independently choose which letters need to be downloaded to the local machine, whereas when using the POP3 protocol, all letters are downloaded, after which unnecessary ones are deleted.

Due to the fact that the POP3 client only downloads files, and further work is carried out offline, it works a little faster. The IMAP client requires more resources because it is online. It is also worth noting another significant difference between POP and IMAP, for which many email services, including Yandex, prefer the latter - multi-user mode. The IMAP protocol allows multiple clients to connect to the server, while POP3 only allows single-user mode.

So let's summarize what are the differences between IMAP and POP3:

  • they use different ports to work with the server - 110 for POP3 and 143 for IMAP;
  • POP3 works only in offline mode, IMAP can work both offline and online;
  • to work with files and messages using the POP3 protocol, you need to download them to your local computer, but IMAP allows you to work with them directly on the server;
  • POP3 has faster server access than IMAP;
  • IMAP allows you to configure the separation of access rights, while POP3 does not have this option.

Now you know the difference between POP and IMAP. In conclusion, it is worth noting that this moment The POP3 protocol is more common on the network due to its ease of configuration. However, IMAP is rapidly gaining popularity, primarily when dealing with electronic correspondence using mobile devices. In general, many email services combine the use of these protocols, depending on the needs of the client and the device he is using.

When you communicate on the Internet for many months and years, you end up with a lot of letters, and that’s hundreds of megabytes and gigabytes of correspondence and files. Often these are not just useful files, they can be used to remember and restore life milestones. This data is more valuable than the contents of the local computer disk.

Sometimes the task arises of switching to a new and more convenient mail system, but the accumulated archives of letters get in the way. Throw them in the same place? It's a pity. Passwords are forgotten. It happens that mobile numbers and email addresses entered to restore them are lost. One day you may lose your archives forever. Download to local HDD? Copy to a disc or flash drive? But they are unreliable: they break, get lost, deteriorate.

The most logical solution is to import the mail archive into a new mailbox. But it is not enough to do this once, because important letters may continue to arrive in the old mailbox. You can set up unconditional redirection of all incoming mail to another address, and from a technical point of view this is the most preferable option. But we are not robots, and a technically economical solution is not always convenient to use.

For a long time the only way transfer of a mail archive between mail systems with constant background synchronization of new letters was the POP3 protocol. The ability to collect mail from external POP3 servers is implemented everywhere and well. In any case, as good as the protocol allows, and it has a lot of unpleasant limitations.

POP3 dates back to 1984, when one of the employees of the Computer Science Institute at the University of Southern California, Joyce Reynolds, published RFC 918, a proposal for a standard protocol for receiving email (POP - Post Office Protocol). Four years later, the third edition of the POP protocol appeared, and the current, modern version of the POP3 standard was published in the spring of 1996, almost 17 years ago.

An important principle of POP3 is optimization for short connections to the mail server in conditions of expensive and slow communication. Initially, within each connection, it was supposed to download all letters from the mailbox to a local disk, and then clear all the contents of the mailbox. Your mailbox for letters and newspapers at the entrance of an apartment building works in exactly the same way. The first version of POP didn't even have commands to read individual emails, only to download everything completely.

Now it’s hard to imagine that the emails weren’t stored on servers. They were downloaded to the local computer at the first opportunity and read, sorted by recipient, topic and importance locally.

It is interesting that the POP2 protocol provided the ability to work with several folders on the server, but it turned out to be unclaimed, and the protocol itself did not receive distribution. Therefore, in POP3 the FOLD command, which implemented this feature, was removed. POP2 was ahead of its time.

Now in POP3 there is no way to download a folder structure from the server, only a “flat” list of letters, consisting, as a rule, of either incoming letters or a combination custom folders. Read and importance flags cannot be taken into account. Despite these limitations, the protocol is still widely used, mainly due to its simplicity and very wide support across all devices.

There have been many attempts to improve POP3, but none have been as successful as the IMAP protocol, which has developed almost in parallel since 1985. The history of IMAP is also quite interesting. For example, the first implementation was made in Lisp, and its legacy remains forever in the protocol in the form of S-expressions, which encode complex server responses such as BODYSTRUCTURE.

The author and ideologist of IMAP, Mark Crispin, laid down the principle of permanent storage of letters on the mail server. IMAP turned out to be one of the early “cloud” Internet protocols, designed to local storage not reliable on a personal computer. In addition, a person may have several personal computers and other terminals for working with mail - basic things for us today.

The latest version of IMAP, 4rev1, is described in RFC 3501, which was released in 2003. Despite its apparent age, the protocol turned out to be alive thanks to the extension mechanism provided at the early stages. This mechanism, of course, is also not without its drawbacks, but nevertheless, it allowed to different people release more than fifty public extensions, many of which were developed very recently and have found widespread use.

A modern mail system without support for IMAP access is nonsense. For several years, Yandex.Mail has supported IMAP as a server for working with such popular client programs like Outlook, Thunderbird, Apple Mail, as well as numerous mobile clients. By the way, it was thanks to smartphones that IMAP received a second wave of development. If on personal computers For quite some time now, the vast majority of users have opted for a web interface for their mail, then with mobile devices The situation is not like that at all. Fast and beautiful IMAP clients, for example in iOS, are forcing us to reconsider the approach to IMAP as the choice of exclusively professional and “advanced” users.

Recently, Yandex.Mail also added an IMAP client function - a mail collector with external servers via IMAP - in addition to the POP3 collector.

The function requires virtually no configuration and is designed to work in the background after the first activation. When collecting mail via IMAP, due to the protocol features described above, in your mailbox you will see the folder structure that you were used to when using your previous mail system. All read messages will remain read, and unread messages will remain unread.


You can enable collection of folders in Yandex.Mail from all mail systems that support the IMAP protocol. The protocol is not simple, each IMAP server implementation has its own quirks, and it was important for us to first handle the most widespread option of switching from old mail to new.

As before, in addition to the letters themselves, contacts from the address books of the most common email services are imported.

The IMAP protocol is noticeably more complex than POP3, both simply in terms of the set of capabilities and commands, and in some basic operating principles. For example, IMAP uses tagging of client commands and server responses to those commands, which allows the server to respond to commands in a random order.

Each command must be preceded by some identifier - a tag, which will then be used by the server when generating a response to this command. This allows the “conversation” between the client and the server to be completely asynchronous - the server has the right to respond to the client’s commands in any order, since tags make it possible to unambiguously match the response to a previously issued command. Moreover, the server can execute such commands simultaneously, speeding up the speed of working with mail, and Yandex.Mail can use this. At the same time, this requires a special approach to programming both the client and the server. If at this point you remembered the sequence numbers mechanism in TCP, then write yourself a +1 in geek cred :)

To implement an IMAP collector inside Yandex.Mail, we used our asynchronous framework for writing any high-performance network services, which is called yplatform. Bye source is closed, although we are considering publishing it. Follow the news.

Go to Yandex.Mail, set up an IMAP collector - and you will always be able to find any old letter. Surely Yandex knows how to search.