postsuper.1.html revision 1.1.1.2 1 1.1 tron <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2 1.1 tron "http://www.w3.org/TR/html4/loose.dtd">
3 1.1 tron <html> <head>
4 1.1 tron <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
5 1.1 tron <title> Postfix manual - postsuper(1) </title>
6 1.1 tron </head> <body> <pre>
7 1.1 tron POSTSUPER(1) POSTSUPER(1)
8 1.1 tron
9 1.1 tron <b>NAME</b>
10 1.1 tron postsuper - Postfix superintendent
11 1.1 tron
12 1.1 tron <b>SYNOPSIS</b>
13 1.1.1.2 tron <b>postsuper</b> [<b>-psSv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<b>-d</b> <i>queue</i><b>_</b><i>id</i>]
14 1.1 tron [<b>-h</b> <i>queue</i><b>_</b><i>id</i>] [<b>-H</b> <i>queue</i><b>_</b><i>id</i>]
15 1.1 tron [<b>-r</b> <i>queue</i><b>_</b><i>id</i>] [<i>directory ...</i>]
16 1.1 tron
17 1.1 tron <b>DESCRIPTION</b>
18 1.1 tron The <a href="postsuper.1.html"><b>postsuper</b>(1)</a> command does maintenance jobs on the
19 1.1 tron Postfix queue. Use of the command is restricted to the
20 1.1 tron superuser. See the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command for unprivileged
21 1.1 tron queue operations such as listing or flushing the mail
22 1.1 tron queue.
23 1.1 tron
24 1.1 tron By default, <a href="postsuper.1.html"><b>postsuper</b>(1)</a> performs the operations requested
25 1.1 tron with the <b>-s</b> and <b>-p</b> command-line options on all Postfix
26 1.1 tron queue directories - this includes the <b>incoming</b>, <b>active</b> and
27 1.1 tron <b>deferred</b> directories with mail files and the <b>bounce</b>,
28 1.1 tron <b>defer</b>, <b>trace</b> and <b>flush</b> directories with log files.
29 1.1 tron
30 1.1 tron Options:
31 1.1 tron
32 1.1 tron <b>-c</b> <i>config</i><b>_</b><i>dir</i>
33 1.1 tron The <a href="postconf.5.html"><b>main.cf</b></a> configuration file is in the named
34 1.1 tron directory instead of the default configuration
35 1.1 tron directory. See also the MAIL_CONFIG environment
36 1.1 tron setting below.
37 1.1 tron
38 1.1 tron <b>-d</b> <i>queue</i><b>_</b><i>id</i>
39 1.1 tron Delete one message with the named queue ID from the
40 1.1 tron named mail queue(s) (default: <b>hold</b>, <b>incoming</b>,
41 1.1 tron <b>active</b> and <b>deferred</b>).
42 1.1 tron
43 1.1 tron If a <i>queue</i><b>_</b><i>id</i> of <b>-</b> is specified, the program reads
44 1.1 tron queue IDs from standard input. For example, to
45 1.1 tron delete all mail with exactly one recipient
46 1.1 tron <b>user (a] example.com</b>:
47 1.1 tron
48 1.1 tron mailq | tail +2 | grep -v '^ *(' | awk 'BEGIN { RS = "" }
49 1.1 tron # $7=sender, $8=recipient1, $9=recipient2
50 1.1 tron { if ($8 == "user (a] example.com" && $9 == "")
51 1.1 tron print $1 }
52 1.1 tron ' | tr -d '*!' | postsuper -d -
53 1.1 tron
54 1.1 tron Specify "<b>-d ALL</b>" to remove all messages; for exam-
55 1.1 tron ple, specify "<b>-d ALL deferred</b>" to delete all mail
56 1.1 tron in the <b>deferred</b> queue. As a safety measure, the
57 1.1 tron word <b>ALL</b> must be specified in upper case.
58 1.1 tron
59 1.1.1.2 tron Warning: Postfix queue IDs are reused (always with
60 1.1.1.2 tron Postfix <= 2.8; and with Postfix >= 2.9 when
61 1.1.1.2 tron <a href="postconf.5.html#enable_long_queue_ids">enable_long_queue_ids</a>=no). There is a very small
62 1.1.1.2 tron possibility that postsuper deletes the wrong mes-
63 1.1.1.2 tron sage file when it is executed while the Postfix
64 1.1.1.2 tron mail system is delivering mail.
65 1.1 tron
66 1.1 tron The scenario is as follows:
67 1.1 tron
68 1.1 tron 1) The Postfix queue manager deletes the mes-
69 1.1 tron sage that <a href="postsuper.1.html"><b>postsuper</b>(1)</a> is asked to delete,
70 1.1 tron because Postfix is finished with the message
71 1.1 tron (it is delivered, or it is returned to the
72 1.1 tron sender).
73 1.1 tron
74 1.1 tron 2) New mail arrives, and the new message is
75 1.1 tron given the same queue ID as the message that
76 1.1 tron <a href="postsuper.1.html"><b>postsuper</b>(1)</a> is supposed to delete. The
77 1.1 tron probability for reusing a deleted queue ID
78 1.1 tron is about 1 in 2**15 (the number of different
79 1.1 tron microsecond values that the system clock can
80 1.1 tron distinguish within a second).
81 1.1 tron
82 1.1 tron 3) <a href="postsuper.1.html"><b>postsuper</b>(1)</a> deletes the new message,
83 1.1 tron instead of the old message that it should
84 1.1 tron have deleted.
85 1.1 tron
86 1.1 tron <b>-h</b> <i>queue</i><b>_</b><i>id</i>
87 1.1 tron Put mail "on hold" so that no attempt is made to
88 1.1 tron deliver it. Move one message with the named queue
89 1.1 tron ID from the named mail queue(s) (default: <b>incoming</b>,
90 1.1 tron <b>active</b> and <b>deferred</b>) to the <b>hold</b> queue.
91 1.1 tron
92 1.1 tron If a <i>queue</i><b>_</b><i>id</i> of <b>-</b> is specified, the program reads
93 1.1 tron queue IDs from standard input.
94 1.1 tron
95 1.1 tron Specify "<b>-h ALL</b>" to hold all messages; for example,
96 1.1 tron specify "<b>-h ALL deferred</b>" to hold all mail in the
97 1.1 tron <b>deferred</b> queue. As a safety measure, the word <b>ALL</b>
98 1.1 tron must be specified in upper case.
99 1.1 tron
100 1.1 tron Note: while mail is "on hold" it will not expire
101 1.1 tron when its time in the queue exceeds the <b><a href="postconf.5.html#maximal_queue_lifetime">maxi</a>-</b>
102 1.1 tron <b><a href="postconf.5.html#maximal_queue_lifetime">mal_queue_lifetime</a></b> or <b><a href="postconf.5.html#bounce_queue_lifetime">bounce_queue_lifetime</a></b> set-
103 1.1 tron ting. It becomes subject to expiration after it is
104 1.1 tron released from "hold".
105 1.1 tron
106 1.1 tron This feature is available in Postfix 2.0 and later.
107 1.1 tron
108 1.1 tron <b>-H</b> <i>queue</i><b>_</b><i>id</i>
109 1.1 tron Release mail that was put "on hold". Move one mes-
110 1.1 tron sage with the named queue ID from the named mail
111 1.1 tron queue(s) (default: <b>hold</b>) to the <b>deferred</b> queue.
112 1.1 tron
113 1.1 tron If a <i>queue</i><b>_</b><i>id</i> of <b>-</b> is specified, the program reads
114 1.1 tron queue IDs from standard input.
115 1.1 tron
116 1.1 tron Note: specify "<b>postsuper -r</b>" to release mail that
117 1.1 tron was kept on hold for a significant fraction of
118 1.1 tron <b>$<a href="postconf.5.html#maximal_queue_lifetime">maximal_queue_lifetime</a></b> or <b>$<a href="postconf.5.html#bounce_queue_lifetime">bounce_queue_lifetime</a></b>,
119 1.1 tron or longer.
120 1.1 tron
121 1.1 tron Specify "<b>-H ALL</b>" to release all mail that is "on
122 1.1 tron hold". As a safety measure, the word <b>ALL</b> must be
123 1.1 tron specified in upper case.
124 1.1 tron
125 1.1 tron This feature is available in Postfix 2.0 and later.
126 1.1 tron
127 1.1 tron <b>-p</b> Purge old temporary files that are left over after
128 1.1 tron system or software crashes.
129 1.1 tron
130 1.1 tron <b>-r</b> <i>queue</i><b>_</b><i>id</i>
131 1.1 tron Requeue the message with the named queue ID from
132 1.1 tron the named mail queue(s) (default: <b>hold</b>, <b>incoming</b>,
133 1.1 tron <b>active</b> and <b>deferred</b>). To requeue multiple mes-
134 1.1 tron sages, specify multiple <b>-r</b> command-line options.
135 1.1 tron
136 1.1 tron Alternatively, if a <i>queue</i><b>_</b><i>id</i> of <b>-</b> is specified, the
137 1.1 tron program reads queue IDs from standard input.
138 1.1 tron
139 1.1 tron Specify "<b>-r ALL</b>" to requeue all messages. As a
140 1.1 tron safety measure, the word <b>ALL</b> must be specified in
141 1.1 tron upper case.
142 1.1 tron
143 1.1 tron A requeued message is moved to the <b>maildrop</b> queue,
144 1.1 tron from where it is copied by the <a href="pickup.8.html"><b>pickup</b>(8)</a> and
145 1.1 tron <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemons to a new queue file. In many
146 1.1 tron respects its handling differs from that of a new
147 1.1 tron local submission.
148 1.1 tron
149 1.1 tron <b>o</b> The message is not subjected to the
150 1.1 tron <a href="postconf.5.html#smtpd_milters">smtpd_milters</a> or <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a> settings.
151 1.1 tron When mail has passed through an external
152 1.1 tron content filter, this would produce incorrect
153 1.1 tron results with Milter applications that depend
154 1.1 tron on original SMTP connection state informa-
155 1.1 tron tion.
156 1.1 tron
157 1.1 tron <b>o</b> The message is subjected again to mail
158 1.1 tron address rewriting and substitution. This is
159 1.1 tron useful when rewriting rules or virtual map-
160 1.1 tron pings have changed.
161 1.1 tron
162 1.1 tron The address rewriting context (local or
163 1.1 tron remote) is the same as when the message was
164 1.1 tron received.
165 1.1 tron
166 1.1 tron <b>o</b> The message is subjected to the same <a href="postconf.5.html#content_filter">con</a>-
167 1.1 tron <a href="postconf.5.html#content_filter">tent_filter</a> settings (if any) as used for
168 1.1 tron new local mail submissions. This is useful
169 1.1 tron when <a href="postconf.5.html#content_filter">content_filter</a> settings have changed.
170 1.1 tron
171 1.1.1.2 tron Warning: Postfix queue IDs are reused (always with
172 1.1.1.2 tron Postfix <= 2.8; and with Postfix >= 2.9 when
173 1.1.1.2 tron <a href="postconf.5.html#enable_long_queue_ids">enable_long_queue_ids</a>=no). There is a very small
174 1.1.1.2 tron possibility that <a href="postsuper.1.html"><b>postsuper</b>(1)</a> requeues the wrong
175 1.1.1.2 tron message file when it is executed while the Postfix
176 1.1.1.2 tron mail system is running, but no harm should be done.
177 1.1 tron
178 1.1 tron This feature is available in Postfix 1.1 and later.
179 1.1 tron
180 1.1 tron <b>-s</b> Structure check and structure repair. This should
181 1.1 tron be done once before Postfix startup.
182 1.1 tron
183 1.1 tron <b>o</b> Rename files whose name does not match the
184 1.1 tron message file inode number. This operation is
185 1.1 tron necessary after restoring a mail queue from
186 1.1.1.2 tron a different machine or from backup, when
187 1.1.1.2 tron queue files were created with Postfix <= 2.8
188 1.1.1.2 tron or with "<a href="postconf.5.html#enable_long_queue_ids">enable_long_queue_ids</a> = no".
189 1.1 tron
190 1.1 tron <b>o</b> Move queue files that are in the wrong place
191 1.1 tron in the file system hierarchy and remove sub-
192 1.1 tron directories that are no longer needed. File
193 1.1 tron position rearrangements are necessary after
194 1.1 tron a change in the <b><a href="postconf.5.html#hash_queue_names">hash_queue_names</a></b> and/or
195 1.1 tron <b><a href="postconf.5.html#hash_queue_depth">hash_queue_depth</a></b> configuration parameters.
196 1.1 tron
197 1.1.1.2 tron <b>o</b> Rename queue files created with
198 1.1.1.2 tron "<a href="postconf.5.html#enable_long_queue_ids">enable_long_queue_ids</a> = yes" to short
199 1.1.1.2 tron names, for migration to Postfix <= 2.8. The
200 1.1.1.2 tron procedure is as follows:
201 1.1.1.2 tron
202 1.1.1.2 tron # postfix stop
203 1.1.1.2 tron # postconf <a href="postconf.5.html#enable_long_queue_ids">enable_long_queue_ids</a>=no
204 1.1.1.2 tron # postsuper
205 1.1.1.2 tron
206 1.1.1.2 tron Run <a href="postsuper.1.html"><b>postsuper</b>(1)</a> repeatedly until it stops
207 1.1.1.2 tron reporting file name changes.
208 1.1.1.2 tron
209 1.1.1.2 tron <b>-S</b> A redundant version of <b>-s</b> that requires that long
210 1.1.1.2 tron file names also match the message file inode num-
211 1.1.1.2 tron ber. This option exists for testing purposes, and
212 1.1.1.2 tron is available with Postfix 2.9 and later.
213 1.1.1.2 tron
214 1.1 tron <b>-v</b> Enable verbose logging for debugging purposes. Mul-
215 1.1.1.2 tron tiple <b>-v</b> options make the software increasingly
216 1.1 tron verbose.
217 1.1 tron
218 1.1 tron <b>DIAGNOSTICS</b>
219 1.1.1.2 tron Problems are reported to the standard error stream and to
220 1.1 tron <b>syslogd</b>(8).
221 1.1 tron
222 1.1.1.2 tron <a href="postsuper.1.html"><b>postsuper</b>(1)</a> reports the number of messages deleted with
223 1.1.1.2 tron <b>-d</b>, the number of messages requeued with <b>-r</b>, and the num-
224 1.1.1.2 tron ber of messages whose queue file name was fixed with <b>-s</b>.
225 1.1.1.2 tron The report is written to the standard error stream and to
226 1.1 tron <b>syslogd</b>(8).
227 1.1 tron
228 1.1 tron <b>ENVIRONMENT</b>
229 1.1 tron MAIL_CONFIG
230 1.1 tron Directory with the <a href="postconf.5.html"><b>main.cf</b></a> file.
231 1.1 tron
232 1.1 tron <b>BUGS</b>
233 1.1.1.2 tron Mail that is not sanitized by Postfix (i.e. mail in the
234 1.1 tron <b>maildrop</b> queue) cannot be placed "on hold".
235 1.1 tron
236 1.1 tron <b>CONFIGURATION PARAMETERS</b>
237 1.1.1.2 tron The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant
238 1.1 tron to this program. The text below provides only a parameter
239 1.1.1.2 tron summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including exam-
240 1.1 tron ples.
241 1.1 tron
242 1.1 tron <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
243 1.1.1.2 tron The default location of the Postfix <a href="postconf.5.html">main.cf</a> and
244 1.1 tron <a href="master.5.html">master.cf</a> configuration files.
245 1.1 tron
246 1.1 tron <b><a href="postconf.5.html#hash_queue_depth">hash_queue_depth</a> (1)</b>
247 1.1.1.2 tron The number of subdirectory levels for queue direc-
248 1.1.1.2 tron tories listed with the <a href="postconf.5.html#hash_queue_names">hash_queue_names</a> parameter.
249 1.1 tron
250 1.1 tron <b><a href="postconf.5.html#hash_queue_names">hash_queue_names</a> (deferred, defer)</b>
251 1.1.1.2 tron The names of queue directories that are split
252 1.1 tron across multiple subdirectory levels.
253 1.1 tron
254 1.1 tron <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
255 1.1.1.2 tron The location of the Postfix top-level queue direc-
256 1.1 tron tory.
257 1.1 tron
258 1.1 tron <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
259 1.1 tron The syslog facility of Postfix logging.
260 1.1 tron
261 1.1 tron <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
262 1.1.1.2 tron The mail system name that is prepended to the
263 1.1.1.2 tron process name in syslog records, so that "smtpd"
264 1.1 tron becomes, for example, "postfix/smtpd".
265 1.1 tron
266 1.1.1.2 tron Available in Postfix version 2.9 and later:
267 1.1.1.2 tron
268 1.1.1.2 tron <b><a href="postconf.5.html#enable_long_queue_ids">enable_long_queue_ids</a> (no)</b>
269 1.1.1.2 tron Enable long, non-repeating, queue IDs (queue file
270 1.1.1.2 tron names).
271 1.1.1.2 tron
272 1.1 tron <b>SEE ALSO</b>
273 1.1 tron <a href="sendmail.1.html">sendmail(1)</a>, Sendmail-compatible user interface
274 1.1 tron <a href="postqueue.1.html">postqueue(1)</a>, unprivileged queue operations
275 1.1 tron
276 1.1 tron <b>LICENSE</b>
277 1.1 tron The Secure Mailer license must be distributed with this
278 1.1 tron software.
279 1.1 tron
280 1.1 tron <b>AUTHOR(S)</b>
281 1.1 tron Wietse Venema
282 1.1 tron IBM T.J. Watson Research
283 1.1 tron P.O. Box 704
284 1.1 tron Yorktown Heights, NY 10598, USA
285 1.1 tron
286 1.1 tron POSTSUPER(1)
287 1.1 tron </pre> </body> </html>
288