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