In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
What is the brief introduction of postfix architecture? I believe many inexperienced people don't know what to do about it. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
How does postfix receive email
When an email enters the postfix system, its first stop is a queue called incoming. The following figure shows the main flow of new mail processing, representing commands or programs with numbers and queues without numbers.
Trivial-
Rewrite (8)
Network- > smtpd (8) ^ | | v
\
Network- > qmqpd (8)-> cleanup (8)-> incoming/
Pickup (8) sendmail (1)-> postdrop (1)
Messages on the network enter the postfix through smtpd or qmqpd services, which remove the message's smtp or qmqp protocol encapsulation information, conduct an integrity check to protect the postfix, and then submit the sender, recipient and message content to the cleanup service. You can configure smtpd to block unwanted messages.
Messages can be submitted locally to postfix through the sendmail command, and messages can be entered into the maildrop queue through the postdrop command, which can also be done when postfix is not running. The local service pickup performs a sanity check on locally submitted messages, and then submits the sender, recipient, and message content to the cleanup service.
Messages from internal sources are sent directly to the cleanup (8) service, which are not shown in the above table, such as emails forwarded by local (8), delivery agent, emails returned to sender by bounce (8), and notification emails from server,postmaster.
Cleanup (8) implements the final processing phase before the message enters the queue. It will fill in the missing From: and other header information and convert the address to the canonical format. In addition, it can be configured to perform lightweight and regular checks on the content of the message. Cleanup (8) turns the processed message into a file and gives it to the incoming queue and knows that a new message has arrived in the queue manager.
Trivial-rewrite (8) rewrites the email address into a standard format. Currently, postfix does not implement a rewriting language, but a lot of rewriting can be done through lookup tables, as well as through regular expressions.
How does postfix deliver mail?
Once a message has entered the incoming queue, the delivery process begins. The following table shows the whole process of postfix delivery:
Trivial-
Rewrite (8) smtp (8)-> Network
/
^ | | v-lmtp (8)-> Network
/
Incoming- > active- > qmgr (8)-local (8)-> File, command ^ | v\
-virtual (8)-> File
Deferred\
Pipe (8)-> Command
Queue manager qmgr (8) is the heart of postfix mail delivery, which connects smtp (8), lmtp (8), local (8), virtual (8), pipe (8), discard (8), error (8) delivery agents, and then sends delivery requests to multiple recipients. Discard and error agents are special in that they discard and rebound all messages, which are not shown in the table above. Queue management maintains a small active queue in which messages are to be delivered. Active queues are like a window of limited size for potentially large incoming and deferred queues, and this window limit allows postfix not to run out of memory because the queue is too large. The queue manager maintains a deferred queue for messages that cannot be delivered, so that even if there is a large backlog of messages, it does not affect the access of the normal queue.
Trival-rewrite (8) classifies each recipient address by local and remote. Additional routing information can be specified through the transport (5) table. Trival-rewrite periodically queries the relocated (5) table to determine which recipients' addresses have changed, and messages sent to these recipients are returned to the sender with instructions.
Smtp (8) the mail sending client queries a series of mx servers as destination addresses, prioritizes them, tries them one by one until one of them responds, and then assembles the recipient, sender and message content according to the protocol, including converting 8-bit MIME to 7-bit encoding.
The lmtp (8) client uses a smtp-like protocol, which is optimized for mail delivery. The advantage of this approach is that a postfix can dock with multiple mail servers, and of course a mail server can also dock with the same postfix.
Local (8) agent can recognize unix style, compatible with qmail mailbox directory files, sendmail-style mail, and so on.
The virtual (8) agent is the simplest agent that can only deliver messages in unix style and qmail format. However, it can be delivered for multiple domain names, so it is especially suitable for host as multiple small domain names on a single machine.
Pipe (8) the sender is an outgoing interface that interfaces with an external mail processing system and is compatible with unix.
Postfix behind the scenes
Master (8) is the monitor of the postfix mail system, which starts at the postfix start command and accompanies the whole running process of the system. It is responsible for starting the process of postfix to receive and deliver mail, and restart the service when the service terminates unexpectedly, limiting the number of service processes according to the configuration items in master.cf.
The anvil (8) service implements client connection and request frequency restrictions for smtpd services:
Network- > smtpd (8) anvil (8)
Bounce (8), defer (8), trace (8) each service maintains its own queue directory tree with a file for each message. Postfix uses this information to send delivery status notifications such as "failure", "delay" or "success" to the sender.
Cleanup (8)-> qmgr (8)
Postfix
Queue- > Delivery
Agents ^
| | |
V |
V (Non-)
Delivery
Notice
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.