Email protocols. Abstract Postal protocols. Mail servers Mail server addresses and protocols used

Types of paints for facades

Without the SMTP, POP3 and IMAP protocols, email cannot work. The peculiarity of these protocols is their narrow focus. This means that they are fundamentally impossible to use for other purposes, which, moreover, makes no sense. The task of SMTP, POP3 and IMAP is to organize the exchange of electronic messages, and they cope with it very well. Another feature of mail protocols is unambiguity. For example, a protocol that sends messages is not capable of receiving them, and vice versa. That is why such protocols work in pairs.

SMTP

SMTP (Simple Mail Transfer Protocol) is a protocol whose main task is to send messages prepared in a special way. Before doing this, the protocol establishes a connection between computers, which guarantees the delivery of the message. The SMTP protocol is very simple and effective, but this efficiency does not apply to all tasks and capabilities. Thus, it does not have even the simplest authentication mechanism and the ability to encrypt data when transferred between mail servers. The biggest disadvantage of SMTP is its inability to send graphics.

In order not to abandon this rather good protocol, it was decided to expand it with several useful and necessary extensions. Such an extension, for example, is MIME (Multipurpose Internet Mail Extensions), thanks to which it is possible to send files of any format and content . In addition, the UUENCODE standard has been developed, which allows you to transmit text messages in different encodings. ESMTP (Extended SMTP) is a scalable extension of the SMTP protocol. Currently, the “SMTP protocol” usually refers to ESMTP and its extensions.

PORZ

P0P3 (Post Office Protocol 3, mail protocol version 3) is a mail protocol that is used to receive electronic messages from a mail server. Typically, POP3 works in tandem with the SMTP protocol, which allows you to organize an effective system for sending and receiving electronic messages. The protocol interface is even simpler than the SMTP interface, and this comes with certain inconveniences. Thus, there is no possibility of selectively downloading a letter or viewing the contents of a letter directly on the mail server.

IMAP

IMAP (Interactive Mail Access Protocol) is the most advanced email protocol designed for receiving email messages from a mail server. In most cases, it is more convenient and efficient to use the IMAP protocol than POP3. The advantages of the protocol include the possibility of partially downloading a letter, breaking a received letter into parts and then gluing it together, and much more. The user is given the opportunity to manage messages directly on the server without downloading them to the computer.

Electronic mail and postal protocols.

Email is a delayed reading service, a service for sending files with text or multimedia information. Mail can be used:

· for correspondence between subscribers;

· for organizing teleconferences;

· to organize mailing lists;

· for access to file archives and databases.

Email is based on the X.400 protocol, which defines the Internet addressing system. The address system is based on domain symbolic addresses. The mailing address consists of two parts: the user ID before the "@" sign and the domain address of the machine after the sign. The combination of name and domain forms a unique user identifier.

The Internet uses a number of application-level mail protocols, for example:

1. SMTP (Simple Mail Transfer Protocol) - to send messages;

2.POP3 (Post Office Protocol Version 3) - for sending/receiving messages;

3.IMAP (Interactive Mail Access Protocol) - for sending/receiving messages.

Mail clients are used to work with mail. For processing and forwarding mail - mail server programs, for example, the sendmail mail sending program, which sorts mail and sends it to recipients.

The main application layer mail protocol in the stack is SMTP, which uses the TCP transport protocol. Also used along with this protocol is the Unix-Unix-CoPy (UUCP) protocol. When using the first protocol, sendmail tries to find a recipient and communicate with him in order to transmit mail. When using UUCP, mail is transmitted through a chain of mail servers from one machine to another until it reaches the recipient machine or is rejected due to its absence.

The SMTP protocol can operate in direct message mode. In this case, the message will be sent directly to the user terminals. The protocol also allows sending email messages in alert mode to several users or to a group address.

The POP3 protocol is designed to parse mail from users' mailboxes and deliver them to their workplaces using client programs. Using the POP3 protocol, users retrieve correspondence from mailboxes on the server to local computers. The protocol is designed to support offline mail processing. To do this, mail is delivered to the server, the user launches an email client, which connects to the server and downloads mail. Mail processing occurs on the local machine, and mail is deleted from the server.

An alternative protocol is IMAP (Interactive Mail Access Protocol). IMAP can be used both for offline access and for online work with a mailbox on the server. The client may not copy mail from the server, but request message headers, search for messages, flag letters in the mailbox for deletion or for reply.

