Purpose of the smtp protocol. Choosing between IMAP and POP3

This is a simple mail transfer protocol. WITH English language translates as Simple Mail Transfer Protocol . Based on the name, we can conclude that the SMTP server is responsible for sending mailing lists. Its task generally consists of two main functions:

  • checking that the settings are correct and granting permission to the computer that is trying to send email message;
  • sending outgoing message on specified address and confirmation of successful message sending. If delivery is not possible, the server returns a response to the sender with a sending error

Sending email messages, The sender's SMTP server establishes a connection with the server that will receive this message. This “communication” occurs by sending and receiving commands, forming an SMTP session with an unlimited number of SMTP operations. There are three required commands for each operation:

  • determining the return address (MAILFROM)
  • determining the recipient of an email message (RCPT TO)
  • sending message text (DATA)

Determining the address of the sender, recipient and the presence of the contents of the letter is prerequisites, without which the letter will not be sent, even by regular, familiar “paper” mail. What can we say about electronic?


Briefly about the benefits of an SMTP server

  • As already mentioned, the main SMTP purpose server is sending and controlling outgoing mail. A high-quality SMTP server is capable of quickly sending large volumeemail messages, evading ISP restrictions.
  • If you are using an external SMTP server, then safetyemail messages and the percentage of their delivery to the inbox increases significantly.
    Where can I find this external SMTP server? More details about this issue.
  • Email may pass through several SMTP servers before reaching the recipient's mailbox. Due to the risk of spam attacks, providers often prevent sending emails without using an SMTP server. Therefore, users sometimes have problems with sending letters.
    The solution may be to install/integrate a separate external SMTP server, which will also filter outgoing mail messages for spam and viruses.
  • Increasing the security of mailings is also achieved by user authorization which the SMTP server uses: by specifying an individual login and password to connect to the server.
  • And, what is important, the integration of the SMTP server occurs without installing an additional software or other special requirements. You simply specify the basic parameters of the SMTP server in the settings of your email client, and you can start sending mass emails.

If you are planning to do legitimate email marketing, consider using an external SMTP server for security and speed of sending your bulk email campaigns.

This article covers the most commonly used Internet email protocols - POP3, IMAP, and SMTP. Each of them has a specific function and way of working. The content of the article explains which configuration is best suited for the user's specific needs when using an e-mail client. It also reveals the answer to the question of what protocol e-mail supports.

What is POP3?

Protocol Version 3 (POP3) is a standard postal protocol, used to receive email from remote server to your local email client. Allows you to download messages to your local computer and read them even if the user is in offline mode. Please note that if you use POP3 to connect to your account messages are downloaded locally and deleted from the email server.

By default, the POP3 protocol runs on two ports:

    port 110 is an unencrypted POP3 port;

    Port 995 - This should be used if you want to connect to POP3 securely.

What is IMAP?

Internet Message Access Protocol (IMAP) is a protocol for receiving email messages, used to access email on a remote web server from local client. IMAP and POP3 are the two most commonly used protocols for receiving emails and are supported by all modern email clients and web servers.

The POP3 protocol means that your email address is accessible only from one application, while IMAP allows simultaneous login from several clients at once. That's why IMAP fits better if you are going to access your email from different places or if your posts are managed by multiple users.

The IMAP protocol runs on two ports:

    port 143 is the default unencrypted IMAP port;

    port 993 - this must be used if you want to connect securely using IMAP.

What is SMTP?

The protocol is a standard protocol for sending email over the Internet.

SMTP operates on three ports:

    port 25 is unencrypted by default;

    port 2525 - this is opened on all SiteGround servers if port 25 is filtered (for example by your ISP) and you want to send unencrypted emails using SMTP;

    port 465 - This is used if you want to send messages securely using SMTP.

What protocols are used to exchange email? Concepts and terms

The term email server refers to the two servers required to send and receive emails, i.e. SMTP and POP.

The incoming mail server is the server associated with your email address account. It cannot have more than one incoming mail server. To access incoming messages, you need an email client—a program that can receive email from an account, allowing the user to read, forward, delete, and reply to messages. Depending on your server, you may be able to use a dedicated email client (eg. Outlook Express) or web browser. So, Internet Explorer used to access email-based accounts. Messages are stored on the incoming mail server until it is downloaded. Once you have downloaded your mail from the mail server, you cannot do it again. To successfully download data, you must enter correct settings in an email program. Most incoming mail servers use one of the following protocols: IMAP, POP3, HTTP.

