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 size  of  the  short-
194              term, in-memory "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              Idem, for delivery via the named message transport.
205
206       default_extra_recipient_limit (1000)
207              The default value for the extra per-transport limit  imposed  on
208              the number of in-memory recipients.
209
210       transport_extra_recipient_limit ($default_extra_recipient_limit)
211              Idem, for delivery via the named message transport.
212
213       Available in Postfix version 2.4 and later:
214
215       default_recipient_refill_limit (100)
216              The  default  per-transport  limit  on  the number of recipients
217              refilled at once.
218
219       transport_recipient_refill_limit ($default_recipient_refill_limit)
220              Idem, for delivery via the named message transport.
221
222       default_recipient_refill_delay (5s)
223              The  default  per-transport  maximum  delay  between  recipients
224              refills.
225
226       transport_recipient_refill_delay ($default_recipient_refill_delay)
227              Idem, for delivery via the named message transport.
228

DELIVERY CONCURRENCY CONTROLS

230       initial_destination_concurrency (5)
231              The  initial  per-destination  concurrency  level  for  parallel
232              delivery to the same destination.
233
234       default_destination_concurrency_limit (20)
235              The default maximal number of parallel deliveries  to  the  same
236              destination.
237
238       transport_destination_concurrency_limit   ($default_destination_concur‐
239       rency_limit)
240              Idem, for delivery via the named message transport.
241
242       Available in Postfix version 2.5 and later:
243
244       transport_initial_destination_concurrency ($initial_destination_concur‐
245       rency)
246              Initial  concurrency  for  delivery via the named message trans‐
247              port.
248
249       default_destination_concurrency_failed_cohort_limit (1)
250              How many pseudo-cohorts  must  suffer  connection  or  handshake
251              failure  before a specific destination is considered unavailable
252              (and further delivery is suspended).
253
254       transport_destination_concurrency_failed_cohort_limit  ($default_desti‐
255       nation_concurrency_failed_cohort_limit)
256              Idem, for delivery via the named message transport.
257
258       default_destination_concurrency_negative_feedback (1)
259              The  per-destination  amount  of  delivery  concurrency negative
260              feedback, after a delivery completes with a connection or  hand‐
261              shake failure.
262
263       transport_destination_concurrency_negative_feedback  ($default_destina‐
264       tion_concurrency_negative_feedback)
265              Idem, for delivery via the named message transport.
266
267       default_destination_concurrency_positive_feedback (1)
268              The per-destination  amount  of  delivery  concurrency  positive
269              feedback, after a delivery completes without connection or hand‐
270              shake failure.
271
272       transport_destination_concurrency_positive_feedback  ($default_destina‐
273       tion_concurrency_positive_feedback)
274              Idem, for delivery via the named message transport.
275
276       destination_concurrency_feedback_debug (no)
277              Make  the queue manager's feedback algorithm verbose for perfor‐
278              mance analysis purposes.
279

RECIPIENT SCHEDULING CONTROLS

281       default_destination_recipient_limit (50)
282              The default maximal number of recipients per message delivery.
283
284       transport_destination_recipient_limit     ($default_destination_recipi‐
285       ent_limit)
286              Idem, for delivery via the named message transport.
287

MESSAGE SCHEDULING CONTROLS

289       default_delivery_slot_cost (5)
290              How  often  the  Postfix queue manager's scheduler is allowed to
291              preempt delivery of one message with another.
292
293       transport_delivery_slot_cost ($default_delivery_slot_cost)
294              Idem, for delivery via the named message transport.
295
296       default_minimum_delivery_slots (3)
297              How many recipients a message must have in order to  invoke  the
298              Postfix queue manager's scheduling algorithm at all.
299
300       transport_minimum_delivery_slots ($default_minimum_delivery_slots)
301              Idem, for delivery via the named message transport.
302
303       default_delivery_slot_discount (50)
304              The default value for transport-specific _delivery_slot_discount
305              settings.
306
307       transport_delivery_slot_discount ($default_delivery_slot_discount)
308              Idem, for delivery via the named message transport.
309
310       default_delivery_slot_loan (3)
311              The default  value  for  transport-specific  _delivery_slot_loan
312              settings.
313
314       transport_delivery_slot_loan ($default_delivery_slot_loan)
315              Idem, for delivery via the named message transport.
316

