Chapter 5. Queue Management

The queue manager daemon qmgr is in many ways the heart of your Postfix system.[1] All messages, both outbound and inbound, must pass through the queue. It’s a good idea to understand the queue and how Postfix uses it in case you have to troubleshoot a problem.

The queue manager maintains five different queues: incoming, active, deferred, hold, and corrupt. Postfix uses a separate directory for each queue below the path specified in the queue_directory parameter. By default the path is /var/spool/postfix, which gives you a directory structure like the following:

/var/spool/postfix/active
/var/spool/postfix/bounce
/var/spool/postfix/corrupt
/var/spool/postfix/deferred
/var/spool/postfix/hold

The qmgr daemon running in the background handles most of the queue management tasks automatically. The commands postsuper and postqueue are used by administrators for manual queue management tasks. This chapter looks at how qmgr and the command-line tools work, as well as Postfix parameters that affect the queue.

[1] You may see references to nqmgr in older configuration files and documentation. Earlier Postfix versions shipped with two queue manager daemons, qmgr and nqmgr. The original qmgr was replaced by the current one, which has a better scheduling algorithm. nqmgr was the name of the current queue manager daemon while it coexisted with the original. Once it was ready for promotion as sole queue manager for Postfix, it was renamed qmgr.

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.