Outgoing mail server (SMTP)

This is a server used only for sending letters (to transfer them from your mailbox). client program to the receiver). Most outgoing mail servers use Protocol) to send correspondence. Depending on your network parameters The outgoing mail server may belong to your ISP or the server where you set up your account. Alternatively, you can use a subscription-based SMTP server that will allow you to send emails from any account. Due to spam issues, most outgoing email servers do not allow you to send emails unless you are logged into their network. A server with an open relay will allow you to use it to send emails, no matter whether you belong to it network group or not.

Email Ports

For networks, port means end point logical connection. The port number determines its type. The following are the default email ports:

    POP3 - port 110;

    IMAP - port 143;

    SMTP - port 25;

    HTTP - port 80;

    secure SMTP (SSMTP) - port 465;

    secure IMAP (IMAP4-SSL) - port 585;

    IMAP4 over SSL (IMAPS) - port 993;

    Secure POP3 (SSL-POP) - port 995.

Email protocols: IMAP, POP3, SMTP and HTTP

Basically the protocol refers to standard method, used at each end of the communication channel. To deal with email, you must use a special client to access the mail server. In turn, they can exchange information with each other using completely different protocols.

IMAP protocol

IMAP (Internet Message Access Protocol) is a standard protocol for accessing email from your local server. IMAP is a client/server protocol in which email is received and data is stored by your Internet server. Since it only requires a small data transfer, it works well even with slow connection, for example, when connecting using a modem. When attempting to read a particular email message, the client downloads data from the server. You can also create and manage folders or mailboxes on the server, and delete messages.

POP3 protocol

POP (Post Office Protocol 3) e-mail provides a simple, standardized way for users to access their mailboxes and download messages to their computers.

When using the POP protocol, all your email messages will be downloaded from the mail server to your local computer. You can also leave copies of your emails on the server. The advantage is that after downloading your messages, you can disconnect your Internet connection and read your email at your leisure without incurring additional communication charges. On the other hand, with this protocol you receive and download a lot unwanted messages(including spam or viruses).

SMTP protocol

The protocol is used by a mail transfer agent (MTA) to deliver electronic messages to specific server recipient. SMTP can only be used to send emails, not to receive them. Depending on your network or ISP settings, you may only be able to use the SMTP protocol under certain conditions.

HTTP protocols

HTTP is not a protocol designed for email communication, but it can be used to access your mailbox. It is also often called web email. It can be used to compose or receive emails from your account. Hotmail - good example using HTTP as an email protocol.

Managed File Transfers and Network Solutions

Your ability to send and receive email is primarily due to ​three TCP protocols. They are SMTP, IMAP and POP3.

SMTP

Let's start with SMTP because its main function is different from the other two. SMTP, or Simple Mail Transfer Protocol, is primarily used for sending email from an email client (such as Microsoft Outlook, Thunderbird or Apple Mail) to your email server. It is also used for relaying or forwarding mail messages from one mail server to another. This is necessary if the sender and recipient have different email service providers.

SMTP, which is specified in RFC 5321, uses port 25 by default. It can also use port 587 and port 465. The latter, which was introduced as the port of choice for secure SMTP (a.k.a. SMTPS), is considered deprecated. But in fact, it is still used by several email service providers.

POP3

Protocol post office, or POP, is used to retrieve email messages from Latest version The one that is widely used is version 3, hence the term "POP3".

POP version 3, specified in RFC 1939, supports extensions and several authentication mechanisms. Authentication features are required to prevent malicious users from accessing user communications.

