1QMGR(8)                     System Manager's Manual                    QMGR(8)
2
3
4

NAME

6       qmgr - Postfix queue manager
7

SYNOPSIS

9       qmgr [generic Postfix daemon options]
10

DESCRIPTION

12       The qmgr(8) daemon awaits the arrival of incoming mail and arranges for
13       its delivery via Postfix delivery processes.  The actual  mail  routing
14       strategy  is  delegated to the trivial-rewrite(8) daemon.  This program
15       expects to be run from the master(8) process manager.
16
17       Mail addressed to the local double-bounce address is  logged  and  dis‐
18       carded.   This  stops  potential  loops  caused by undeliverable bounce
19       notifications.
20

MAIL QUEUES

22       The qmgr(8) daemon maintains the following queues:
23
24       incoming
25              Inbound mail from the network, or mail picked up  by  the  local
26              pickup(8) daemon from the maildrop directory.
27
28       active Messages  that the queue manager has opened for delivery. Only a
29              limited number of messages is allowed to enter the active  queue
30              (leaky bucket strategy, for a fixed delivery rate).
31
32       deferred
33              Mail  that  could  not  be delivered upon the first attempt. The
34              queue manager implements exponential  backoff  by  doubling  the
35              time between delivery attempts.
36
37       corrupt
38              Unreadable or damaged queue files are moved here for inspection.
39
40       hold   Messages  that  are  kept  "on hold" are kept here until someone
41              sets them free.
42

DELIVERY STATUS REPORTS

44       The qmgr(8) daemon keeps an eye on per-message delivery status  reports
45       in the following directories. Each status report file has the same name
46       as the corresponding message file:
47
48       bounce Per-recipient status information  about  why  mail  is  bounced.
49              These files are maintained by the bounce(8) daemon.
50
51       defer  Per-recipient  status  information  about  why  mail is delayed.
52              These files are maintained by the defer(8) daemon.
53
54       trace  Per-recipient status information as requested with  the  Postfix
55              "sendmail  -v" or "sendmail -bv" command.  These files are main‐
56              tained by the trace(8) daemon.
57
58       The qmgr(8) daemon is responsible for asking the bounce(8), defer(8) or
59       trace(8) daemons to send delivery reports.
60

STRATEGIES

62       The queue manager implements a variety of strategies for either opening
63       queue files (input) or for message delivery (output).
64
65       leaky bucket
66              This strategy limits the number of messages in the active  queue
67              and  prevents the queue manager from running out of memory under
68              heavy load.
69
70       fairness
71              When the active queue has room, the queue manager takes one mes‐
72              sage  from  the  incoming queue and one from the deferred queue.
73              This prevents a large mail backlog from blocking the delivery of
74              new mail.
75
76       slow start
77              This  strategy  eliminates  "thundering herd" problems by slowly
78              adjusting the number of parallel deliveries to the same destina‐
79              tion.
80
81       round robin
82              The  queue  manager  sorts  delivery  requests  by  destination.
83              Round-robin selection prevents one destination  from  dominating
84              deliveries to other destinations.
85
86       exponential backoff
87              Mail  that  cannot  be  delivered  upon  the  first  attempt  is
88              deferred.  The time interval between delivery attempts  is  dou‐
89              bled after each attempt.
90
91       destination status cache
92              The  queue manager avoids unnecessary delivery attempts by main‐
93              taining a short-term, in-memory  list  of  unreachable  destina‐
94              tions.
95
96       preemptive message scheduling
97              The queue manager attempts to minimize the average per-recipient
98              delay while still preserving  the  correct  per-message  delays,
99              using a sophisticated preemptive message scheduling.
100

TRIGGERS

102       On  an  idle system, the queue manager waits for the arrival of trigger
103       events, or it waits for a timer to go off. A trigger is a one-byte mes‐
104       sage.   Depending  on  the message received, the queue manager performs
105       one of the following actions (the message is followed by  the  symbolic
106       constant used internally by the software):
107
108       D (QMGR_REQ_SCAN_DEFERRED)
109              Start  a  deferred  queue  scan.   If  a  deferred queue scan is
110              already in progress, that scan will be restarted as soon  as  it
111              finishes.
112
113       I (QMGR_REQ_SCAN_INCOMING)
114              Start  an  incoming  queue  scan.  If  an incoming queue scan is
115              already in progress, that scan will be restarted as soon  as  it
116              finishes.
117
118       A (QMGR_REQ_SCAN_ALL)
119              Ignore  deferred queue file time stamps. The request affects the
120              next deferred queue scan.
121
122       F (QMGR_REQ_FLUSH_DEAD)
123              Purge all information about dead transports and destinations.
124
125       W (TRIGGER_REQ_WAKEUP)
126              Wakeup call, This is used by the master  server  to  instantiate
127              servers  that should not go away forever. The action is to start
128              an incoming queue scan.
129
130       The qmgr(8) daemon reads an entire buffer worth of triggers.   Multiple
131       identical trigger requests are collapsed into one, and trigger requests
132       are sorted so that A and F precede D and I. Thus, in order to  force  a
133       deferred  queue  run,  one  would request A F D; in order to notify the
134       queue manager of the arrival of new mail one would request I.
135