Offline access is suitable for those who use their own client machine. It minimizes the use of server resources and connection time, which is important for remote access via modem. The advantage of online access is that mailboxes with incoming and archive mail are stored on the server and can be accessed from different computers at different times. This is important for those who use several computers, for example, on the go. With IMAP, a client can access and manage multiple mailboxes. This includes the ability to name and access different mailboxes, get a list of them, create, delete and rename them. Mailboxes can be located on different servers. Using the IMAP protocol, the client can see them simultaneously and move messages from one mailbox to another.

The mail message format is defined in RFC-822. A mail message consists of three parts: the envelope, the header, and the body. The user sees only the header and body of the message. The envelope is used by delivery programs and consists of the sender's address, the recipient's address, and mailing information. The header contains addresses, mailing information, and data. The body of an email message contains several ways to present heterogeneous information. For this purpose, special header fields of the mail message are used.

The main feature of email is that information is sent to the recipient not directly, but through an intermediate link - an electronic mailbox, which is a place on the server where the message is stored until the recipient requests it. Access to the mail server can be provided both through mail programs and through the web interface.

One server sends outgoing mail regardless of its origin - it uses the Simple Mail Transfer Protocol (SMTP). Another server receives incoming mail and makes sure it gets to the right recipients. This protocol is called POPZ (Post Office Protocol).

SMTP -- (Simple Mail Transfer Protocol) is a network protocol designed for transmitting email over TCP/IP networks. The protocol was designed to transmit only ASCII text. Glossary clause 14; in addition, the first specifications required that the most significant bit of each byte transmitted be reset to zero. This prevents you from sending text in national languages, or sending binary files. To overcome this limitation, the MIME standard was developed, which describes how binary files are converted to text. Nowadays, most servers support 8BITMIME, which allows you to send binary files.

ESMTP -- (English Extended SMTP, scalable extension of the SMTP protocol). Currently, the “SMTP protocol” usually means SMTP and its extensions. When a connection is established, the server advertises a set of supported extensions. The corresponding extensions can be used by the client during work.

The simplest example of an SMTP session C: - client, S: - server

S: (waiting for connection)

C: (Connects to server port 25)

S:220 mail.company.tld ESMTP CommuniGate Pro 5.1.4i is glad to see you!

S:250 domain name should be qualified

S:250 This e-mail address is being protected from spambots. To see it, you must have JavaScript sender accepted enabled.

S:250 This e-mail address is being protected from spambots. To see it, you must have JavaScript enabled ok

S:550 This e-mail address is being protected from spambots. To see it, you must have JavaScript enabled unknown user account

S:354 Enter mail, end with "." on a line by itself

S:250 769947 message accepted for delivery

S:221 mail.company.tld CommuniGate Pro SMTP closing connection

S: (closes connection)

As a result of such a session, the letter will be delivered to the addressee. This e-mail address is being protected from spambots. To view it, you must have JavaScript enabled, but it will not be delivered to the recipient. This e-mail address is being protected from spambots. To see it, you must have JavaScript enabled because such an address does not exist.

Some SMTP commands

HELO (SP) (string)(CRLF)

Identifies the sender's SMTP server, opens a session (SP) space

Ends the SMTP session.

MAIL (SP) FROM:(reverse-path) (CRLF)

Specifies the sender's address.

RCPT (SP) TO:(forward-path) (CRLF)

Specifies the recipient's address.

Indicates the beginning of a message. The end of the message is indicated by (CRLF).

VRFY (SP) (string)(CRLF)

checks the existence of the recipient.

EXPN (SP) (string)(CRLF)

empty operation

server and client switch roles after server response 200 OK

reset the session to its original state

information about supported commands

Due to spam problems, almost all modern servers ignore the VRFY and EXPN commands as revealing user information.

To solve some problems. An enhanced SMTP protocol, ESMTP, was developed. Clients wishing to use it must begin the communication session by sending the greeting EHLO instead of HELO. If the command is not accepted by the server, it means that the server only supports the regular SMTP protocol and the client should operate in normal mode. If EHLO is accepted, it means that an ESMTP session has been established and it is possible to work with new parameters and commands.

