Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

15.1 E-mail system


May 24, 2021 That's what Linux should learn



In the 1960s, the United States and the Soviet Union were in the middle of the Cold War. T he U.S. military believes it should maintain its leading position in science and technology, which could help it gain an edge in future wars. A s a result, the U.S. Department of Defense launched a research project called ARPANET, now known as the Arpa Network Program. A rpa is the prototype of today's Internet, it is also the world's first operating packet exchange network. But soon in 1971, Apa.com ran into serious problems, and as Figure 15-1 shows, scientists involved in the Apa-Net research project were spread across different parts of the United States and could not even share their research results in time because of jet lag, so scientists urgently needed a way to transfer data between computers using the network.

Although the Web services and FTP file transfer services described in Chapters 10 and 11 of this book also enable data exchange, the data transfer methods of these services are like "calls" and require both parties to be online at the same time to complete the transfer. I f the other party's host goes down or the researcher leaves for some reason, it is possible to miss some scientific research results. F ortunately, Dr. Ray Tomlinson of the Massachusetts Institute of Technology, who was also involved in the Apa Network project at the time, felt the need to design a "letter"-like transmission service and prepare a "letterbox" for the letter so that the data could be received even temporarily offline and then processed online. So Dr. Ray Tomlinson spent nearly a year designing e-mail, and in the fall of 1971 he used SNDMSG software to send the first e-mail message in human history to another computer in human history - the birth of an e-mail system on the Internet!

15.1 E-mail system

Figure 15-1 Historical data on the operation of the Apa Network scientific research project in 1971

Since you want to send e-mail to someone else on the Internet, the name that the other user used to receive the e-mail must be unique, otherwise the e-mail message may be sent to multiple renamed users at the same time, or no one will receive the e-mail at all. T herefore, Dr. Ray Tomlinson decided to use the format of "Name and Computer Host Name" to standardize the name of the e-mail box. The reason for choosing to use the symbol as an interval character is actually simple, because Dr. Ray Tomlinson chose the symbol because he felt that there should not be such a symbol in the human name and the computer host name.

The e-mail system is based on the mail protocol to complete the transmission of e-mail messages, the common mail protocol is the following.

Simple Mail Transfer Protocol (SMTP): Used to send and transit e-mail messages that occupy the server's 25/TCP port.

Post Office Protocol 3: Used to store e-mail to a local host, taking up the server's 110/TCP port.

Internet Message Access Protocol 4: Used to access messages on a local host, occupying the server's 143/TCP port.

In an e-mail system, the server that sends and receives messages to and from a user is called the Mail User Agent (MUA). I n addition, since the e-mail system allows users to still receive data while offline, there must be a "mailbox" server for saving user messages, named Mail Delivery Agent (MDA), whose job is to save messages from mail transfer agents (MTA) to their local inbox. A mong them, the MTA's job is to forward messages between different e-mail service providers and forward messages from MUA to the appropriate MTA server. For example, we send an e-mail from Sina Mailbox to Google Mailbox, which is transmitted as shown in Figure 15-2.

In general, a typical network service program is like making a call when transmitting information, requiring both parties to remain online, while in an e-mail system, users do not have to wait for delivery to complete after sending a message. If the other party mail server (MTA) down or the other party temporarily offline, then the sending server (MTA) will automatically send the content to the local temporarily, and so detected that the other party mail server recovery will be immediately re-posted, during which generally no operations personnel maintenance processing, and then the recipient (MUA) can find this message in their own mailbox.

15.1 E-mail system Figure 15-2 The transfer of e-mail messages

There are four things to keep in mind when deploying an enterprise-class e-mail system in a production environment.

Add anti-spam and anti-virus modules: It's very effective at blocking spam or virus mail from interfering with corporate mailboxes. E ncryption of messages: Effectively protects the contents of messages from theft and tampering by hackers. A dd mail monitoring and auditing module: can effectively monitor all employees of the enterprise's mail whether there are sensitive words, whether there is disclosure of corporate information and other irregularities. Stability: The stability of the e-mail system is critical, and operations personnel should ensure the stable operation of the e-mail system and be prepared for distributed denial of service (DDoS) attacks in a timely manner.