STANDARDS

137       RFC 3463 (Enhanced status codes)
138       RFC 3464 (Delivery status notifications)
139

SECURITY

141       The qmgr(8) daemon is not security sensitive. It reads single-character
142       messages  from  untrusted  local  users, and thus may be susceptible to
143       denial of service attacks. The qmgr(8) daemon does not talk to the out‐
144       side  world,  and  it  can  be run at fixed low privilege in a chrooted
145       environment.
146

DIAGNOSTICS

148       Problems and transactions are logged to the syslog  daemon.   Corrupted
149       message files are saved to the corrupt queue for further inspection.
150
151       Depending  on the setting of the notify_classes parameter, the postmas‐
152       ter is notified of bounces and of other trouble.
153

BUGS

155       A single queue manager process has to compete for disk access with mul‐
156       tiple front-end processes such as cleanup(8). A sudden burst of inbound
157       mail can negatively impact outbound delivery rates.
158

CONFIGURATION PARAMETERS

160       Changes to main.cf are not picked up automatically as qmgr(8) is a per‐
161       sistent process. Use the "postfix reload" command after a configuration
162       change.
163
164       The text below provides only a parameter summary. See  postconf(5)  for
165       more details including examples.
166
167       In the text below, transport is the first field in a master.cf entry.
168

COMPATIBILITY CONTROLS

