Seth Woolley's Man Viewer

postsuper(1) - postsuper - Postfix superintendent - man 1 postsuper

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

POSTSUPER(1)                                                      POSTSUPER(1)



NAME
       postsuper - Postfix superintendent

SYNOPSIS
       postsuper [-psv] [-c config_dir] [-d queue_id]
               [-h queue_id] [-H queue_id]
               [-r queue_id] [directory ...]

DESCRIPTION
       The  postsuper(1)  command  does maintenance jobs on the Postfix queue.
       Use  of  the  command  is  restricted  to  the  superuser.    See   the
       postqueue(1)  command for unprivileged queue(1,3) operations such as listing
       or flushing the mail(1,8) queue.

       By default, postsuper(1) performs the operations requested with the  -s
       and  -p  command-line  options  on all Postfix queue(1,3) directories - this
       includes the incoming, active and deferred directories with mail(1,8)  files
       and the bounce, defer, trace(3x,n,3x _nc_tracebits) and flush(8,n) directories with log files.

       Options:

       -c config_dir
              The main.cf configuration file(1,n) is in(1,8) the named(5,8) directory instead
              of the default configuration directory. See also the MAIL_CONFIG
              environment setting below.

       -d queue_id
              Delete  one  message with the named(5,8) queue(1,3) ID from the named(5,8) mail(1,8)
              queue(1,3)(s) (default: hold, incoming, active and deferred).

              If a queue_id of - is specified, the  program  reads  queue(1,3)  IDs
              from  standard  input.  For  example,  to  delete  all mail(1,8) with
              exactly one recipient user@example.com:

              mailq | tail +2 | awk  BEGIN { RS = "" }
                  # $7=sender, $8=recipient1, $9=recipient2
                  { if(3,n) ($8 == "user@example.com" && $9 == "")
                        print $1 }
               | tr -d '*!' | postsuper -d -

              Specify -d ALL to remove all messages; for example,  specify  -d
              ALL  deferred to delete mail(1,8) in(1,8) the deferred queue.  As a safety
              measure, the word ALL must be specified in(1,8) upper case.

              Warning: Postfix queue(1,3) IDs are reused.  There is  a  very  small
              possibility  that  postsuper deletes the wrong message file(1,n) when
              it is executed while the Postfix mail(1,8) system is delivering mail.

              The scenario is as follows:

              1)     The  Postfix queue(1,3) manager deletes the message that post-
                     super(1) is asked to delete, because Postfix is  finished
                     with  the  message (it is delivered, or it is returned to
                     the sender).

              2)     New mail(1,8) arrives, and the new message is given  the  same
                     queue(1,3)  ID as the message that postsuper(1) is supposed to
                     delete.  The probability for reusing a deleted  queue(1,3)  ID
                     is  about 1 in(1,8) 2**15 (the number of different microsecond
                     values that the system clock(3,n)  can  distinguish  within  a
                     second).

              3)     postsuper(1)  deletes the new message, instead of the old
                     message that it should have deleted.

       -h queue_id
              Put mail(1,8) "on hold" so that no attempt is  made  to  deliver  it.
              Move  one  message  with  the named(5,8) queue(1,3) ID from the named(5,8) mail(1,8)
              queue(1,3)(s) (default: incoming, active and deferred)  to  the  hold
              queue.

              If  a  queue_id  of  - is specified, the program reads queue(1,3) IDs
              from standard input.

              Specify -h ALL to hold all messages; for example, specify -h ALL
              deferred  to  hold mail(1,8) in(1,8) the deferred queue.  As a safety mea-
              sure, the word ALL must be specified in(1,8) upper case.

              Note: while mail(1,8) is "on hold" it will not expire when  its  time(1,2,n)
              in(1,8)    the    queue(1,3)   exceeds   the   maximal_queue_lifetime   or
              bounce_queue_lifetime setting. It becomes subject to  expiration
              after it is released from "hold".

       -H queue_id
              Release  mail(1,8) that was put "on hold".  Move one message with the
              named(5,8) queue(1,3) ID from the named(5,8) mail(1,8) queue(1,3)(s) (default:  hold)  to
              the deferred queue.

              If  a  queue_id  of  - is specified, the program reads queue(1,3) IDs
              from standard input.

              Note: use "postsuper -r" to release mail(1,8) that was kept  on  hold
              for   a   significant  fraction  of  $maximal_queue_lifetime  or
              $bounce_queue_lifetime, or longer.

              Specify -H ALL to release all mail(1,8) that  is  "on  hold".   As  a
              safety measure, the word ALL must be specified in(1,8) upper case.

       -p     Purge  old  temporary  files  that are left over after system or
              software crashes.

       -r queue_id
              Requeue the message with the named(5,8) queue(1,3) ID from the named(5,8)  mail(1,8)
              queue(1,3)(s)  (default:  hold,  incoming,  active and deferred).  To
              requeue multiple  messages,  specify  multiple  -r  command-line
              options.

              Alternatively,  if(3,n)  a  queue_id  of  - is specified, the program
              reads queue(1,3) IDs from standard input.

              Specify -r ALL to requeue all messages. As a safety measure, the
              word ALL must be specified in(1,8) upper case.

              A requeued message is moved to the maildrop queue(1,3), from where it
              is copied by the pickup daemon to a new file(1,n) whose name is guar-
              anteed  to  match the new queue(1,3) file(1,n) inode number. The new queue(1,3)
              file(1,n) is subjected again to mail(1,8) address rewriting and  substitu-
              tion.  This  is  useful when rewriting rules or virtual(5,8) mappings
              have changed.

              Warning: Postfix queue(1,3) IDs are reused.  There is  a  very  small
              possibility  that  postsuper(1)  requeues the wrong message file(1,n)
              when it is executed while the Postfix mail(1,8)  system  is  running,
              but no harm should be done.

       -s     Structure  check and structure repair.  This should be done once
              before Postfix startup.

                    Rename files whose name does not match the  message  file(1,n)
                     inode number. This operation is necessary after restoring
                     a mail(1,8) queue(1,3) from a different  machine,  or  from  backup
                     media.

                    Move  queue(1,3) files that are in(1,8) the wrong place in(1,8) the file(1,n)
                     system hierarchy and remove subdirectories  that  are  no
                     longer  needed.   File position rearrangements are neces-
                     sary  after  a  change  in(1,8)  the  hash_queue_names  and/or
                     hash_queue_depth configuration parameters.

       -v     Enable  verbose  logging  for  debugging  purposes.  Multiple -v
              options make the software increasingly verbose.

