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