1POSTQUEUE(1) General Commands Manual POSTQUEUE(1)
2
3
4
6 postqueue - Postfix queue control
7
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
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
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
140 This program is designed to run with set-group ID privileges, so that
141 it can connect to Postfix daemon processes.
142
144 RFC 7159 (JSON notation)
145
147 Problems are logged to syslogd(8) or postlogd(8), and to the standard
148 error stream.
149
151 MAIL_CONFIG
152 Directory with the main.cf file. In order to avoid exploitation
153 of set-group ID privileges, a non-standard directory is allowed
154 only if:
155
156 · The name is listed in the standard main.cf file with the
157 alternate_config_directories configuration parameter.
158
159 · The command is invoked by the super-user.
160
162 The following main.cf parameters are especially relevant to this pro‐
163 gram. The text below provides only a parameter summary. See post‐
164 conf(5) for more details including examples.
165
166 alternate_config_directories (empty)
167 A list of non-default Postfix configuration directories that may
168 be specified with "-c config_directory" on the command line (in
169 the case of sendmail(1), with the "-C" option), or via the
170 MAIL_CONFIG environment parameter.
171
172 config_directory (see 'postconf -d' output)
173 The default location of the Postfix main.cf and master.cf con‐
174 figuration files.
175
176 command_directory (see 'postconf -d' output)
177 The location of all postfix administrative commands.
178
179 fast_flush_domains ($relay_domains)
180 Optional list of destinations that are eligible for per-destina‐
181 tion logfiles with mail that is queued to those destinations.
182
183 import_environment (see 'postconf -d' output)
184 The list of environment parameters that a privileged Postfix
185 process will import from a non-Postfix parent process, or
186 name=value environment overrides.
187
188 queue_directory (see 'postconf -d' output)
189 The location of the Postfix top-level queue directory.
190
191 syslog_facility (mail)
192 The syslog facility of Postfix logging.
193
194 syslog_name (see 'postconf -d' output)
195 A prefix that is prepended to the process name in syslog
196 records, so that, for example, "smtpd" becomes "prefix/smtpd".
197
198 trigger_timeout (10s)
199 The time limit for sending a trigger to a Postfix daemon (for
200 example, the pickup(8) or qmgr(8) daemon).
201
202 Available in Postfix version 2.2 and later:
203
204 authorized_flush_users (static:anyone)
205 List of users who are authorized to flush the queue.
206
207 authorized_mailq_users (static:anyone)
208 List of users who are authorized to view the queue.
209
211 /var/spool/postfix, mail queue
212
214 qmgr(8), queue manager
215 showq(8), list mail queue
216 flush(8), fast flush service
217 sendmail(1), Sendmail-compatible user interface
218 postsuper(1), privileged queue operations
219 postlogd(8), Postfix logging
220 syslogd(8), system logging
221
223 Use "postconf readme_directory" or "postconf html_directory" to locate
224 this information.
225 ETRN_README, Postfix ETRN howto
226
228 The Secure Mailer license must be distributed with this software.
229
231 The postqueue command was introduced with Postfix version 1.1.
232
234 Wietse Venema
235 IBM T.J. Watson Research
236 P.O. Box 704
237 Yorktown Heights, NY 10598, USA
238
239 Wietse Venema
240 Google, Inc.
241 111 8th Avenue
242 New York, NY 10011, USA
243
244
245
246 POSTQUEUE(1)