POPZ -- (English Post Office Protocol Version 3, post office protocol, version 3), a network protocol used to receive email messages from a server. Typically used in conjunction with the SMTP protocol. The POP3 protocol provides 3 session states: authorization (the client undergoes the authentication procedure), transaction (the client receives information about the state of the mailbox, accepts and deletes mail), update (the server deletes the selected letters and closes the connection).

To receive mail, an improved IMAP protocol (Internet Mail Access Protocol) has also been developed. It implements additional functions, in particular, messages are stored on the server and downloaded to the computer only for viewing. Messages are managed by the server itself. This protocol is convenient if you need to receive mail from the server on different computers.

Although the POP3 protocol does support the ability to receive one or more emails and leave them on the server, most email processing programs simply download all the emails and empty the mailbox on the server.

Session example

S:<Сервер ожидает входящих соединений на порту 110>

C:<подключается к серверу>

S: +OK POP3 server ready< Этот адрес e-mail защищен от спам-ботов. Чтобы увидеть его, у Вас должен быть включен Java-Script >

C: APOP mrose

S:<сервер передает сообщение 1>

S: +OK message 1 deleted

S:<сервер передает сообщение 2>

S: +OK message 2 deleted

S: +OK dewey POP3 server signing off (maildrop empty)

C:<закрывает соединение>

S:<продолждает ждать входящие соединения>

For a user who has one account with one provider and always connects to the provider from the same machine, the POP3 protocol is quite sufficient. This protocol is widely used due to its simplicity and reliability. But many users have one account at school or at work, but they want to have access to it from home, from their place of work (study), and from different places during a business trip. Although the POP3 protocol allows you to resolve this situation. But the problem is that with this use of email, all the user’s correspondence will very quickly spread across random machines from which he accessed the Internet, and some of these computers may not belong to the user at all.

This inconvenience led to the creation of an alternative protocol for receiving mail, IMAP.

IMAP -- (Internet Message Access Protocol), an application-level Internet protocol for accessing email. IMAP provides the user with rich capabilities for working with mailboxes located on a central server. An email program that uses this protocol accesses the correspondence storage on the server as if the correspondence were located on the recipient's computer. Emails can be manipulated from the user's (client's) computer without the need to constantly transfer files with the full contents of emails back and forth from the server.

IMAP was developed to replace the simpler POP3 protocol and has the following advantages over the latter:

Messages are stored on the server, not on the client. It is possible to access the same mailbox from different clients. Simultaneous access by multiple clients is also supported. The protocol has mechanisms by which a client can be informed of changes made by other clients.

Supports multiple mailboxes (or folders). The client can create, delete and rename mailboxes on the server, as well as move letters from one mailbox to another.

It is possible to create shared folders that can be accessed by multiple users.

Information about the status of messages is stored on the server and is available to all clients. Messages can be marked as read, important, etc.

Server search support. There is no need to download many messages from the server in order to find the one you need.

Support for online work. The client can maintain a constant connection with the server, while the server informs the client in real time about changes in mailboxes, including new letters. A mechanism is provided to expand the capabilities of the protocol.

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 multiple computers to connect to one email 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 you to optimize disk space on the mail server side.

By default, the POP3 protocol uses the following ports:

  • Port 110 is the default POP3 port. It is 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, the 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 the work of a regular 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 the postal code. If 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.

To exchange information between computers, standards for transmitting and processing 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, standards for the transmission and processing of various types of information should be used. 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 to the desired 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 transfer small pieces of information, you can use the UDP (User Datagram Protocol) protocol. It is also used in conjunction with the Internet Protocol, but is much simpler than TCP. Unlike TCP, UDP does not guarantee the 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 high bandwidth communication lines or short data delivery time, for example, for audio or video communications.

There is also a completely different low-level protocol - ICMP (Internet Control Message Protocol). It is primarily used for diagnostic or service purposes, such as reporting errors and other exceptional situations encountered during data transmission, such as 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. Currently, 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, you must specify the POP3 server address when setting up your mail client. 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 the TCP protocol.

HTTP and HTTPS protocols

Web pages use HyperText Markup Language (HTML). HTML pages are 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 the HTTP protocol begin with “http:”.

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

File Transfer Protocol – FTP

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

For simultaneous operation of servers using protocols SMTP, POP, IMAP, HTTP, HTTPS, FTP etc. separate computers or IP addresses are not required at all. 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 .