OQMGR(8postfix)

πŸ“¦ version 3.8.6, in debian bookworm, ubuntu jammy, ubuntu noble

✨ OQMGR β€” old Postfix queue manager ✨

okay bestie, welcome to the oqmgr(8postfix) page πŸ’– this is the manual for the old Postfix queue manager, and yes we're reading the whole thing together, no skimming, no cap.


πŸŽ€ NAME πŸŽ€

oqmgr β€” old Postfix queue manager πŸ¦‹


🌸 SYNOPSIS 🌸

oqmgr [generic Postfix daemon options]

πŸ’… DESCRIPTION πŸ’…

so the oqmgr(8) daemon just… sits there, patiently, waiting for incoming mail to show up 🌸 and then it arranges for that mail to actually get delivered via Postfix delivery processes. the actual mail routing strategy? not its problem, it's delegated to the trivial-rewrite(8) daemon. and this program expects to be run from the master(8) process manager, periodt.

mail that's addressed to the local double-bounce address gets logged and then discarded πŸ—‘οΈ β€” and honestly that's iconic of it, because it stops potential loops caused by undeliverable bounce notifications. no infinite bounce spirals here, we don't do that πŸ’€


πŸ‘‘ MAIL QUEUES πŸ‘‘

the oqmgr(8) daemon maintains these queues, and they each have a whole personality:

  • incoming β€” inbound mail from the network, or mail picked up by the local pickup(8) agent from the maildrop directory πŸ“₯
  • active β€” messages that the queue manager has opened for delivery. only a limited number of messages is allowed to enter the active queue (leaky bucket strategy, for a fixed delivery rate) πŸ”₯
  • deferred β€” mail that could not be delivered upon the first attempt. the queue manager implements exponential backoff by doubling the time between delivery attempts 😭
  • corrupt β€” unreadable or damaged queue files get moved here for inspection. it's giving evidence locker πŸ™ˆ
  • hold β€” messages that are kept "on hold" are kept here until someone sets them free 🫢

πŸ’– DELIVERY STATUS REPORTS πŸ’–

the oqmgr(8) daemon keeps an eye on per-message delivery status reports in these directories. each status report file has the same name</> as the corresponding message file:

  • bounce β€” per-recipient status information about why mail is bounced. these files are maintained by the bounce(8) daemon πŸ’…
  • defer β€” per-recipient status information about why mail is delayed. these files are maintained by the defer(8) daemon ⏳
  • trace β€” per-recipient status information as requested with the Postfix "sendmail -v" or "sendmail -bv" command. these files are maintained by the trace(8) daemon πŸ”

and the oqmgr(8) daemon is the one responsible for asking the bounce(8), defer(8) or trace(8) daemons to send delivery reports. it's the group chat admin of delivery receipts fr fr πŸ“¬


🌈 STRATEGIES 🌈

the queue manager implements a variety of strategies for either opening queue files (input) or for message delivery (output). yes, it has range:

  • leaky bucket β€” this strategy limits the number of messages in the active queue and prevents the queue manager from running out of memory under heavy load πŸͺ£
  • fairness β€” when the active queue has room, the queue manager takes one message from the incoming queue and one from the deferred queue. this prevents a large mail backlog from blocking the delivery of new mail βš–οΈ
  • slow start β€” this strategy eliminates "thundering herd" problems by slowly adjusting the number of parallel deliveries to the same destination 🐒
  • round robin β€” the queue manager sorts delivery requests by destination. round-robin selection prevents one destination from dominating deliveries to other destinations πŸ”„
  • exponential backoff β€” mail that cannot be delivered upon the first attempt is deferred. the time interval between delivery attempts is doubled after each attempt πŸ“ˆ
  • destination status cache β€” the queue manager avoids unnecessary delivery attempts by maintaining a short-term, in-memory list of unreachable destinations 🧠

⚑ TRIGGERS ⚑

