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