The Postfix Queue
The Postfix queue manager does the bulk of the work in
processing email. Postfix components that accept mail have the ultimate
goal of getting the email message to the queue manager. This is done
through the cleanup
daemon, which notifies the queue manager when it has
placed a new message into the incoming mail queue. Once the queue
manager has a new message, it uses trivial-rewrite
to determine the routing information: the transport method to use, the next
host for delivery, and the recipient’s address.
The queue manager maintains four different queues: incoming, active, deferred, and corrupt. After the initial cleanup steps, the incoming queue is the first stop for new messages. Assuming system resources are available, the queue manager then moves the message into the active queue, and calls on one of the delivery agents to deliver it. Messages that cannot be delivered are moved into the deferred queue.
The queue manager also has the responsibility of working with the
bounce
and defer
daemons to generate delivery status
reports for problem messages to be sent back to the sender, or possibly
the system administrator, or both. In addition to the message queue
directories, the Postfix spool directory contains bounce and defer directories. These directories contain
status information about why a particular message is delayed or undeliverable. The bounce
and defer
daemons use the information stored in
these directories to generate their notifications. See Chapter ...
Get Postfix: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.