on an idle system, the queue manager waits for the arrival of trigger events, or it waits for a timer to go off ⏰ a trigger is a one-byte message. depending on the message received, the queue manager performs one of the following actions (the message is followed by the symbolic constant used internally by the software):

  • D (QMGR_REQ_SCAN_DEFERRED) β€” start a deferred queue scan. if a deferred queue scan is already in progress, that scan will be restarted as soon as it finishes πŸ”
  • I (QMGR_REQ_SCAN_INCOMING) β€” start an incoming queue scan. if an incoming queue scan is already in progress, that scan will be restarted as soon as it finishes πŸ“¨
  • A (QMGR_REQ_SCAN_ALL) β€” ignore deferred queue file time stamps. the request affects the next deferred queue scan πŸ•°οΈ
  • F (QMGR_REQ_FLUSH_DEAD) β€” purge all information about dead transports and destinations πŸ’€
  • W (TRIGGER_REQ_WAKEUP) β€” wakeup call, this is used by the master server to instantiate servers that should not go away forever. the action is to start an incoming queue scan β˜€οΈ

the oqmgr(8) daemon reads an entire buffer worth of triggers. multiple identical trigger requests are collapsed into one, and trigger requests are sorted so that A and F precede D and I. so, in order to force a deferred queue run, one would request A F D; in order to notify the queue manager of the arrival of new mail one would request I. iykyk πŸ’…


πŸ“œ STANDARDS πŸ“œ


πŸ”’ SECURITY πŸ”’

the oqmgr(8) daemon is not security sensitive 🫢 it reads single-character messages from untrusted local users, and thus may be susceptible to denial of service attacks 😭 but listen β€” the oqmgr(8) daemon does not talk to the outside world, and it can be run at fixed low privilege in a chrooted environment. cozy, contained, protected 🧚


🩺 DIAGNOSTICS 🩺

problems and transactions are logged to the syslogd(8) or postlogd(8) daemon πŸ“ corrupted message files are saved to the corrupt</> queue for further inspection πŸ”

depending on the setting of the notify_classes parameter, the postmaster is notified of bounces and of other trouble πŸ“£


πŸ› BUGS πŸ›

a single queue manager process has to compete for disk access with multiple front-end processes such as cleanup(8). a sudden burst of inbound mail can negatively impact outbound delivery rates 😭 it's giving one person doing the whole group project, no cap.


βš™οΈ CONFIGURATION PARAMETERS βš™οΈ

changes to main.cf are not picked up automatically, as oqmgr(8) is a persistent process. use the command "postfix reload" after a configuration change πŸ”

the text below provides only a parameter summary. see postconf(5) for more details including examples πŸ“–

in the text below, transport is the first field in a master.cf entry.

πŸŽ€ COMPATIBILITY CONTROLS πŸŽ€

available before Postfix version 2.5:

  • allow_min_user (no) β€” allow a sender or recipient address to have - as the first character.

available with Postfix version 2.7 and later:

  • default_filter_nexthop (empty) β€” when a content_filter or FILTER request specifies no explicit next-hop destination, use $default_filter_nexthop instead; when that value is empty, use the domain in the recipient address.

πŸ’… ACTIVE QUEUE CONTROLS πŸ’…

  • qmgr_clog_warn_time (300s) β€” the minimal delay between warnings that a specific destination is clogging up the Postfix active queue 🚧
  • qmgr_message_active_limit (20000) β€” the maximal number of messages in the active queue πŸ“¦
  • qmgr_message_recipient_limit (20000) β€” the maximal number of recipients held in memory by the Postfix queue manager, and the maximal size of the short-term, in-memory "dead" destination status cache πŸ’€

