Mail server related knowledge popularization Transmission principle introduction

  
                  

The mail server is a device that is responsible for managing email delivery. E-mail is one of the most popular applications on the Internet, just as postman distributes and delivers traditional e-mails, which is asynchronous, meaning that people send and read e-mails at a convenient time without having to collaborate with others in advance. Unlike traditional mail, email is fast, easy to distribute, and inexpensive. In addition, modern email messages can contain hyperlinks, HTML-formatted text, images, sound, and even video data. In this article we will look at the application layer protocols that are at the core of Internet email. But before delving into these protocols, let's take a look at the Internet mail system and its key components.



The above picture shows an overview of the Internet mail system. We see that the system consists of three main components: user agent, mail server, and simple mail transfer protocol (SMTP). The sender A1ice sends an email message to the recipient Bob. User agents allow users to read, reply to, forward, save, and compose mail messages. After Alice writes the email message, her user agent sends the message to the mail server, which then queues the message into the outgoing message queue. When Bob wants to read an email message, his user agent will get the mail from his mailbox on his mail server. In the late 1990s, graphical user interface (GUI) email user agents became popular, allowing users to read and write multimedia messages. Currently popular user agents include Outlook, Foxmail, and others. There are also many text-based email user agents in the public domain, including mail, pine, and elm.

The mail server forms the core of the email system. Each recipient has a mailbox (mailbox) located on a mail server. Bob's mailbox is used to manage and maintain mail messages that have been sent to him. A typical journey of a mail message begins with the sender's user agent, travels through the sender's mail server, goes to the recipient's mail server, and then delivers it to the recipient's mailbox. When Bob wants to view a mail message in his mailbox, the mail server hosting the mailbox will authenticate him with the username and password he provided. Alice's mail server has to deal with Bob's mail server failure. If Alice's mail server is unable to deliver the mail message immediately to Bob's mail server, A1ice's server will store them in the message queue and try to deliver it later. This attempt is usually performed every 30 minutes or so: if it has not been tried successfully after several days, the server removes the message from the message queue and notifies the sender (ie Alice) with another mail message.

Simple Mail Transfer Protocol (SMTP) is the primary application layer protocol for Internet email systems. It uses a reliable data transfer service provided by TCP to deliver mail messages from the sender's mail server to the recipient's mail server. Like most application layer protocols, SMTP also has two ends: the client executing on the sender's mail server and the server executing on the recipient's mail server. The client and server side of SMTP run on each mail server at the same time. When a mail server is sending mail messages to other mail servers, it is running as an SMTP client. When a mail server receives mail messages from other mail servers, it is running as an SMTP server.

There are many similarities between the SMTP protocol and the etiquette that people use to interact face to face. First, the SMTP client running on the sender's mail server host initiates a TCP connection to the SMTP server port number 25 running on the receiving mail server host. If the receiving mail server is not currently working, the SMTP client waits for a while before attempting to establish the connection. After this connection is established, the SMTP client and server perform some application layer handshake operations first. Just as people often introduce themselves before they change things, SMTP clients and servers also introduce themselves before sending messages. During this SMTP handshake phase, the SMTP client indicates to the server the email addresses of the sender and the recipient, respectively. After each other introduces themselves, the customer sends an email message. SMTP can expect reliable data transfer services provided by TCP to pass the message to the server without error. If the client has other mail messages to send to the same server, it repeats the above process on the same TCP connection; otherwise, it instructs TCP to close the connection.

Copyright © Windows knowledge All Rights Reserved