Manual browser: postsuper(1)
POSTSUPER(1) | General Commands Manual | POSTSUPER(1) |
NAME
postsuper - Postfix superintendentSYNOPSIS
postsuper [-psSv] [ -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 operations such as listing or flushing the mail queue.
- -c config_dir
- The main.cf configuration file is in the named directory instead of the default configuration directory. See also the MAIL_CONFIG environment setting below.
- -d queue_id
-
Delete one message with the named queue ID from the named mail queue(s) (default: hold, incoming, active and deferred).
mailq | tail +2 | grep -v '^ *(' | awk ́BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "user@example.com" && $9 == "")
print $1 }
́ | tr -d '*!' | postsuper -d -
- 1)
- The Postfix queue manager deletes the message that postsuper(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 arrives, and the new message is given the same queue ID as the message that postsuper(1) 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).
- 3)
- postsuper(1) deletes the new message, instead of the old message that it should have deleted.
- -h queue_id
-
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: incoming, active and deferred) to the hold queue.
- -H queue_id
-
Release mail that was put "on hold". Move one message with the named queue ID from the named mail queue(s) (default: hold) to the deferred queue.
- -p
- Purge old temporary files that are left over after system or software crashes.
- -r queue_id
-
Requeue the message with the named queue ID from the named mail queue(s) (default: hold, incoming, active and deferred). To requeue multiple messages, specify multiple -r command-line options.
- •
- The message is not subjected to the smtpd_milters or non_smtpd_milters settings. When mail has passed through an external content filter, this would produce incorrect results with Milter applications that depend on original SMTP connection state information.
- •
-
The message is subjected again to mail address rewriting and substitution. This is useful when rewriting rules or virtual mappings have changed.
- •
- The message is subjected to the same content_filter settings (if any) as used for new local mail submissions. This is useful when content_filter settings have changed.
-
Warning: Postfix queue IDs are reused (always with Postfix <= 2.8; and with Postfix >= 2.9 when enable_long_queue_ids=no). There is a very small possibility that postsuper(1) requeues the wrong message file when it is executed while the Postfix mail 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 inode number. This operation is necessary after restoring a mail queue from a different machine or from backup, when queue files were created with Postfix <= 2.8 or with "enable_long_queue_ids = no".
- •
- 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 hash_queue_names and/or hash_queue_depth configuration parameters.
- •
-
Rename queue files created with "enable_long_queue_ids = yes" to short names, for migration to Postfix <= 2.8. The procedure is as follows:
# postfix stop
# postconf enable_long_queue_ids=no
# postsuper
- -S
- A redundant version of -s that requires that long file names also match the message file inode number. This option exists for testing purposes, and is available with Postfix 2.9 and later.
- -v
- Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose.
DIAGNOSTICS
Problems are reported to the standard error 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 in the maildrop queue) cannot be placed "on hold".
CONFIGURATION PARAMETERS
The following main.cf parameters are especially relevant to this program. The text below provides only a parameter summary. See postconf(5) for more details including examples.
- config_directory (see 'postconf -d' output)
- The default location of the Postfix main.cf and master.cf configuration files.
- hash_queue_depth (1)
- The number of subdirectory levels for queue directories listed with the hash_queue_names parameter.
- hash_queue_names (deferred, defer)
- The names of queue directories that are split across multiple subdirectory levels.
- queue_directory (see 'postconf -d' output)
- The location of the Postfix top-level queue directory.
- syslog_facility (mail)
- The syslog facility of Postfix logging.
- syslog_name (see 'postconf -d' output)
- The mail system name that is prepended to the process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd".
Available in Postfix version 2.9 and later:
- enable_long_queue_ids (no)
- Enable long, non-repeating, queue IDs (queue file names).
SEE ALSO
sendmail(1), Sendmail-compatible user interface
postqueue(1), unprivileged queue 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