DIAGNOSTICS
       Problems are reported to the standard error(8,n) stream and to syslogd(8).

       postsuper(1) reports the number of messages deleted with -d, the number
       of  messages  requeued  with -r, and the number of messages whose queue(1,3)
       file(1,n) name was fixed with -s. The report  is  written  to  the  standard
       error(8,n) stream and to syslogd(8).

ENVIRONMENT
       MAIL_CONFIG
              Directory with the main.cf file.

BUGS
       Mail that is not sanitized by Postfix (i.e. mail(1,8) in(1,8) the maildrop queue(1,3))
       cannot be placed "on hold".

CONFIGURATION PARAMETERS
       The following main.cf parameters are especially relevant to  this  pro-
       gram.   The  text  below  provides  only a parameter summary. See post-
       conf(3,5)(5) for more details including examples.

       config_directory (see 'postconf(1,5) -d' output)
              The default location of the Postfix main.cf and  master.cf  con-
              figuration files.

       hash_queue_depth (1)
              The  number  of subdirectory levels for queue(1,3) directories listed
              with the hash_queue_names parameter.

       hash_queue_names (deferred, defer)
              The names of queue(1,3) directories that are  split(1,n)  across  multiple
              subdirectory levels.

       queue_directory (see 'postconf(1,5) -d' output)
              The location of the Postfix top-level queue(1,3) directory.

       syslog_facility (mail(1,8))
              The syslog(2,3,5,3 Sys::Syslog) facility of Postfix logging.

       syslog_name (postfix)
              The  mail(1,8)  system  name that is prepended to the process name in(1,8)
              syslog(2,3,5,3 Sys::Syslog) records, so that "smtpd"  becomes,  for  example,  "post-
              fix/smtpd".

SEE ALSO
       sendmail(1,8)(1), Sendmail-compatible user interface
       postqueue(1), unprivileged queue(1,3) operations

LICENSE
       The Secure Mailer license must be distributed with this software.

AUTHOR(S)
       Wietse Venema
       IBM T.J. Watson Research
       P.O. Box 704
       Yorktown Heights, NY 10598, USA



                                                                  POSTSUPER(1)

References for this manual (incoming links)