The POP3 client receives email as follows:

    connects to the mail server on port 110 (or 995 for SSL connections/TLS);

    deletes copies of messages stored on the server;

    disconnects from the server.

    Although POP clients can be configured so that the server can continue to store copies of downloaded messages, the steps described above are common practice.

    IMAP

    IMAP, especially current version(IMAP4), is a more complex protocol. This allows users to group related posts and place them in folders, which in turn can be organized hierarchically. It is also equipped with message flags that indicate whether the message has been read, deleted, or received. It even allows users to search server mailboxes.

    Operation logic (imap4 settings):

    • connects to the mail server via port 143 (or 993 for SSL/TLS connections);

      retrieves email messages;

      serves to connect before closing the mail client application and download messages on demand.

    Please note that messages are not deleted on the server. This can have serious consequences. IMAP specifications can be found in RFC 3501.

    Choosing between IMAP and POP3

    Since the basic function of SMTP is fundamentally different, the choice dilemma better protocol usually only includes IMAP and POP3.

    If server storage space is important to you, then choose POP3. A server with limited memory is one of the main factors that may force you to support POP3. Because IMAP leaves messages on the server, it can consume memory space faster than POP3.

    If you want to access your mail at any time, then it is better to stick with IMAP. There is one good reason why IMAP was designed to store messages on a server. It is used to search for messages from multiple devices - sometimes even simultaneously. So if you have an iPhone, Android tablet, laptop and desktop and you want to read email from any or all of these devices, then IMAP will best choice.

    Synchronization is another advantage of IMAP. If you access email messages from multiple devices, you'll likely want them all to show any activity you've performed.

    For example, if you read messages A, B, and C, you want them to also be marked as read on other devices. If you deleted emails B and C, you'll want those same emails deleted from your mailbox on all gadgets. All these synchronizations can only be achieved if you use IMAP.

    Since IMAP allows users to organize messages hierarchically and place them in folders, it helps users better organize their correspondence.

    Of course, everything functionality IMAPs come at a price. These solutions are more difficult to implement and the protocol ends up consuming a lot more CPU and RAM, especially when it performs the synchronization process. Actually high load CPU and memory drain can happen on both the client and server side if there are a ton of messages to sync. From this point of view, the POP3 protocol is less expensive, although less functional.

    Privacy is also one of the issues that will greatly depend on end users. They would generally prefer to download all email messages and not leave copies of them on an unknown server.

    Speed ​​is an advantage that varies and depends on the situation. POP3 has the ability to download all mail messages when connected. And IMAP can, if necessary (for example, when insufficient quantities traffic) download only message headers or specific parts and leave attachments on the server. Only when the user decides that the remaining parts are worth downloading will they become available to him. Therefore, IMAP can be considered faster.

    However, if all messages on the server must be downloaded every time, then POP3 will be much faster.

    As you can see, each of the described protocols has its own advantages and disadvantages. It's up to you to decide which features or capabilities are more important.

    Also desired method access to the e-mail client determines the preferred protocol. Users who only work from one machine and use webmail to access their new emails will appreciate POP3.

    However, users who share mailboxes or access their emails with different computers, will prefer IMAP.

    Spam firewalls with SMTP, IMAP and POP3

    Most spam firewalls only deal with and protect the SMTP protocol. Servers send and receive email SMTP mail, and they will be checked by the spam firewall on the gateway. However, some spam firewalls provide the ability to protect POP3 and IMAP4 when external users need these services to access their email.

    SMTP firewalls are transparent to end users; There are no configuration changes for clients. Users still receive and send email messages to the email server. Thus, Exchange or Dominos must configure routing of messages to the firewall based on the proxy server when sending email, and also provide the ability to send emails from the firewall.

For several decades, Internet users have been using email to exchange messages and letters. Until the early 90s of the last century, electronic messages were used, as a rule, by employees of large organizations. With extensive computerization and distribution world wide web, emails have become a part of the lives of ordinary users.

The development of Internet technologies has led to the emergence of so-called mail protocols used for network correspondence. They make it possible to process large letters, providing users with all kinds of services.

It is not constrained by any specific data transmission subsystems. Its operation requires only a reliable channel for the flow of their transmission while maintaining order.

SMTP is used mainly for sending letters and user requests to the server, after which mail is sent to recipients. In order to receive letters, you need your mail client to work on the IMAP or POP3 protocol.

What is it used for?

This is the standard mail protocol today. All mail programs and servers use it.

Virtual website hosting for popular CMS:

The principle of operation of the protocol.

SMTP is a text protocol, its operating principle requires a connection through which the user sending the email contacts its recipient using a specific command line. And data is received through the use of a reliable communication channel. Typically, this communication channel is a TCP connection.

The working session of the protocol consists of sent mail - SMTP client a number of commands and server responses to them. During a work session, both the client and the server exchange the necessary parameters.

