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 format, based on output from the
55              showq(8) daemon.  The result is a stream of zero  or  more  JSON
56              objects,  one per queue file.  Each object is followed by a new‐
57              line character to support simple streaming  parsers.  See  "JSON
58              OBJECT FORMAT" below for details.
59
60              This feature is available in Postfix 3.1 and later.
61
62       -p     Produce a traditional sendmail-style queue listing.  This option
63              implements the traditional  mailq  command,  by  contacting  the
64              Postfix showq(8) daemon.
65
66              Each  queue entry shows the queue file ID, message size, arrival
67              time, sender, and the recipients that still need  to  be  deliv‐
68              ered.  If mail could not be delivered upon the last attempt, the
69              reason for failure is shown. The queue ID string is followed  by
70              an optional status character:
71
72              *      The  message  is in the active queue, i.e. the message is
73                     selected for delivery.
74
75              !      The message is in the hold queue, i.e. no further  deliv‐
76                     ery  attempt  will  be  made  until the mail is taken off
77                     hold.
78
79       -s site
80              Schedule immediate delivery of all mail that is queued  for  the
81              named  site.  A  numerical site must be specified as a valid RFC
82              5321  address  literal  enclosed  in  [],  just  like  in  email
83              addresses.   The site must be eligible for the "fast flush" ser‐
84              vice.  See flush(8) for more information about the "fast  flush"
85              service.
86
87              This  option  implements the traditional "sendmail -qRsite" com‐
88              mand, by contacting the Postfix flush(8) daemon.
89
90       -v     Enable verbose  logging  for  debugging  purposes.  Multiple  -v
91              options  make  the  software increasingly verbose. As of Postfix
92              2.3, this option is available for the super-user only.
93

JSON OBJECT FORMAT

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

SECURITY

140       This  program  is designed to run with set-group ID privileges, so that
141       it can connect to Postfix daemon processes.
142

STANDARDS

144       RFC 7159 (JSON notation)
145

DIAGNOSTICS

147       Problems are logged to syslogd(8) and to the standard error stream.
148

ENVIRONMENT

150       MAIL_CONFIG
151              Directory with the main.cf file. In order to avoid  exploitation
152              of  set-group ID privileges, a non-standard directory is allowed
153              only if:
154
155              ·      The name is listed in the standard main.cf file with  the
156                     alternate_config_directories configuration parameter.
157
158              ·      The command is invoked by the super-user.
159

CONFIGURATION PARAMETERS

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

FILES

210       /var/spool/postfix, mail queue
211

SEE ALSO

213       qmgr(8), queue manager
214       showq(8), list mail queue
215       flush(8), fast flush service
216       sendmail(1), Sendmail-compatible user interface
217       postsuper(1), privileged queue operations
218

README FILES

220       Use "postconf readme_directory" or "postconf html_directory" to  locate
221       this information.
222       ETRN_README, Postfix ETRN howto
223

LICENSE

225       The Secure Mailer license must be distributed with this software.
226

HISTORY

228       The postqueue command was introduced with Postfix version 1.1.
229

AUTHOR(S)

231       Wietse Venema
232       IBM T.J. Watson Research
233       P.O. Box 704
234       Yorktown Heights, NY 10598, USA
235
236       Wietse Venema
237       Google, Inc.
238       111 8th Avenue
239       New York, NY 10011, USA
240
241
242
243                                                                  POSTQUEUE(1)
Impressum