πŸ”₯ DELIVERY CONCURRENCY CONTROLS πŸ”₯

  • qmgr_fudge_factor (100) β€” obsolete feature: the percentage of delivery resources that a busy mail system will use up for delivery of a large mailing list message 🫠
  • initial_destination_concurrency (5) β€” the initial per-destination concurrency level for parallel delivery to the same destination πŸš€
  • default_destination_concurrency_limit (20) β€” the default maximal number of parallel deliveries to the same destination 🏁
  • transport_destination_concurrency_limit ($default_destination_concurrency_limit) β€” a transport-specific override for the default_destination_concurrency_limit parameter value, where transport is the master.cf name of the message delivery transport.

available in Postfix version 2.5 and later:

  • transport_initial_destination_concurrency ($initial_destination_concurrency) β€” a transport-specific override for the initial_destination_concurrency parameter value, where transport is the master.cf name of the message delivery transport.
  • default_destination_concurrency_failed_cohort_limit (1) β€” how many pseudo-cohorts must suffer connection or handshake failure before a specific destination is considered unavailable (and further delivery is suspended) 🚫
  • transport_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit) β€” a transport-specific override for the default_destination_concurrency_failed_cohort_limit parameter value, where transport is the master.cf name of the message delivery transport.
  • default_destination_concurrency_negative_feedback (1) β€” the per-destination amount of delivery concurrency negative feedback, after a delivery completes with a connection or handshake failure πŸ“‰
  • transport_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback) β€” a transport-specific override for the default_destination_concurrency_negative_feedback parameter value, where transport is the master.cf name of the message delivery transport.
  • default_destination_concurrency_positive_feedback (1) β€” the per-destination amount of delivery concurrency positive feedback, after a delivery completes without connection or handshake failure πŸ“ˆ
  • transport_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback) β€” a transport-specific override for the default_destination_concurrency_positive_feedback parameter value, where transport is the master.cf name of the message delivery transport.
  • destination_concurrency_feedback_debug (no) β€” make the queue manager's feedback algorithm verbose for performance analysis purposes πŸ”¬

🌸 RECIPIENT SCHEDULING CONTROLS 🌸

  • default_destination_recipient_limit (50) β€” the default maximal number of recipients per message delivery πŸ‘₯
  • transport_destination_recipient_limit ($default_destination_recipient_limit) β€” a transport-specific override for the default_destination_recipient_limit parameter value, where transport is the master.cf name of the message delivery transport.

to be continued bestie… part 2 is loading ✨

πŸ¦‹ OTHER RESOURCE AND RATE CONTROLS πŸ¦‹

okay bestie, these are the knobs that control how often and how fast the queue manager pokes at stuff. no cap, they matter. πŸ’…

  • minimal_backoff_time (300s) β€” the smallest amount of time between attempts to deliver a deferred message. fun fact: before Postfix 2.4, the default was 1000s. glow-up era.
  • maximal_backoff_time (4000s) β€” the biggest amount of time between attempts to deliver a deferred message. like, after this it stops growing. periodt.
  • maximal_queue_lifetime (5d) β€” if delivery fails with a temporary error, and the message has been in the queue for this long, it's considered undeliverable. bye bestie. πŸ’€
  • queue_run_delay (300s) β€” how long between deferred queue scans by the queue manager. another glow-up: before Postfix 2.4, this default was 1000s.
  • transport_retry_time (60s) β€” how long the Postfix queue manager waits between attempts to contact a malfunctioning message delivery transport. like it's checking if the transport got its life together. 😭

Available in Postfix version 2.1 and later: ✨

  • bounce_queue_lifetime (5d) β€” if delivery fails with a temporary error, and a bounce message has been in the queue for this long, it's considered undeliverable. yes, bounces can bounce. πŸ’€

Available in Postfix version 2.5 and later: ✨

  • default_destination_rate_delay (0s) β€” the default delay inserted between individual message deliveries to the same destination and over the same message delivery transport. it's giving throttle but make it default. 🫢
  • transport_destination_rate_delay ($default_destination_rate_delay) β€” a transport-specific override for the default_destination_rate_delay value. here, transport is the master.cf name of the message delivery transport. iykyk.

