1POSTSUPER(1)                General Commands Manual               POSTSUPER(1)
2
3
4

NAME

6       postsuper - Postfix superintendent
7

SYNOPSIS

9       postsuper [-psv] [-c config_dir] [-d queue_id]
10               [-h queue_id] [-H queue_id]
11               [-r queue_id] [directory ...]
12

DESCRIPTION

14       The  postsuper(1)  command  does maintenance jobs on the Postfix queue.
15       Use  of  the  command  is  restricted  to  the  superuser.    See   the
16       postqueue(1)  command for unprivileged queue operations such as listing
17       or flushing the mail queue.
18
19       By default, postsuper(1) performs the operations requested with the  -s
20       and  -p  command-line  options  on all Postfix queue directories - this
21       includes the incoming, active and deferred directories with mail  files
22       and the bounce, defer, trace and flush directories with log files.
23
24       Options:
25
26       -c config_dir
27              The main.cf configuration file is in the named directory instead
28              of the default configuration directory. See also the MAIL_CONFIG
29              environment setting below.
30
31       -d queue_id
32              Delete  one  message with the named queue ID from the named mail
33              queue(s) (default: hold, incoming, active and deferred).
34
35              If a queue_id of - is specified, the  program  reads  queue  IDs
36              from  standard  input.  For  example,  to  delete  all mail with
37              exactly one recipient user@example.com:
38
39              mailq | tail +2 | grep -v '^ *(' | awk  ´BEGIN { RS = "" }
40                  # $7=sender, $8=recipient1, $9=recipient2
41                  { if ($8 == "user@example.com" && $9 == "")
42                        print $1 }
43              ´ | tr -d '*!' | postsuper -d -
44
45              Specify "-d ALL" to remove all messages;  for  example,  specify
46              "-d  ALL deferred" to delete all mail in the deferred queue.  As
47              a safety measure, the word ALL must be specified in upper case.
48
49              Warning: Postfix queue IDs are reused.  There is  a  very  small
50              possibility  that  postsuper deletes the wrong message file when
51              it is executed while the Postfix mail system is delivering mail.
52
53              The scenario is as follows:
54
55              1)     The Postfix queue manager deletes the message that  post‐
56                     super(1)  is asked to delete, because Postfix is finished
57                     with the message (it is delivered, or it is  returned  to
58                     the sender).
59
60              2)     New  mail  arrives, and the new message is given the same
61                     queue ID as the message that postsuper(1) is supposed  to
62                     delete.   The  probability for reusing a deleted queue ID
63                     is about 1 in 2**15 (the number of different  microsecond
64                     values  that  the  system  clock can distinguish within a
65                     second).
66
67              3)     postsuper(1) deletes the new message, instead of the  old
68                     message that it should have deleted.
69
70       -h queue_id
71              Put  mail  "on  hold"  so that no attempt is made to deliver it.
72              Move one message with the named queue ID  from  the  named  mail
73              queue(s)  (default:  incoming,  active and deferred) to the hold
74              queue.
75
76              If a queue_id of - is specified, the  program  reads  queue  IDs
77              from standard input.
78
79              Specify  "-h ALL" to hold all messages; for example, specify "-h
80              ALL deferred" to hold all mail in  the  deferred  queue.   As  a
81              safety measure, the word ALL must be specified in upper case.
82
83              Note:  while  mail is "on hold" it will not expire when its time
84              in   the   queue   exceeds   the    maximal_queue_lifetime    or
85              bounce_queue_lifetime  setting. It becomes subject to expiration
86              after it is released from "hold".
87
88              This feature is available in Postfix 2.0 and later.
89
90       -H queue_id
91              Release mail that was put "on hold".  Move one message with  the
92              named  queue  ID from the named mail queue(s) (default: hold) to
93              the deferred queue.
94
95              If a queue_id of - is specified, the  program  reads  queue  IDs
96              from standard input.
97
98              Note:  specify  "postsuper  -r" to release mail that was kept on
99              hold for a significant fraction  of  $maximal_queue_lifetime  or
100              $bounce_queue_lifetime, or longer.
101
102              Specify  "-H  ALL"  to release all mail that is "on hold".  As a
103              safety measure, the word ALL must be specified in upper case.
104
105              This feature is available in Postfix 2.0 and later.
106
107       -p     Purge old temporary files that are left  over  after  system  or
108              software crashes.
109
110       -r queue_id
111              Requeue  the message with the named queue ID from the named mail
112              queue(s) (default: hold, incoming,  active  and  deferred).   To
113              requeue  multiple  messages,  specify  multiple  -r command-line
114              options.
115
116              Alternatively, if a queue_id of  -  is  specified,  the  program
117              reads queue IDs from standard input.
118
119              Specify  "-r  ALL" to requeue all messages. As a safety measure,
120              the word ALL must be specified in upper case.
121
122              A requeued message is moved to the maildrop queue, from where it
123              is copied by the pickup(8) and cleanup(8) daemons to a new queue
124              file. In many respects its handling differs from that of  a  new
125              local submission.
126
127              ·      The  message  is  not  subjected  to the smtpd_milters or
128                     non_smtpd_milters settings.  When mail has passed through
129                     an  external content filter, this would produce incorrect
130                     results with Milter applications that depend on  original
131                     SMTP connection state information.
132
133              ·      The  message is subjected again to mail address rewriting
134                     and substitution.  This is useful when rewriting rules or
135                     virtual mappings have changed.
136
137                     The  address  rewriting  context (local or remote) is the
138                     same as when the message was received.
139
140              ·      The message is subjected to the same content_filter  set‐
141                     tings  (if  any)  as used for new local mail submissions.
142                     This is useful when content_filter settings have changed.
143
144              Warning: Postfix queue IDs are reused.  There is  a  very  small
145              possibility  that  postsuper(1)  requeues the wrong message file
146              when it is executed while the Postfix mail  system  is  running,
147              but no harm should be done.
148
149              This feature is available in Postfix 1.1 and later.
150
151       -s     Structure  check and structure repair.  This should be done once
152              before Postfix startup.
153
154              ·      Rename files whose name does not match the  message  file
155                     inode number. This operation is necessary after restoring
156                     a mail queue from a different  machine,  or  from  backup
157                     media.
158
159              ·      Move  queue files that are in the wrong place in the file
160                     system hierarchy and remove subdirectories  that  are  no
161                     longer  needed.   File position rearrangements are neces‐
162                     sary  after  a  change  in  the  hash_queue_names  and/or
163                     hash_queue_depth configuration parameters.
164
165       -v     Enable  verbose  logging  for  debugging  purposes.  Multiple -v
166              options make the software increasingly verbose.
167

