Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does Postfix handle email?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

I would like to share with you how Postfix handles email. I believe most people don't know much about it, so share this article for your reference. I hope you will learn a lot after reading this article. Let's learn about it together.

one。 The process of receiving mail

When postfix receives a new message, the new message * * stops at the incoming queue and is processed differently according to different situations:

1. For local messages: the sendmail process is responsible for receiving local messages and putting them in the maildrop queue, and then the pickup process checks the integrity of the messages in the maildrop. The permissions of the maildrop directory must be set so that one user cannot delete messages from other users.

two。 For messages from the network: the smtpd process is responsible for receiving messages from the network and conducting security checks. You can control the behavior of smtpd through UCE (unsolicited commercial email).

3. Messages generated by the postfix process: this is to return undeliverable information to the sender. These messages are generated by the bounce daemon.

5. An email generated by postfix itself: prompts postmaster (that is, the postfix administrator) for problems with postfix running. (such as SMTP protocol issues, records of violations of UCE rules, etc.)

Note about the cleanup daemon: cleanup is a process that processes new mail as follows: adding missing Form information in the header; arranging addresses in standard user@fully.qualified.domain format; extracting the recipient's address from the duplicate header; putting the message into the incoming queue and requesting the mail queue management process to process the message Request the trivial-rewrite process to convert the address to the standard user@fully.qualified.domain format.

two。 The process of delivering mail

Once the new message arrives in the incoming queue, the next step is to start delivering the message. The postfix process for delivering the message is shown in figure 3. The relevant instructions are as follows:

The mail queue management process is the heart of the whole postfix mail system. It connects with local, smtp, pipe and other delivery agents, and sends delivery requests including queue file path information, mail sender address and mail recipient address to the delivery agent. The queue management process maintains a deferred queue to which undeliverable messages are delivered. In addition, the queue management process maintains an active queue in which the number of messages is limited to prevent memory spills when the load is too heavy. The message queue manager is also responsible for returning messages with recipient addresses listed in the relocated table to the sender, which contains invalid recipient addresses.

If the message queue management process requests, the rewrite daemon resolves the recipient address. By default, however, rewrite only distinguishes whether the mail recipient is local or remote.

If the mail requests you to manage the process, the bounce daemon can generate a report that the mail is undeliverable.

The local delivery agent local process can understand UNIX-style mailboxes, sendmail-style system alias databases and sendmail-style .forward files. Multiple local processes can be run at the same time, but there is a limit to the number of concurrent posting processes for the same user. You can configure local to deliver mail to the user's host directory, or you can configure local to send mail to an external command, such as the popular local delivery agent procmail. In RedHat, the popular linux distribution, we used procmail as the final local delivery agent.

The remote delivery agent SMTP process queries a list of SMTP servers according to the recipient address, connects each SMTP server sequentially, and sorts the table according to performance. When the system load is too heavy, several concurrent SMTP processes can run at the same time.

Pipe is the mechanism by which postfix invokes external commands to process mail.

The above is all the contents of the article "what to do with email by Postfix". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report