1POSTQUEUE(1)                General Commands Manual               POSTQUEUE(1)
2
3
4

NAME

6       postqueue - Postfix queue control
7

SYNOPSIS

9   To flush the mail queue:
10
11       postqueue [-v] [-c config_dir] -f
12
13       postqueue [-v] [-c config_dir] -i queue_id
14
15       postqueue [-v] [-c config_dir] -s site
16
17   To list the mail queue:
18
19       postqueue [-v] [-c config_dir] -j
20
21       postqueue [-v] [-c config_dir] -p
22

DESCRIPTION

24       The  postqueue(1)  command  implements  the  Postfix user interface for
25       queue management.  It  implements  operations  that  are  traditionally
26       available  via  the  sendmail(1) command.  See the postsuper(1) command
27       for queue operations that require super-user privileges such as  delet‐
28       ing a message from the queue or changing the status of a message.
29
30       The following options are recognized:
31
32       -c config_dir
33              The main.cf configuration file is in the named directory instead
34              of the default configuration directory. See also the MAIL_CONFIG
35              environment setting below.
36
37       -f     Flush the queue: attempt to deliver all queued mail.
38
39              This option implements the traditional "sendmail -q" command, by
40              contacting the Postfix qmgr(8) daemon.
41
42              Warning: flushing undeliverable mail frequently will  result  in
43              poor delivery performance of all other mail.
44
45       -i queue_id
46              Schedule  immediate delivery of deferred mail with the specified
47              queue ID.
48
49              This option implements the traditional sendmail -qI command,  by
50              contacting the flush(8) server.
51
52              This feature is available with Postfix version 2.4 and later.
53
54       -j     Produce  a  queue  listing in JSON LINES format, based on output
55              from the showq(8) daemon. See "JSON OBJECT FORMAT" below for de‐
56              tails.
57
58              This feature is available in Postfix 3.1 and later.
59
60       -p     Produce a traditional sendmail-style queue listing.  This option
61              implements the traditional  mailq  command,  by  contacting  the
62              Postfix showq(8) daemon.
63
64              Each  queue entry shows the queue file ID, message size, arrival
65              time, sender, and the recipients that still need  to  be  deliv‐
66              ered.  If mail could not be delivered upon the last attempt, the
67              reason for failure is shown. The queue ID string is followed  by
68              an optional status character:
69
70              *      The  message  is in the active queue, i.e. the message is
71                     selected for delivery.
72
73              !      The message is in the hold queue, i.e. no further  deliv‐
74                     ery  attempt  will  be  made  until the mail is taken off
75                     hold.
76
77              #      The message is forced to expire. See the postsuper(1) op‐
78                     tions -e or -f.
79
80                     This feature is available in Postfix 3.5 and later.
81
82       -s site
83              Schedule  immediate  delivery of all mail that is queued for the
84              named site. A numerical site must be specified as  a  valid  RFC
85              5321  address  literal  enclosed  in  [], just like in email ad‐
86              dresses.  The site must be eligible for the  "fast  flush"  ser‐
87              vice.   See flush(8) for more information about the "fast flush"
88              service.
89
90              This option implements the traditional "sendmail  -qRsite"  com‐
91              mand, by contacting the Postfix flush(8) daemon.
92
93       -v     Enable  verbose  logging for debugging purposes. Multiple -v op‐
94              tions make the software increasingly verbose. As of Postfix 2.3,
95              this option is available for the super-user only.
96

JSON OBJECT FORMAT

98       Each  JSON  object represents one queue file; it is emitted as a single
99       text line followed by a newline character.
100
101       Object members have string values unless indicated otherwise.  Programs
102       should ignore object members that are not listed here; the list of mem‐
103       bers is expected to grow over time.
104
105       queue_name
106              The name of the queue where the message was  found.   Note  that
107              the  contents  of  the  mail  queue may change while it is being
108              listed; some messages may appear more than once, and  some  mes‐
109              sages may be missed.
110
111       queue_id
112              The queue file name. The queue_id may be reused within a Postfix
113              instance unless "enable_long_queue_ids = true" and time is mono‐
114              tonic.  Even then, the queue_id is not expected to be unique be‐
115              tween different Postfix instances.  Management  tools  that  re‐
116              quire a unique name should combine the queue_id with the myhost‐
117              name setting of the Postfix instance.
118
119       arrival_time
120              The number of seconds since the start of the UNIX epoch.
121
122       message_size
123              The number of bytes in the message header and body. This  number
124              does  not  include  message envelope information. It is approxi‐
125              mately equal to the number of bytes that  would  be  transmitted
126              via SMTP including the <CR><LF> line endings.
127
128       forced_expire
129              The  message is forced to expire (true or false).  See the post‐
130              super(1) options -e or -f.
131
132              This feature is available in Postfix 3.5 and later.
133
134       sender The envelope sender address.
135
136       recipients
137              An array containing zero or more objects with members:
138
139              address
140                     One recipient address.
141
142              delay_reason
143                     If present, the reason for delayed delivery.  Delayed re‐
144                     cipients may have no delay reason, for example, while de‐
145                     livery is in progress, or after the  system  was  stopped
146                     before it could record the reason.
147