Available in Postfix version 3.1 and later: ✨

  • default_transport_rate_delay (0s) β€” the default delay inserted between individual message deliveries over the same message delivery transport, regardless of destination. no destination discrimination, just vibes. πŸ’…
  • transport_transport_rate_delay ($default_transport_rate_delay) β€” a transport-specific override for the default_transport_rate_delay value. the initial transport in the parameter name is the master.cf name of the message delivery transport. yes, the name says transport twice. iconic. πŸ‘‘

πŸ›‘οΈ SAFETY CONTROLS πŸ›‘οΈ

  • qmgr_daemon_timeout (1000s) β€” how much time a Postfix queue manager process may take to handle a request before a built-in watchdog timer terminates it. the watchdog said times up bestie. ⏰
  • qmgr_ipc_timeout (60s) β€” the time limit for the queue manager to send or receive information over an internal communication channel. don't leave it on read. πŸ’€

Available in Postfix version 3.1 and later: ✨

  • address_verify_pending_request_limit (see postconf -d output) β€” a safety limit that prevents address verification requests from overwhelming the Postfix queue. protective queen behavior. 🫢

πŸŽ€ MISCELLANEOUS CONTROLS πŸŽ€

  • config_directory (see postconf -d output) β€” the default location of the Postfix main.cf and master.cf configuration files. where the receipts live. πŸ“
  • defer_transports (empty) β€” the names of message delivery transports that should not deliver mail unless someone issues sendmail -q or equivalent. not me putting the mail on do not disturb. πŸ™ˆ
  • delay_logging_resolution_limit (2) β€” the maximal number of digits after the decimal point when logging sub-second delay values. precision but make it cute. ✨
  • helpful_warnings (yes) β€” log warnings about problematic configuration settings, and provide helpful suggestions. it's giving supportive bestie. 🫢
  • process_id (read-only) β€” the process ID of a Postfix command or daemon process. yes, read-only. don't try it. πŸ’…
  • process_name (read-only) β€” the process name of a Postfix command or daemon process. also read-only. periodt.
  • queue_directory (see postconf -d output) β€” the location of the Postfix top-level queue directory. the queue's home address. 🏠
  • syslog_facility (mail) β€” the syslog facility of Postfix logging. classic. πŸ“
  • syslog_name (see postconf -d output) β€” a prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". it's giving name tag at a party. πŸŽ€

Available in Postfix version 3.0 and later: ✨

  • confirm_delay_cleared (no) β€” after sending a "your message is delayed" notification, inform the sender when the delay clears up. closure? we love to see it. 🫢

Available in Postfix 3.3 and later: ✨

  • service_name (read-only) β€” the master.cf service name of a Postfix daemon process. read-only, bestie. don't touch. πŸ’…

Available in Postfix 3.5 and later: ✨

  • info_log_address_format (external) β€” the email address form that will be used in non-debug logging (info, warning, etc.). so info logs get the external format. slay. ✨

πŸ“‚ FILES πŸ“‚

  • /var/spool/postfix/incoming β€” incoming queue
  • /var/spool/postfix/active β€” active queue
  • /var/spool/postfix/deferred β€” deferred queue
  • /var/spool/postfix/bounce β€” non-delivery status
  • /var/spool/postfix/defer β€” non-delivery status
  • /var/spool/postfix/trace β€” delivery status

πŸ‘€ SEE ALSO πŸ‘€

πŸ“š README FILES πŸ“š

use postconf readme_directory or postconf html_directory to locate this information.

  • QSHAPE_README, Postfix queue analysis

πŸ“œ LICENSE πŸ“œ

the Secure Mailer license must be distributed with this software. periodt. πŸ’…

πŸ‘‘ AUTHOR(S) πŸ‘‘

  • Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA
  • Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA

and that's the whole OQMGR(8postfix) page, bestie. source/version: OQMGR(8postfix). date: whatever your local manpage footer says β€” i'm not gonna copy the line, that's not the vibe. now go queue something iconic. πŸ’–βœ¨

πŸ“¦ where this page comes from