.TH POSTSUPER 1 .ad .fi .SH NAME postsuper \- Postfix superintendent .SH SYNOPSIS .na .nf .fi \fBpostsuper\fR [\fB-psv\fR] [\fB-c \fIconfig_dir\fR] [\fB-d \fIqueue_id\fR] [\fB-h \fIqueue_id\fR] [\fB-H \fIqueue_id\fR] [\fB-r \fIqueue_id\fR] [\fIdirectory ...\fR] .SH DESCRIPTION .ad .fi The \fBpostsuper\fR command does maintenance jobs on the Postfix queue. Use of the command is restricted to the superuser. See the \fBpostqueue\fR command for unprivileged queue operations such as listing or flushing the mail queue. By default, \fBpostsuper\fR performs the operations requested with the \fB-s\fR and \fB-p\fR command-line options on all Postfix queue directories - this includes the \fBincoming\fR, \fBactive\fR and \fBdeferred\fR directories with mail files and the \fBbounce\fR, \fBdefer\fR and \fBflush\fR directories with log files. Options: .IP "\fB-c \fIconfig_dir\fR" The \fBmain.cf\fR configuration file is in the named directory instead of the default configuration directory. See also the MAIL_CONFIG environment setting below. .IP "\fB-d \fIqueue_id\fR" Delete one message with the named queue ID from the named mail queue(s) (default: \fBhold\fR, \fBincoming\fR, \fBactive\fR and \fBdeferred\fR). If a \fIqueue_id\fR of \fB-\fR is specified, the program reads queue IDs from standard input. For example, to delete all mail from or to \fBuser@example.com\fR: .sp mailq | tail +2 | awk \'BEGIN { RS = "" } \e .ti +4 / user@example\e.com$/ { print $1 } \e .br \' | tr -d '*!' | postsuper -d - .sp Specify \fB-d ALL\fR to remove all messages; for example, specify \fB-d ALL deferred\fR to delete mail in the \fBdeferred\fR queue. As a safety measure, the word \fBALL\fR must be specified in upper case. .sp .ft B Postfix queue IDs are reused. There is a very small possibility that postsuper deletes the wrong message file when it is executed while the Postfix mail system is running. .ft R .sp The scenario is as follows: .RS .IP 1) The Postfix queue manager deletes the message that \fBpostsuper\fR is supposed to delete, because Postfix is finished with the message. .IP 2) New mail arrives, and the new message is given the same queue ID as the message that \fBpostsuper\fR is supposed to delete. The probability for reusing a deleted queue ID is about 1 in 2**15 (the number of different microsecond values that the system clock can distinguish within a second). .IP 3) \fBpostsuper\fR deletes the new message, instead of the old message that it should have deleted. .RE .IP "\fB-h \fIqueue_id\fR" Put mail "on hold" so that no attempt is made to deliver it. Move one message with the named queue ID from the named mail queue(s) (default: \fBincoming\fR, \fBactive\fR and \fBdeferred\fR) to the \fBhold\fR queue. If a \fIqueue_id\fR of \fB-\fR is specified, the program reads queue IDs from standard input. .sp Specify \fB-h ALL\fR to hold all messages; for example, specify \fB-h ALL deferred\fR to hold mail in the \fBdeferred\fR queue. As a safety measure, the word \fBALL\fR must be specified in upper case. .sp Note: mail that is put "on hold" will not expire when its time in the queue exceeds the \fBmaximal_queue_lifetime\fR setting. .IP "\fB-H \fIqueue_id\fR" Release mail that was put "on hold". Move one message with the named queue ID from the named mail queue(s) (default: \fBhold\fR) to the \fBdeferred\fR queue. If a \fIqueue_id\fR of \fB-\fR is specified, the program reads queue IDs from standard input. .sp Specify \fB-H ALL\fR to release all mail that is "on hold". As a safety measure, the word \fBALL\fR must be specified in upper case. .IP \fB-p\fR Purge old temporary files that are left over after system or software crashes. .IP "\fB-r \fIqueue_id\fR" Requeue the message with the named queue ID from the named mail queue(s) (default: \fBhold\fR, \fBincoming\fR, \fBactive\fR and \fBdeferred\fR). To requeue multiple messages, specify multiple \fB-r\fR command-line options. Alternatively, if a \fIqueue_id\fR of \fB-\fR is specified, the program reads queue IDs from standard input. .sp Specify \fB-r ALL\fR to requeue all messages. As a safety measure, the word \fBALL\fR must be specified in upper case. .sp A requeued message is moved to the \fBmaildrop\fR queue, from where it is copied by the pickup daemon to a new file whose name is guaranteed to match the new queue file inode number. The new queue file is subjected again to mail address rewriting and substitution. This is useful when rewriting rules or virtual mappings have changed. .sp Postfix queue IDs are reused. There is a very small possibility that \fBpostsuper\fR requeues the wrong message file when it is executed while the Postfix mail system is running, but no harm should be done. .IP \fB-s\fR Structure check and structure repair. It is highly recommended to perform this operation once before Postfix startup. .RS .IP \(bu Rename files whose name does not match the message file inode number. This operation is necessary after restoring a mail queue from a different machine, or from backup media. .IP \(bu Move queue files that are in the wrong place in the file system hierarchy and remove subdirectories that are no longer needed. File position rearrangements are necessary after a change in the \fBhash_queue_names\fR and/or \fBhash_queue_depth\fR configuration parameters. .RE .IP \fB-v\fR Enable verbose logging for debugging purposes. Multiple \fB-v\fR options make the software increasingly verbose. .SH DIAGNOSTICS .ad .fi Problems are reported to the standard error stream and to \fBsyslogd\fR. \fBpostsuper\fR reports the number of messages deleted with \fB-d\fR, the number of messages requeued with \fB-r\fR, and the number of messages whose queue file name was fixed with \fB-s\fR. The report is written to the standard error stream and to \fBsyslogd\fR. .SH ENVIRONMENT .na .nf .ad .fi .IP MAIL_CONFIG Directory with the \fBmain.cf\fR file. .SH BUGS .ad .fi Mail that is not sanitized by Postfix (i.e. mail in the \fBmaildrop\fR queue) cannot be placed "on hold". .SH CONFIGURATION PARAMETERS .na .nf .ad .fi See the Postfix \fBmain.cf\fR file for syntax details and for default values. .IP \fBhash_queue_depth\fR Number of subdirectory levels for hashed queues. .IP \fBhash_queue_names\fR The names of queues that are organized into multiple levels of subdirectories. .SH SEE ALSO .na .nf sendmail(1) sendmail-compatible user interface postqueue(1) unprivileged queue operations .SH LICENSE .na .nf .ad .fi The Secure Mailer license must be distributed with this software. .SH AUTHOR(S) .na .nf Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA