In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail the analysis of the principle of Postfix mail in Linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Mail-related protocols
SMTP (Simple Mail Transfer Protocol), the simple Mail transfer Protocol, works on port 25 of TCP. It is a set of rules for sending messages from the source address to the destination address, which controls how the message is transferred. Like the name, smtp is very simple, unable to achieve authentication, e-mail storage and other functions.
POP3 (Post Office Protocol) Post Office Protocol version 3, works on port 110 of TCP. This protocol is mainly used to support the remote management of e-mail on the server using the client. The POP protocol supports "offline" mail processing. The specific process is: the mail is sent to the server, the e-mail client calls the mail client program to connect to the server, and downloads all unread e-mail. This offline access mode is a store-and-forward service that sends mail from the mail server to a personal terminal machine, usually a PC or MAC. Once the message is sent to the PC machine or MAC, the message on the mail server will be deleted. But most of the current POP3 mail servers can "only download mail, the server side does not delete", that is, the improved POP3 protocol.
IMAP4 (Internet Mail Access Protocol) Internet Mail access Protocol version 4, works on port 143of TCP. IMAP4 protocol, like POP3 protocol, is also a protocol that regulates how personal computers access the mail server on the network to send and receive mail, but IMAP4 protocol is more advanced than POP3 protocol. IMAP4 allows protocol clients to access and read mail on the server online or away, and to interactively manipulate mail on the server. The more humane aspect of the IMAP4 protocol is that it does not need to download the mail locally as the POP3 protocol does, and the user can operate the mail on the server directly through the client (here, it means: read the email online and check the email subject, size, sending address and other information). Users can also maintain their own mail directory on the server (maintenance means mobile) create, delete, rename, share, grab text, etc.). IMAP4 protocol makes up for many shortcomings of POP3 protocol.
Mail-related nouns
In general, we decompose the e-mail program into transport agents, delivery agents, user agents. The user agent is used to accept the user's instructions and send the user's letters to the letter transfer agent. The delivery agent obtains the letter from the letter transfer agent and sends it to the end user's mailbox. When a user tries to send an email, he cannot send the letter directly to the other person's machine. The user agent must try to find a mail transfer agent and submit the message to it. After the mail transfer agent gets the message, it first saves it in its own buffer queue, and then, according to the destination address of the message, the mail transfer agent will find the mail transfer agent server that is responsible for this destination address. and send the message to it over the network. After the other party's server receives the message, it stores its buffer locally until the recipient of the e-mail checks his or her own email address.
MTA (Mail Transfer Agent)
The mail transfer agent can send E-mail to the recipient's server through the server specified by the SMTP protocol, and the whole process only takes a few minutes. The SMTP server is a sending mail server that follows the SMTP protocol and is used to send or transfer emails sent out. The commonly used MTA are:
SendMail: the originator of email. Qmail: developed by a mathematician, as the mainstream mail system kernel under Linux, a large number of famous business mail systems are developed under the Qmail kernel, such as Hotmail. Postfix:IBM security expert development, modular design, and more efficient than sendmail compatibility. Exim: open source software based on GPL protocol, developed by Philip Hazel of Cambridge University in the United Kingdom. Exchange: Microsoft's email service component, which is a messaging and collaboration system.
MDA (Mail Delivery Agent)
The mail delivery agent, the delivery agent, obtains the letter from the letter transfer agent and sends it to the mailbox of the end user. The commonly used MDA are:
ProcMail:Postfix default mail delivery tool. MailDrop: a relatively professional delivery agent.
MRA (Mail Retrieval Agent)
The mail retrieval agent works using POP3 or IMAP4 protocols. It is generally used to retrieve mail from the user mailbox to the mail user agent client. The commonly used MRA are:
Dovecot: is an open source mail server that supports IMAP and POP3 protocols (with its own SASL function).
MUA (Mail User Agent)
Mail user agent tool. The commonly used MUA are:
Tools that come with older versions of OE:Windows. Tools that come with the Outlook:Office kit. FoxMail: Tencent's email client tool. Thunderbird: Thunderbird is a client tool under Linux. Character interface client tools under Mutt:Linux.
WebMail
E-mail sending and receiving system based on Web plays the role of mail user agent. Generally speaking, WebMail system provides functions such as e-mail sending and receiving, user online service and system service management. The interface of WebMail is intuitive and friendly, and it does not need the help of client, which avoids the trouble of configuring E-mail client software (such as Foxmail, Outlook, etc.). As long as you can access the Internet, you can use WebMail to facilitate users to receive and send mail. WebMail makes E-mail widely used in Internet. The commonly used Webmail are:
Openwebmail: developed in Taiwan. Squirrelmail:Centos system comes with it. Extmail,Extman: domestic development is also known as EMOS system.
Mail Relay
Mail relay, first understand a concept, as long as a message is not sent to users in this domain, such as from the current domain to another domain, or from the current domain to another domain and then transferred to another domain, this is a relay. However, the general mail server will allow local or local domain users to relay. Otherwise, messages can only be sent within this domain, not to external mailboxes. By default, Postfix can only do relay authentication based on IP address.
SASL (simple authentication secure layer)
The simple authentication security layer is a mechanism used to expand the verification capability of Cramp S schema. In Postfix, you can use SASL to determine whether users have the right to use forwarding services, or to identify who is using your server.
The commonly used Sasl has the SASL authentication framework that comes with cyrus-sasl:Redhat series. SASL authentication framework that comes with dovecot-sasl:dovecot components. Courier-authlib: this is a software with MTA,MDA and SASL certification, but usually only uses its SASL function. Postfix introduction
Postfix is a MTA (Mail transfer Agent) software developed by Wietse Venema under the GPL protocol of IBM. It was created to improve the sendmail mail server. Its characteristics are:
1. Postfix is free: postfix wants to reach a wide range of Internet users, trying to influence most e-mail systems on Internet, so it is free. two。 Faster: postfix is about three times faster than sendmail in performance. A desktop PC running postfix can send and receive millions of emails a day. 3. Good compatibility: postfix is sendmail compatible, making it easy for sendmail users to migrate to postfix. Postfix supports / var[ / spool] / mail, / etc/aliases, NIS, and ~ / .forward files. 4. More robust: postfix is designed to work under heavy loads. When the system runs beyond the available memory or disk space, postfix automatically reduces the number of running processes. As the number of messages processed increases, the number of processes that postfix runs does not increase. 5. More flexible: postfix is made up of more than a dozen Mini Program, each program performing specific functions. You can set the running parameters of each program through the configuration file. 6. Security: postfix has a multi-layer defense structure, which can effectively resist malicious intruders. For example, most postfix programs can be run under low permissions and cannot access security-related local delivery programs through the network, and so on. How the Postfix server works
The mail server works in two cases: one is forwarding within the same domain, and the other is forwarding within different domains. Therefore, there are generally smtpd, smtp and MDA within MTA (postfix). The smtpd mail server is very simple, only responsible for forwarding mail and nothing else, and the sender can forward it from the smtpd server to the destination address no matter what address it is.
Two working mechanisms of mail server
Forwarding within the same domain: user A connects to the SMTPD server through a tool and sends an email to user B. When SMPTD receives the email and finds that it is a user in the same domain, it will directly start the MDA process and drop the email into the user's mailbox. When the user receives the email through the MUA tool (such as the mail command), the user can receive the email directly.
Forwarding within different domains: user A connects to the SMTPD server through a tool and sends an email to the C user. When SMPTD receives the message and finds that it is a user in a different domain, it starts the SMTP client to forward the message. When SMTP receives the request, it parses the other party's MX record, then connects to the other party's SMTPD server and sends the mail. When the other SMTPD discovers that the mail is within the domain, it will also call the MDA process to deliver the mail to the user's mailbox, and the user can receive the mail directly through the MUA tool (such as the mail command).
This is the end of this article on "Analysis of the principle of Postfix email in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.