A protocol operation includes a combination consisting of the following sequences of commands and responses:

  • MAIL FROM command - indicates the return email address;
  • RCPT TO command - determines the recipient of a specific letter;
  • DATA is the command responsible for sending the text of an email message. This is the body of the letter, which includes the header and body of the letter, separated by an empty line.

The initial SMTP client may well be the recipient's email client, or a mail transfer agent on the server.

How other mail protocols work.

SMTP is just a protocol for delivering correspondence on the network. He cannot, on command, take an email message from a remote server or somehow manage an email box.

There are other protocols for this, such as IMAP and POP. Their use is preferable when connecting to a network temporarily or when the PC is turned on periodically.

POP.

Post Office Protocol is a simple network protocol that includes three flavors: POP, POP2 and POP3. They are designed to deliver correspondence to the user from a central mail server, to delete mail from the server, and to identify the user. A combination of login and password is used for identification. It is worth noting that all three protocols are not interchangeable.

The protocol includes SMTP, which is used to transmit outgoing mail.

In accordance with POP3, letters arriving at a specific e-mail are stored on the server until they are downloaded to the PC during the next session. Once the download has occurred, it becomes possible to read the messages while disconnecting from the network. POP3 is considered to be the fastest mail protocol.

IMAP.

WITH using the Internet Message Access Protocol It becomes possible to store messages in file directories on the server and search for any message strings directly there.

This protocol Suitable for those users whose computers use a continuous Internet connection. It differs from POP in that when new messages are scanned, only their headers are downloaded.

Today we will tell you in detail about the most used Internet protocols - POP3, IMAP and SMTP. Each of these protocols has a specific purpose and functionality. Let's try to figure it out.

POP3 protocol and its ports

Post Office Protocol 3 (POP3) is a standard mail protocol designed for receiving emails from a remote server to an e-mail client.POP3 allows you to save an email message to your computer and even read it if you are offline. It is important to note that if you choose to use POP3 to connect to your mail account, emails that have already been downloaded to your computer will be deleted from the mail server. As an example, if you are using several computers to connect to one mail account, then POP3 may not be the best choice in this situation. On the other hand, since mail is stored locally, on a specific user’s PC, this allows optimization disk space on the mail server side.

By default, the POP3 protocol uses the following ports:

  • Port 110 is the default POP3 port. Not safe.
  • Port 995 – This port should be used if you want to establish a secure connection.

IMAP protocol and ports

Internet Message Access Protocol (IMAP) is an email protocol designed for accessing mail from a local email client. IMAP and POP3 are the most popular protocols on the Internet used for receiving e-mail. Both of these protocols are supported by all modern mail clients (MUA - Mail User Agent) and WEB servers.

While POP3 allows mail access from only one application, IMAP allows access from multiple clients. For this reason, IMAP is most adaptable in cases where multiple users need access to the same email account.

By default, IMAP protocol uses the following ports:

  • Port 143– default port. Not safe.
  • Port 993– port for secure connection.
SMTP protocol and its ports

Simple Mail Transfer Protocol (SMTP) is a standard protocol for sending mail messages via the Internet.

This protocol is described in RFC 821 and RFC 822, first published in August 1982. Within the scope of the RFC data, the address format must be in the format username@domainname. Mail delivery is similar to regular work postal service: for example, a letter to the address [email protected], will be interpreted as follows: ivan_ivanov is the address, and merionet.ru is postal code. If domain name the recipient's domain name is different from the sender's domain name, then the MSA (Mail Submission Agent) will send the letter through the Mail Transfer Agent (MTA). The main idea of ​​MTA is to redirect letters to another domain zone, similar to how traditional mail sends letters to another city or region. An MTA also receives mail from other MTAs.

The SMTP protocol uses the following ports.

For the exchange of information between computers, standards for the transmission and processing of information were developed, which were called network protocols. The most common protocols are IP, ICMP, TCP, UDP, SMTP, POP/POP3, IMAP, HTTP/HTTPS and FTP, but there are others, less well known, such as SSH, TELNET and others.

For two people to speak, they must speak the same language. However, they do not need to strictly adhere to grammar and formal language structures in order to understand each other. To exchange information between computers, everything must be clearly defined and structured. Therefore, transmission and processing standards should be used various types information. The protocols are established by international agreement and guarantee the exchange of information between any computers anywhere. There are many different protocols for different needs and types of information.

