1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "https://www.w3.org/TR/html4/loose.dtd"> 3 <html> <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <link rel='stylesheet' type='text/css' href='postfix-doc.css'> 6 <title> Postfix manual - postqueue(1) </title> 7 </head> <body> <pre> 8 POSTQUEUE(1) POSTQUEUE(1) 9 10 <b><a name="name">NAME</a></b> 11 postqueue - Postfix queue control 12 13 <b><a name="synopsis">SYNOPSIS</a></b> 14 <b>To flush the mail queue</b>: 15 16 <b>postqueue</b> [<b>-v</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <b>-f</b> 17 18 <b>postqueue</b> [<b>-v</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <b>-i</b> <i>queue</i><b>_</b><i>id</i> 19 20 <b>postqueue</b> [<b>-v</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <b>-s</b> <i>site</i> 21 22 <b>To list the mail queue</b>: 23 24 <b>postqueue</b> [<b>-v</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <b>-j</b> 25 26 <b>postqueue</b> [<b>-v</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] <b>-p</b> 27 28 <b><a name="description">DESCRIPTION</a></b> 29 The <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command implements the Postfix user interface for 30 queue management. It implements operations that are traditionally 31 available via the <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command. See the <a href="postsuper.1.html"><b>postsuper</b>(1)</a> command 32 for queue operations that require super-user privileges such as delet- 33 ing a message from the queue or changing the status of a message. 34 35 The following options are recognized: 36 37 <b>-c</b> <i>config</i><b>_</b><i>dir</i> 38 The <a href="postconf.5.html"><b>main.cf</b></a> configuration file is in the named directory instead 39 of the default configuration directory. See also the MAIL_CONFIG 40 environment setting below. 41 42 <b>-f</b> Flush the queue: attempt to deliver all queued mail. 43 44 This option implements the traditional "<b>sendmail -q</b>" command, by 45 contacting the Postfix <a href="qmgr.8.html"><b>qmgr</b>(8)</a> daemon. 46 47 Warning: flushing undeliverable mail frequently will result in 48 poor delivery performance of all other mail. 49 50 <b>-i</b> <i>queue</i><b>_</b><i>id</i> 51 Schedule immediate delivery of deferred mail with the specified 52 queue ID. 53 54 This option implements the traditional <b>sendmail -qI</b> command, by 55 contacting the <a href="flush.8.html"><b>flush</b>(8)</a> server. 56 57 This feature is available with Postfix version 2.4 and later. 58 59 <b>-j</b> Produce a queue listing in JSON LINES format, based on output 60 from the <a href="showq.8.html">showq(8)</a> daemon. See "<b>JSON OBJECT FORMAT</b>" below for 61 details. 62 63 This feature is available in Postfix 3.1 and later. 64 65 <b>-p</b> Produce a traditional sendmail-style queue listing. This option 66 implements the traditional <b>mailq</b> command, by contacting the 67 Postfix <a href="showq.8.html"><b>showq</b>(8)</a> daemon. 68 69 Each queue entry shows the queue file ID, message size, arrival 70 time, sender, and the recipients that still need to be deliv- 71 ered. If mail could not be delivered upon the last attempt, the 72 reason for failure is shown. With Postfix >= 3.11, the output 73 may also show bounced recipients that are pending the creation 74 of a non-delivery status notification message that will be 75 returned to the sender. 76 77 The queue ID string is followed by an optional status character: 78 79 <b>*</b> The message is in the <b>active</b> queue, i.e. the message is 80 selected for delivery. 81 82 <b>!</b> The message is in the <b>hold</b> queue, i.e. no further deliv- 83 ery attempt will be made until the mail is taken off 84 hold. 85 86 <b>#</b> The message is forced to expire. See the <a href="postsuper.1.html"><b>postsuper</b>(1)</a> 87 options <b>-e</b> or <b>-f</b>. 88 89 This feature is available in Postfix 3.5 and later. 90 91 <b>-s</b> <i>site</i> 92 Schedule immediate delivery of all mail that is queued for the 93 named <i>site</i>. A numerical site must be specified as a valid <a href="https://tools.ietf.org/html/rfc5321">RFC</a> 94 <a href="https://tools.ietf.org/html/rfc5321">5321</a> address literal enclosed in [], just like in email 95 addresses. The site must be eligible for the "fast flush" ser- 96 vice. See <a href="flush.8.html"><b>flush</b>(8)</a> for more information about the "fast flush" 97 service. 98 99 This option implements the traditional "<b>sendmail -qR</b><i>site</i>" com- 100 mand, by contacting the Postfix <a href="flush.8.html"><b>flush</b>(8)</a> daemon. 101 102 <b>-v</b> Enable verbose logging for debugging purposes. Multiple <b>-v</b> 103 options make the software increasingly verbose. As of Postfix 104 2.3, this option is available for the super-user only. 105 106 <b><a name="json_object_format">JSON OBJECT FORMAT</a></b> 107 Each JSON object represents one queue file; it is emitted as a single 108 text line followed by a newline character. 109 110 Object members have string values unless indicated otherwise. Programs 111 should ignore object members that are not listed here; the list of mem- 112 bers is expected to grow over time. 113 114 <b>queue_name</b> 115 The name of the queue where the message was found. Note that 116 the contents of the mail queue may change while it is being 117 listed; some messages may appear more than once, and some mes- 118 sages may be missed. 119 120 <b>queue_id</b> 121 The queue file name. The queue_id may be reused within a Postfix 122 instance unless "<a href="postconf.5.html#enable_long_queue_ids">enable_long_queue_ids</a> = true" and time is mono- 123 tonic. Even then, the queue_id is not expected to be unique 124 between different Postfix instances. Management tools that 125 require a unique name should combine the queue_id with the 126 <a href="postconf.5.html#myhostname">myhostname</a> setting of the Postfix instance. 127 128 <b>arrival_time</b> 129 The number of seconds since the start of the UNIX epoch. 130 131 <b>message_size</b> 132 The number of bytes in the message header and body. This number 133 does not include message envelope information. It is approxi- 134 mately equal to the number of bytes that would be transmitted 135 via SMTP including the <CR><LF> line endings. 136 137 <b>forced_expire</b> (Postfix >= 3.5) 138 The message is forced to expire (<b>true</b> or <b>false</b>). See the <a href="postsuper.1.html"><b>post-</b></a> 139 <a href="postsuper.1.html"><b>super</b>(1)</a> options <b>-e</b> or <b>-f</b>. 140 141 <b>sender</b> The envelope sender address. 142 143 <b>recipients</b> 144 An array containing zero or more objects with members: 145 146 <b>address</b> 147 One recipient address. 148 149 <b>orig_address</b> (Postfix >= 3.11) 150 One original recipient address. 151 152 <b>delay_reason</b> 153 If present, the reason for delayed delivery. Delayed 154 recipients may have no delay reason, for example, while 155 delivery is in progress, or after the system was stopped 156 before it could record the reason. 157 158 <b>bounce_reason</b> (Postfix >= 3.11) 159 If present, the reason why this recipient was bounced. 160 The recipient is still pending the creation of a 161 non-delivery status notification message that will be 162 returned to the sender. 163 164 <b><a name="security">SECURITY</a></b> 165 This program is designed to run with set-group ID privileges, so that 166 it can connect to Postfix daemon processes. 167 168 <b><a name="standards">STANDARDS</a></b> 169 <a href="https://tools.ietf.org/html/rfc7159">RFC 7159</a> (JSON notation) 170 171 <b><a name="diagnostics">DIAGNOSTICS</a></b> 172 Problems are logged to <b>syslogd</b>(8) or <a href="postlogd.8.html"><b>postlogd</b>(8)</a>, and to the standard 173 error stream. 174 175 <b><a name="environment">ENVIRONMENT</a></b> 176 MAIL_CONFIG 177 Directory with the <a href="postconf.5.html"><b>main.cf</b></a> file. In order to avoid exploitation 178 of set-group ID privileges, a non-default directory is allowed 179 only if: 180 181 <b>o</b> The name is listed in the default <a href="postconf.5.html"><b>main.cf</b></a> file with the 182 <b><a href="postconf.5.html#alternate_config_directories">alternate_config_directories</a></b> or <b><a href="postconf.5.html#multi_instance_directories">multi_instance_directo</a>-</b> 183 <b><a href="postconf.5.html#multi_instance_directories">ries</a></b> configuration parameter. 184 185 <b>o</b> The command is invoked by the super-user. 186 187 <b><a name="configuration_parameters">CONFIGURATION PARAMETERS</a></b> 188 The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to this pro- 189 gram. The text below provides only a parameter summary. See <a href="postconf.5.html"><b>post-</b></a> 190 <a href="postconf.5.html"><b>conf</b>(5)</a> for more details including examples. 191 192 <b><a href="postconf.5.html#alternate_config_directories">alternate_config_directories</a> (empty)</b> 193 A list of non-default Postfix configuration directories that may 194 be specified with "-c <a href="postconf.5.html#config_directory">config_directory</a>" on the command line (in 195 the case of <a href="sendmail.1.html"><b>sendmail</b>(1)</a>, with the "-C" option), or via the 196 MAIL_CONFIG environment parameter. 197 198 <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b> 199 The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con- 200 figuration files. 201 202 <b><a href="postconf.5.html#command_directory">command_directory</a> (see 'postconf -d' output)</b> 203 The location of all postfix administrative commands. 204 205 <b><a href="postconf.5.html#fast_flush_domains">fast_flush_domains</a> ($<a href="postconf.5.html#relay_domains">relay_domains</a>)</b> 206 Optional list of destinations that are eligible for per-destina- 207 tion logfiles with mail that is queued to those destinations. 208 209 <b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b> 210 The list of environment variables that a privileged Postfix 211 process will import from a non-Postfix parent process, or 212 name=value environment overrides. 213 214 <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b> 215 The location of the Postfix top-level queue directory. 216 217 <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b> 218 The syslog facility of Postfix logging. 219 220 <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b> 221 A prefix that is prepended to the process name in syslog 222 records, so that, for example, "smtpd" becomes "prefix/smtpd". 223 224 <b><a href="postconf.5.html#trigger_timeout">trigger_timeout</a> (10s)</b> 225 The time limit for sending a trigger to a Postfix daemon (for 226 example, the <a href="pickup.8.html"><b>pickup</b>(8)</a> or <a href="qmgr.8.html"><b>qmgr</b>(8)</a> daemon). 227 228 Available in Postfix version 2.2 and later: 229 230 <b><a href="postconf.5.html#authorized_flush_users">authorized_flush_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b> 231 List of users who are authorized to flush the queue. 232 233 <b><a href="postconf.5.html#authorized_mailq_users">authorized_mailq_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b> 234 List of users who are authorized to view the queue. 235 236 <b><a name="files">FILES</a></b> 237 /var/spool/postfix, mail queue 238 239 <b><a name="see_also">SEE ALSO</a></b> 240 <a href="qmgr.8.html">qmgr(8)</a>, queue manager 241 <a href="showq.8.html">showq(8)</a>, list mail queue 242 <a href="flush.8.html">flush(8)</a>, fast flush service 243 <a href="sendmail.1.html">sendmail(1)</a>, Sendmail-compatible user interface 244 <a href="postsuper.1.html">postsuper(1)</a>, privileged queue operations 245 <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging 246 syslogd(8), system logging 247 248 <b><a name="readme_files">README FILES</a></b> 249 <a href="ETRN_README.html">ETRN_README</a>, Postfix ETRN howto 250 251 <b><a name="license">LICENSE</a></b> 252 The Secure Mailer license must be distributed with this software. 253 254 <b><a name="history">HISTORY</a></b> 255 The postqueue command was introduced with Postfix version 1.1. 256 257 <b>AUTHOR(S)</b> 258 Wietse Venema 259 IBM T.J. Watson Research 260 P.O. Box 704 261 Yorktown Heights, NY 10598, USA 262 263 Wietse Venema 264 Google, Inc. 265 111 8th Avenue 266 New York, NY 10011, USA 267 268 POSTQUEUE(1) 269 </pre> </body> </html> 270