170       Available before Postfix version 2.5:
171
172       allow_min_user (no)
173              Allow  a  sender  or  recipient address to have `-' as the first
174              character.
175
176       Available with Postfix version 2.7 and later:
177
178       default_filter_nexthop (empty)
179              When a content_filter or FILTER request  specifies  no  explicit
180              next-hop  destination, use $default_filter_nexthop instead; when
181              that value is empty, use the domain in the recipient address.
182

ACTIVE QUEUE CONTROLS

184       qmgr_clog_warn_time (300s)
185              The minimal delay between warnings that a  specific  destination
186              is clogging up the Postfix active queue.
187
188       qmgr_message_active_limit (20000)
189              The maximal number of messages in the active queue.
190
191       qmgr_message_recipient_limit (20000)
192              The  maximal  number of recipients held in memory by the Postfix
193              queue manager, and the maximal size of the short-term, in-memory
194              "dead" destination status cache.
195
196       qmgr_message_recipient_minimum (10)
197              The minimal number of in-memory recipients for any message.
198
199       default_recipient_limit (20000)
200              The default per-transport upper limit on the number of in-memory
201              recipients.
202
203       transport_recipient_limit ($default_recipient_limit)
204              A transport-specific override  for  the  default_recipient_limit
205              parameter  value,  where  transport is the master.cf name of the
206              message delivery transport.
207
208       default_extra_recipient_limit (1000)
209              The default value for the extra per-transport limit  imposed  on
210              the number of in-memory recipients.
211
212       transport_extra_recipient_limit ($default_extra_recipient_limit)
213              A  transport-specific  override  for  the  default_extra_recipi‐
214              ent_limit parameter value, where transport is the master.cf name
215              of the message delivery transport.
216
217       Available in Postfix version 2.4 and later:
218
219       default_recipient_refill_limit (100)
220              The  default  per-transport  limit  on  the number of recipients
221              refilled at once.
222
223       transport_recipient_refill_limit ($default_recipient_refill_limit)
224              A   transport-specific   override   for   the    default_recipi‐
225              ent_refill_limit  parameter  value,  where transport is the mas‐
226              ter.cf name of the message delivery transport.
227
228       default_recipient_refill_delay (5s)
229              The  default  per-transport  maximum  delay  between  recipients
230              refills.
231
232       transport_recipient_refill_delay ($default_recipient_refill_delay)
233              A    transport-specific   override   for   the   default_recipi‐
234              ent_refill_delay parameter value, where transport  is  the  mas‐
235              ter.cf name of the message delivery transport.
236

DELIVERY CONCURRENCY CONTROLS

238       initial_destination_concurrency (5)
239              The  initial  per-destination  concurrency  level  for  parallel
240              delivery to the same destination.
241
242       default_destination_concurrency_limit (20)
243              The default maximal number of parallel deliveries  to  the  same
244              destination.
245
246       transport_destination_concurrency_limit   ($default_destination_concur‐
247       rency_limit)
248              A transport-specific override for  the  default_destination_con‐
249              currency_limit parameter value, where transport is the master.cf
250              name of the message delivery transport.
251
252       Available in Postfix version 2.5 and later:
253
254       transport_initial_destination_concurrency ($initial_destination_concur‐
255       rency)
256              A  transport-specific  override for the initial_destination_con‐
257              currency parameter value, where transport is the master.cf  name
258              of the message delivery transport.
259
260       default_destination_concurrency_failed_cohort_limit (1)
261              How  many  pseudo-cohorts  must  suffer  connection or handshake
262              failure before a specific destination is considered  unavailable
263              (and further delivery is suspended).
264
265       transport_destination_concurrency_failed_cohort_limit  ($default_desti‐
266       nation_concurrency_failed_cohort_limit)
267              A transport-specific override for  the  default_destination_con‐
268              currency_failed_cohort_limit parameter value, where transport is
269              the master.cf name of the message delivery transport.
270
271       default_destination_concurrency_negative_feedback (1)
272              The per-destination  amount  of  delivery  concurrency  negative
273              feedback,  after a delivery completes with a connection or hand‐
274              shake failure.
275
276       transport_destination_concurrency_negative_feedback  ($default_destina‐
277       tion_concurrency_negative_feedback)
278              A  transport-specific  override for the default_destination_con‐
279              currency_negative_feedback parameter value, where  transport  is
280              the master.cf name of the message delivery transport.
281
282       default_destination_concurrency_positive_feedback (1)
283              The  per-destination  amount  of  delivery  concurrency positive
284              feedback, after a delivery completes without connection or hand‐
285              shake failure.
286
287       transport_destination_concurrency_positive_feedback  ($default_destina‐
288       tion_concurrency_positive_feedback)
289              A transport-specific override for  the  default_destination_con‐
290              currency_positive_feedback  parameter  value, where transport is
291              the master.cf name of the message delivery transport.
292
293       destination_concurrency_feedback_debug (no)
294              Make the queue manager's feedback algorithm verbose for  perfor‐
295              mance analysis purposes.
296

RECIPIENT SCHEDULING CONTROLS

298       default_destination_recipient_limit (50)
299              The default maximal number of recipients per message delivery.
300
301       transport_destination_recipient_limit     ($default_destination_recipi‐
302       ent_limit)
303              A transport-specific override for the default_destination_recip‐
304              ient_limit  parameter  value,  where  transport is the master.cf
305              name of the message delivery transport.
306

MESSAGE SCHEDULING CONTROLS

308       default_delivery_slot_cost (5)
309              How often the Postfix queue manager's scheduler  is  allowed  to
310              preempt delivery of one message with another.
311
312       transport_delivery_slot_cost ($default_delivery_slot_cost)
313              A transport-specific override for the default_delivery_slot_cost
314              parameter value, where transport is the master.cf  name  of  the
315              message delivery transport.
316
317       default_minimum_delivery_slots (3)
318              How  many  recipients a message must have in order to invoke the
319              Postfix queue manager's scheduling algorithm at all.
320
321       transport_minimum_delivery_slots ($default_minimum_delivery_slots)
322              A transport-specific  override  for  the  default_minimum_deliv‐
323              ery_slots parameter value, where transport is the master.cf name
324              of the message delivery transport.
325
326       default_delivery_slot_discount (50)
327              The default value for transport-specific _delivery_slot_discount
328              settings.
329
330       transport_delivery_slot_discount ($default_delivery_slot_discount)
331              A transport-specific override for the default_delivery_slot_dis‐
332              count parameter value, where transport is the master.cf name  of
333              the message delivery transport.
334
335       default_delivery_slot_loan (3)
336              The  default  value  for  transport-specific _delivery_slot_loan
337              settings.
338
339       transport_delivery_slot_loan ($default_delivery_slot_loan)
340              A transport-specific override for the default_delivery_slot_loan
341              parameter  value,  where  transport is the master.cf name of the
342              message delivery transport.
343

OTHER RESOURCE AND RATE CONTROLS

345       minimal_backoff_time (300s)
346              The minimal time between attempts to deliver a deferred message;
347              prior to Postfix 2.4 the default value was 1000s.
348
349       maximal_backoff_time (4000s)
350              The maximal time between attempts to deliver a deferred message.
351
352       maximal_queue_lifetime (5d)
353              Consider  a message as undeliverable, when delivery fails with a
354              temporary error, and the time in the queue has reached the maxi‐
355              mal_queue_lifetime limit.
356
357       queue_run_delay (300s)
358              The  time  between  deferred  queue  scans by the queue manager;
359              prior to Postfix 2.4 the default value was 1000s.
360
361       transport_retry_time (60s)
362              The time between attempts by the Postfix queue manager  to  con‐
363              tact a malfunctioning message delivery transport.
364
365       Available in Postfix version 2.1 and later:
366
367       bounce_queue_lifetime (5d)
368              Consider  a bounce message as undeliverable, when delivery fails
369              with a temporary error, and the time in the  queue  has  reached
370              the bounce_queue_lifetime limit.
371
372       Available in Postfix version 2.5 and later:
373
374       default_destination_rate_delay (0s)
375              The  default amount of delay that is inserted between individual
376              deliveries to  the  same  destination;  the  resulting  behavior
377              depends on the value of the corresponding per-destination recip‐
378              ient limit.
379
380       transport_destination_rate_delay ($default_destination_rate_delay)
381              A   transport-specific   override   for   the   default_destina‐
382              tion_rate_delay  parameter  value,  where  transport is the mas‐
383              ter.cf name of the message delivery transport.
384
385       Available in Postfix version 3.1 and later:
386
387       default_transport_rate_delay (0s)
388              The default amount of delay that is inserted between  individual
389              deliveries  over the same message delivery transport, regardless
390              of destination.
391
392       transport_transport_rate_delay ($default_transport_rate_delay)
393              A   transport-specific   override   for    the    default_trans‐
394              port_rate_delay  parameter value, where the initial transport in
395              the parameter name is the master.cf name of the message delivery
396              transport.
397

SAFETY CONTROLS

399       qmgr_daemon_timeout (1000s)
400              How much time a Postfix queue manager process may take to handle
401              a request before it is terminated by a built-in watchdog timer.
402
403       qmgr_ipc_timeout (60s)
404              The time limit for the queue manager to send or receive informa‐
405              tion over an internal communication channel.
406
407       Available in Postfix version 3.1 and later:
408
409       address_verify_pending_request_limit (see 'postconf -d' output)
410              A  safety limit that prevents address verification requests from
411              overwhelming the Postfix queue.
412

MISCELLANEOUS CONTROLS

414       config_directory (see 'postconf -d' output)
415              The default location of the Postfix main.cf and  master.cf  con‐
416              figuration files.
417
418       defer_transports (empty)
419              The names of message delivery transports that should not deliver
420              mail unless someone issues "sendmail -q" or equivalent.
421
422       delay_logging_resolution_limit (2)
423              The maximal number of digits after the decimal point  when  log‐
424              ging sub-second delay values.
425
426       helpful_warnings (yes)
427              Log  warnings about problematic configuration settings, and pro‐
428              vide helpful suggestions.
429
430       process_id (read-only)
431              The process ID of a Postfix command or daemon process.
432
433       process_name (read-only)
434              The process name of a Postfix command or daemon process.
435
436       queue_directory (see 'postconf -d' output)
437              The location of the Postfix top-level queue directory.
438
439       syslog_facility (mail)
440              The syslog facility of Postfix logging.
441
442       syslog_name (see 'postconf -d' output)
443              A prefix that  is  prepended  to  the  process  name  in  syslog
444              records, so that, for example, "smtpd" becomes "prefix/smtpd".
445
446       Available in Postfix version 3.0 and later:
447
448       confirm_delay_cleared (no)
449              After  sending  a "your message is delayed" notification, inform
450              the sender when the delay clears up.
451
452       Available in Postfix 3.3 and later:
453
454       service_name (read-only)
455              The master.cf service name of a Postfix daemon process.
456

FILES

458       /var/spool/postfix/incoming, incoming queue
459       /var/spool/postfix/active, active queue
460       /var/spool/postfix/deferred, deferred queue
461       /var/spool/postfix/bounce, non-delivery status
462       /var/spool/postfix/defer, non-delivery status
463       /var/spool/postfix/trace, delivery status
464

SEE ALSO

466       trivial-rewrite(8), address routing
467       bounce(8), delivery status reports
468       postconf(5), configuration parameters
469       master(5), generic daemon options
470       master(8), process manager
471       syslogd(8), system logging
472

README FILES

474       Use "postconf readme_directory" or "postconf html_directory" to  locate
475       this information.
476       SCHEDULER_README, scheduling algorithm
477       QSHAPE_README, Postfix queue analysis
478

LICENSE

480       The Secure Mailer license must be distributed with this software.
481

AUTHOR(S)

483       Wietse Venema
484       IBM T.J. Watson Research
485       P.O. Box 704
486       Yorktown Heights, NY 10598, USA
487
488       Preemptive scheduler enhancements:
489       Patrik Rak
490       Modra 6
491       155 00, Prague, Czech Republic
492
493       Wietse Venema
494       Google, Inc.
495       111 8th Avenue
496       New York, NY 10011, USA
497
498
499
500                                                                       QMGR(8)
Impressum