IP, ICMP, TCP and UDP

IP (Internet Protocol) and TCP (Transmission Control Protocol) are two completely different protocols that are usually associated with each other. Combinations of several protocols are often used, since the functions of different protocols can be combined in such a way as to obtain a solution to the problem. In combination, each protocol performs operations at its own level.

When transmitting information over the Internet, it is divided into small parts - Internet packets, which are transmitted independently of each other. This significantly speeds up the transfer of information due to the fact that different parts can be transmitted along different routes, after which they are reassembled at the point of receipt into a single whole. This is also a measure to prevent information loss during transmission. The TCP protocol is responsible for creating Internet packets and reassembling them in the required order at the receiving location, and also checks the integrity of the information. If some packets are lost during transmission, they are retransmitted.

Internet Protocol (IP) is used to deliver information over to the right address. Each computer that has an Internet connection has its own unique address - . Each package sent contains a delivery address. An Internet packet may pass through many routers before reaching its destination. The Internet protocol is responsible for routing the packet to the specified computer. IP does not create physical connections between computers. It can be used in conjunction with other protocols that create connections.

To transmit small pieces of information you can use UDP protocol(User Datagram Protocol - user datagram protocol). It is also used in conjunction with the Internet Protocol, but is much simpler than TCP. Unlike TCP, UDP does not guarantee delivery of packets in the required sequence and does not duplicate the transmission of lost packets; accordingly, it consumes less system resources, and the transmission speed is significantly higher. It is used in applications that require large throughput communication lines, or short data delivery time, for example for audio or video communications.

There is a completely different protocol low level– ICMP (Internet Control Message Protocol). It is mainly used for diagnostic or service purposes such as reporting error messages and other exceptional situations problems encountered during data transmission, for example, the requested service is not available, or the host or router is not responding.

Mail protocols – SMTP, POP, IMAP

Sending and receiving email requires its own protocols. Mail is usually sent using SMTP (Simple Mail Transfer Protocol). It is also used to transfer mail between mail servers. When setting up email clients (for example, Outlook Express), you must specify the SMTP server address. Mail clients typically use POP (Post Office Protocol) to receive mail from a Mailbox server. On current moment its third edition (version) is in effect, which is called POP3 (Post Office Protocol Version 3 - post office protocol, version 3). To be able to receive mail when setting up in mail client you must specify the POP3 server address. The SMTP and POP3 server addresses may or may not be the same; they should be checked with your mail provider. The SMTP and POP3 protocols work in conjunction with the TCP protocol to transmit and deliver mail over the Internet.

There is also a more functional, but less known protocol for reading email - IMAP (Internet Message Access Protocol - Internet Email Access Protocol). This protocol allows you to access messages stored in a mailbox on the server without having to download it to your local computer. This is very convenient when you need to access mailbox messages from several computers. IMAP also works in conjunction with TCP protocol.

HTTP and HTTPS protocols

Web pages use hypertext markup language (HTML - HyperText Markup Language). HTML pages transmitted over the Internet using a standard called HyperText Transfer Protocol (HTTP). The basis of HTTP is the client-server technology, that is, the user initiates a connection to the server to request information, and the server waits for the connection to receive the request, processes the request and returns a message with the result. HTTP works in conjunction with the TCP protocol. Addresses using HTTP protocol start with “http:”.

Associated with the HTTP protocol HTTPS protocol(HTTP over TLS - HTTP over TLS). It provides encryption during data transmission to protect confidential information. URLs those using the HTTP protocol begin with “https:”.

File Transfer Protocol – FTP

The File Transfer Protocol (FTP) is designed to transfer files to computer networks from one computer to another. It provides the opportunity simple controls files on remote computer. This is a fairly old protocol that was put into operation before the World Wide Web (WWW - World Wide Web). Currently it is used mainly for uploading files to web servers, but there are also file storages, working via FTP protocol. It works in conjunction with the TCP protocol. URLs using FTP protocol start with “ftp:”.

For simultaneous operation of servers using protocols SMTP, POP, IMAP, HTTP, HTTPS, FTP etc. are not required at all individual computers or IP addresses. All these servers can be installed on one computer with one IP address. This is achieved due to the fact that each protocol uses its own .