The mail server forms the core of the e-mail 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 is to start with the sender's user agent, travel through the sender's mail server, transfer to the recipient's mail server, and post it to the recipient's mailbox. When Bob wants to view mail messages in his or her mailbox, the mail server that holds the mailbox will authenticate him with the username and password he provided. Alice's mail server also has to deal with the failure of Bob's mail server. If Alice's mail server is unable to deliver mail messages immediately to Bob's mail server, A1ice's servers store them in Message Queuing and try delivery later. This attempt is usually performed every 30 minutes or so: If a few days have passed, the server removes the message from the message queue and notifies the sender (Alice) with another message.
The Simple Mail Transfer Protocol (SMTP) is the primary Application layer protocol for Internet e-mail systems. It uses a reliable data transfer service provided by TCP to transfer mail messages from the sender's mail server to the recipient's mail server. As with most application layer protocols, SMTP also has two ends: the client that executes on the sender's mail server and the server side that executes on the recipient's mail server. The client and server side of SMTP run concurrently on each mail server. When a mail server sends 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.
SMTP is defined in RFC 821, which is the role of sending mail messages from the sender's mail server to the recipient's mail server. The history of SMTP is much earlier than HTTP, and its RFCs are written in 1982 years, and the actual use of SMTP has been there for years. Although SMTP has many wonderful qualities (it is ubiquitous on the internet as a witness), it is a traditional tactic with some "old" features. For example, it restricts the letter body (not just the letterhead) of all mail messages to be a simple 7-bit ASCII character format. This limitation was significant in the early the 1980s, when the Internet was not capable of transmitting large amounts of data, audio or video files in e-mail. However, in the multimedia age today, this limitation is somewhat awkward-it forces binary multimedia data to be encoded first in 7-bit ASCII text before the text is sent by SMTP; After the SMTP transfer completes, the corresponding 7-bit ASCII text message message is decoded into binary data. HTTP does not require such encoding and decoding of multimedia data.
There are many similarities between the SMTP protocol and the etiquette that people use for face-to-face interaction. First, the SMTP client running on the sending-end mail server host initiates the establishment of a TCP connection to the SMTP server port number 25 that runs on the receiving-end mail server host. If the receiving mail server is not currently working, the SMTP client waits a period of time before attempting to establish the connection. After this connection is established, the SMTP client and the server perform some application-level handshake operations first. Just as people tend to introduce themselves before they turn things around, SMTP clients and servers also introduce themselves before sending messages. During this SMTP handshake phase, the SMTP client indicates to the server the e-mail address of the sender and the recipient respectively. After introducing themselves to each other, the customer sends out the mail message. SMTP can expect the reliable data transfer service provided by TCP to send the message to the server without error. If the customer has additional mail messages to be sent to the same server, it repeats the process on the same TCP connection, otherwise it instructs TCP to close the connection.
Comparison with HTTP
Let's simply compare SMTP and HTTP. Both protocols are used to transfer files from one host to another; HTTP is used to transfer files (or objects) from a Web server to a Web user agent (that is, a browser), and SMTP is used to transfer files (that is, e-mail messages) from one mail server to another. When you transfer files, both SMTP and persistent HTTP use persistent connections. It can be seen that the two protocols have some common characteristics, but the differences between them are also significant. First, HTTP is essentially an internal-pull protocol (pull protocol)-someone uploads the information to a Web server, and the user uses HTTP to pull it from the server at their convenience. More specifically, the TCP connection is initiated by the host that wants to receive the file. SMTP is essentially an extrapolation protocol (PUSHPROTOCO1)-The sending-end mail server pushes the file to the receiving-end mail server. More specifically, the TCP connection is initiated by the host that wants to send the file.
The second important difference between SMTP and HTTP is that SMTP requires that each message message, including the letter body part, be in 7-bit ASCII text format.
A wide range of mail servers:
1, network treasure Embedded mail server
2, using gcmail architecture mail Server
3, using u-mail architecture mail Server
4, using webeasymail architecture mail Server