SECURITY

149       This  program  is designed to run with set-group ID privileges, so that
150       it can connect to Postfix daemon processes.
151

STANDARDS

153       RFC 7159 (JSON notation)
154

DIAGNOSTICS

156       Problems are logged to syslogd(8) or postlogd(8), and to  the  standard
157       error stream.
158

ENVIRONMENT

160       MAIL_CONFIG
161              Directory  with the main.cf file. In order to avoid exploitation
162              of set-group ID privileges, a non-standard directory is  allowed
163              only if:
164
165              •      The  name is listed in the standard main.cf file with the
166                     alternate_config_directories configuration parameter.
167
168              •      The command is invoked by the super-user.
169

CONFIGURATION PARAMETERS

171       The following main.cf parameters are especially relevant to  this  pro‐
172       gram.   The  text  below  provides  only a parameter summary. See post‐
173       conf(5) for more details including examples.
174
175       alternate_config_directories (empty)
176              A list of non-default Postfix configuration directories that may
177              be  specified with "-c config_directory" on the command line (in
178              the case of sendmail(1), with  the  "-C"  option),  or  via  the
179              MAIL_CONFIG environment parameter.
180
181       config_directory (see 'postconf -d' output)
182              The  default  location of the Postfix main.cf and master.cf con‐
183              figuration files.
184
185       command_directory (see 'postconf -d' output)
186              The location of all postfix administrative commands.
187
188       fast_flush_domains ($relay_domains)
189              Optional list of destinations that are eligible for per-destina‐
190              tion logfiles with mail that is queued to those destinations.
191
192       import_environment (see 'postconf -d' output)
193              The  list  of  environment  variables  that a privileged Postfix
194              process will  import  from  a  non-Postfix  parent  process,  or
195              name=value environment overrides.
196
197       queue_directory (see 'postconf -d' output)
198              The location of the Postfix top-level queue directory.
199
200       syslog_facility (mail)
201              The syslog facility of Postfix logging.
202
203       syslog_name (see 'postconf -d' output)
204              A  prefix  that  is  prepended  to  the  process  name in syslog
205              records, so that, for example, "smtpd" becomes "prefix/smtpd".
206
207       trigger_timeout (10s)
208              The time limit for sending a trigger to a  Postfix  daemon  (for
209              example, the pickup(8) or qmgr(8) daemon).
210
211       Available in Postfix version 2.2 and later:
212
213       authorized_flush_users (static:anyone)
214              List of users who are authorized to flush the queue.
215
216       authorized_mailq_users (static:anyone)
217              List of users who are authorized to view the queue.
218

FILES

220       /var/spool/postfix, mail queue
221

SEE ALSO

223       qmgr(8), queue manager
224       showq(8), list mail queue
225       flush(8), fast flush service
226       sendmail(1), Sendmail-compatible user interface
227       postsuper(1), privileged queue operations
228       postlogd(8), Postfix logging
229       syslogd(8), system logging
230

README FILES

232       Use  "postconf readme_directory" or "postconf html_directory" to locate
233       this information.
234       ETRN_README, Postfix ETRN howto
235

LICENSE

237       The Secure Mailer license must be distributed with this software.
238

HISTORY

240       The postqueue command was introduced with Postfix version 1.1.
241

AUTHOR(S)

243       Wietse Venema
244       IBM T.J. Watson Research
245       P.O. Box 704
246       Yorktown Heights, NY 10598, USA
247
248       Wietse Venema
249       Google, Inc.
250       111 8th Avenue
251       New York, NY 10011, USA
252
253
254
255                                                                  POSTQUEUE(1)
Impressum