OTHER RESOURCE AND RATE CONTROLS

318       minimal_backoff_time (300s)
319              The minimal time between attempts to deliver a deferred message;
320              prior to Postfix 2.4 the default value was 1000s.
321
322       maximal_backoff_time (4000s)
323              The maximal time between attempts to deliver a deferred message.
324
325       maximal_queue_lifetime (5d)
326              The maximal time a message is queued before it is sent  back  as
327              undeliverable.
328
329       queue_run_delay (300s)
330              The  time  between  deferred  queue  scans by the queue manager;
331              prior to Postfix 2.4 the default value was 1000s.
332
333       transport_retry_time (60s)
334              The time between attempts by the Postfix queue manager  to  con‐
335              tact a malfunctioning message delivery transport.
336
337       Available in Postfix version 2.1 and later:
338
339       bounce_queue_lifetime (5d)
340              The maximal time a bounce message is queued before it is consid‐
341              ered undeliverable.
342
343       Available in Postfix version 2.5 and later:
344
345       default_destination_rate_delay (0s)
346              The default amount of delay that is inserted between  individual
347              deliveries to the same destination; with per-destination recipi‐
348              ent limit > 1, a destination is a  domain,  otherwise  it  is  a
349              recipient.
350
351       transport_destination_rate_delay $default_destination_rate_delay
352              Idem, for delivery via the named message transport.
353

MISCELLANEOUS CONTROLS

355       config_directory (see 'postconf -d' output)
356              The  default  location of the Postfix main.cf and master.cf con‐
357              figuration files.
358
359       defer_transports (empty)
360              The names of message delivery transports that should not deliver
361              mail unless someone issues "sendmail -q" or equivalent.
362
363       delay_logging_resolution_limit (2)
364              The  maximal  number of digits after the decimal point when log‐
365              ging sub-second delay values.
366
367       helpful_warnings (yes)
368              Log warnings about problematic configuration settings, and  pro‐
369              vide helpful suggestions.
370
371       ipc_timeout (3600s)
372              The  time  limit  for  sending  or receiving information over an
373              internal communication channel.
374
375       process_id (read-only)
376              The process ID of a Postfix command or daemon process.
377
378       process_name (read-only)
379              The process name of a Postfix command or daemon process.
380
381       queue_directory (see 'postconf -d' output)
382              The location of the Postfix top-level queue directory.
383
384       syslog_facility (mail)
385              The syslog facility of Postfix logging.
386
387       syslog_name (see 'postconf -d' output)
388              The mail system name that is prepended to the  process  name  in
389              syslog  records,  so  that  "smtpd" becomes, for example, "post‐
390              fix/smtpd".
391

FILES

393       /var/spool/postfix/incoming, incoming queue
394       /var/spool/postfix/active, active queue
395       /var/spool/postfix/deferred, deferred queue
396       /var/spool/postfix/bounce, non-delivery status
397       /var/spool/postfix/defer, non-delivery status
398       /var/spool/postfix/trace, delivery status
399

SEE ALSO

401       trivial-rewrite(8), address routing
402       bounce(8), delivery status reports
403       postconf(5), configuration parameters
404       master(5), generic daemon options
405       master(8), process manager
406       syslogd(8), system logging
407

README FILES

409       Use "postconf readme_directory" or "postconf html_directory" to  locate
410       this information.
411       SCHEDULER_README, scheduling algorithm
412       QSHAPE_README, Postfix queue analysis
413

LICENSE

415       The Secure Mailer license must be distributed with this software.
416

AUTHOR(S)

418       Wietse Venema
419       IBM T.J. Watson Research
420       P.O. Box 704
421       Yorktown Heights, NY 10598, USA
422
423       Preemptive scheduler enhancements:
424       Patrik Rak
425       Modra 6
426       155 00, Prague, Czech Republic
427
428
429
430                                                                       QMGR(8)
Impressum