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

ACTIVE QUEUE CONTROLS

177       qmgr_clog_warn_time (300s)
178              The minimal delay between warnings that a  specific  destination
179              is clogging up the Postfix active queue.
180
181       qmgr_message_active_limit (20000)
182              The maximal number of messages in the active queue.
183
184       qmgr_message_recipient_limit (20000)
185              The  maximal  number of recipients held in memory by the Postfix
186              queue manager, and the maximal size of the size  of  the  short-
187              term, in-memory "dead" destination status cache.
188
189       qmgr_message_recipient_minimum (10)
190              The minimal number of in-memory recipients for any message.
191
192       default_recipient_limit (20000)
193              The default per-transport upper limit on the number of in-memory
194              recipients.
195
196       transport_recipient_limit ($default_recipient_limit)
197              Idem, for delivery via the named message transport.
198
199       default_extra_recipient_limit (1000)
200              The default value for the extra per-transport limit  imposed  on
201              the number of in-memory recipients.
202
203       transport_extra_recipient_limit ($default_extra_recipient_limit)
204              Idem, for delivery via the named message transport.
205
206       Available in Postfix version 2.4 and later:
207
208       default_recipient_refill_limit (100)
209              The  default  per-transport  limit  on  the number of recipients
210              refilled at once.
211
212       transport_recipient_refill_limit ($default_recipient_refill_limit)
213              Idem, for delivery via the named message transport.
214
215       default_recipient_refill_delay (5s)
216              The  default  per-transport  maximum  delay  between  recipients
217              refills.
218
219       transport_recipient_refill_delay ($default_recipient_refill_delay)
220              Idem, for delivery via the named message transport.
221

DELIVERY CONCURRENCY CONTROLS

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

RECIPIENT SCHEDULING CONTROLS

274       default_destination_recipient_limit (50)
275              The default maximal number of recipients per message delivery.
276
277       transport_destination_recipient_limit     ($default_destination_recipi‐
278       ent_limit)
279              Idem, for delivery via the named message transport.
280

MESSAGE SCHEDULING CONTROLS

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

OTHER RESOURCE AND RATE CONTROLS

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

MISCELLANEOUS CONTROLS

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

FILES

386       /var/spool/postfix/incoming, incoming queue
387       /var/spool/postfix/active, active queue
388       /var/spool/postfix/deferred, deferred queue
389       /var/spool/postfix/bounce, non-delivery status
390       /var/spool/postfix/defer, non-delivery status
391       /var/spool/postfix/trace, delivery status
392

SEE ALSO

394       trivial-rewrite(8), address routing
395       bounce(8), delivery status reports
396       postconf(5), configuration parameters
397       master(5), generic daemon options
398       master(8), process manager
399       syslogd(8), system logging
400

README FILES

402       Use "postconf readme_directory" or "postconf html_directory" to  locate
403       this information.
404       SCHEDULER_README, scheduling algorithm
405       QSHAPE_README, Postfix queue analysis
406

LICENSE

408       The Secure Mailer license must be distributed with this software.
409

AUTHOR(S)

411       Wietse Venema
412       IBM T.J. Watson Research
413       P.O. Box 704
414       Yorktown Heights, NY 10598, USA
415
416       Preemptive scheduler enhancements:
417       Patrik Rak
418       Modra 6
419       155 00, Prague, Czech Republic
420
421
422
423                                                                       QMGR(8)
Impressum