DIAGNOSTICS

169       Problems are reported to the standard error stream and to syslogd(8).
170
171       postsuper(1) reports the number of messages deleted with -d, the number
172       of  messages  requeued  with -r, and the number of messages whose queue
173       file name was fixed with -s. The report  is  written  to  the  standard
174       error stream and to syslogd(8).
175

ENVIRONMENT

177       MAIL_CONFIG
178              Directory with the main.cf file.
179

BUGS

181       Mail that is not sanitized by Postfix (i.e. mail in the maildrop queue)
182       cannot be placed "on hold".
183

CONFIGURATION PARAMETERS

185       The following main.cf parameters are especially relevant to  this  pro‐
186       gram.   The  text  below  provides  only a parameter summary. See post‐
187       conf(5) for more details including examples.
188
189       config_directory (see 'postconf -d' output)
190              The default location of the Postfix main.cf and  master.cf  con‐
191              figuration files.
192
193       hash_queue_depth (1)
194              The  number  of subdirectory levels for queue directories listed
195              with the hash_queue_names parameter.
196
197       hash_queue_names (deferred, defer)
198              The names of queue directories that are  split  across  multiple
199              subdirectory levels.
200
201       queue_directory (see 'postconf -d' output)
202              The location of the Postfix top-level queue directory.
203
204       syslog_facility (mail)
205              The syslog facility of Postfix logging.
206
207       syslog_name (see 'postconf -d' output)
208              The  mail  system  name that is prepended to the process name in
209              syslog records, so that "smtpd"  becomes,  for  example,  "post‐
210              fix/smtpd".
211

SEE ALSO

213       sendmail(1), Sendmail-compatible user interface
214       postqueue(1), unprivileged queue operations
215

LICENSE

217       The Secure Mailer license must be distributed with this software.
218

AUTHOR(S)

220       Wietse Venema
221       IBM T.J. Watson Research
222       P.O. Box 704
223       Yorktown Heights, NY 10598, USA
224
225
226
227                                                                  POSTSUPER(1)
Impressum