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       allow_min_user (no)
171              Allow a recipient address to have `-' as the first character.
172

ACTIVE QUEUE CONTROLS

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

DELIVERY CONCURRENCY CONTROLS

220       initial_destination_concurrency (5)
221              The  initial  per-destination  concurrency  level  for  parallel
222              delivery to the same destination.
223
224       default_destination_concurrency_limit (20)
225              The  default  maximal  number of parallel deliveries to the same
226              destination.
227
228       transport_destination_concurrency_limit   ($default_destination_concur‐
229       rency_limit)
230              Idem, for delivery via the named message transport.
231

RECIPIENT SCHEDULING CONTROLS

233       default_destination_recipient_limit (50)
234              The default maximal number of recipients per message delivery.
235
236       transport_destination_recipient_limit     ($default_destination_recipi‐
237       ent_limit)
238              Idem, for delivery via the named message transport.
239

MESSAGE SCHEDULING CONTROLS

241       default_delivery_slot_cost (5)
242              How often the Postfix queue manager's scheduler  is  allowed  to
243              preempt delivery of one message with another.
244
245       transport_delivery_slot_cost ($default_delivery_slot_cost)
246              Idem, for delivery via the named message transport.
247
248       default_minimum_delivery_slots (3)
249              How  many  recipients a message must have in order to invoke the
250              Postfix queue manager's scheduling algorithm at all.
251
252       transport_minimum_delivery_slots ($default_minimum_delivery_slots)
253              Idem, for delivery via the named message transport.
254
255       default_delivery_slot_discount (50)
256              The default value for transport-specific _delivery_slot_discount
257              settings.
258
259       transport_delivery_slot_discount ($default_delivery_slot_discount)
260              Idem, for delivery via the named message transport.
261
262       default_delivery_slot_loan (3)
263              The  default  value  for  transport-specific _delivery_slot_loan
264              settings.
265
266       transport_delivery_slot_loan ($default_delivery_slot_loan)
267              Idem, for delivery via the named message transport.
268

OTHER RESOURCE AND RATE CONTROLS

270       minimal_backoff_time (version dependent)
271              The minimal time between attempts to deliver a deferred message.
272
273       maximal_backoff_time (4000s)
274              The maximal time between attempts to deliver a deferred message.
275
276       maximal_queue_lifetime (5d)
277              The maximal time a message is queued before it is sent  back  as
278              undeliverable.
279
280       queue_run_delay (version dependent)
281              The time between deferred queue scans by the queue manager.
282
283       transport_retry_time (60s)
284              The  time  between attempts by the Postfix queue manager to con‐
285              tact a malfunctioning message delivery transport.
286
287       Available in Postfix version 2.1 and later:
288
289       bounce_queue_lifetime (5d)
290              The maximal time a bounce message is queued before it is consid‐
291              ered undeliverable.
292

MISCELLANEOUS CONTROLS

294       config_directory (see 'postconf -d' output)
295              The  default  location of the Postfix main.cf and master.cf con‐
296              figuration files.
297
298       daemon_timeout (18000s)
299              How much time a Postfix daemon process  may  take  to  handle  a
300              request before it is terminated by a built-in watchdog timer.
301
302       defer_transports (empty)
303              The names of message delivery transports that should not deliver
304              mail unless someone issues "sendmail -q" or equivalent.
305
306       delay_logging_resolution_limit (2)
307              The maximal number of digits after the decimal point  when  log‐
308              ging sub-second delay values.
309
310       helpful_warnings (yes)
311              Log  warnings about problematic configuration settings, and pro‐
312              vide helpful suggestions.
313
314       ipc_timeout (3600s)
315              The time limit for sending  or  receiving  information  over  an
316              internal communication channel.
317
318       process_id (read-only)
319              The process ID of a Postfix command or daemon process.
320
321       process_name (read-only)
322              The process name of a Postfix command or daemon process.
323
324       queue_directory (see 'postconf -d' output)
325              The location of the Postfix top-level queue directory.
326
327       syslog_facility (mail)
328              The syslog facility of Postfix logging.
329
330       syslog_name (postfix)
331              The  mail  system  name that is prepended to the process name in
332              syslog records, so that "smtpd"  becomes,  for  example,  "post‐
333              fix/smtpd".
334

FILES

336       /var/spool/postfix/incoming, incoming queue
337       /var/spool/postfix/active, active queue
338       /var/spool/postfix/deferred, deferred queue
339       /var/spool/postfix/bounce, non-delivery status
340       /var/spool/postfix/defer, non-delivery status
341       /var/spool/postfix/trace, delivery status
342

SEE ALSO

344       trivial-rewrite(8), address routing
345       bounce(8), delivery status reports
346       postconf(5), configuration parameters
347       master(5), generic daemon options
348       master(8), process manager
349       syslogd(8), system logging
350

README FILES

352       Use  "postconf readme_directory" or "postconf html_directory" to locate
353       this information.
354       SCHEDULER_README, scheduling algorithm
355       QSHAPE_README, Postfix queue analysis
356

LICENSE

358       The Secure Mailer license must be distributed with this software.
359

AUTHOR(S)

361       Wietse Venema
362       IBM T.J. Watson Research
363       P.O. Box 704
364       Yorktown Heights, NY 10598, USA
365
366       Scheduler enhancements:
367       Patrik Rak
368       Modra 6
369       155 00, Prague, Czech Republic
370
371
372
373                                                                       QMGR(8)
Impressum