postsuper - Postfix superintendent
| Use Case | Command | Description |
|---|---|---|
| Delete a message | postsuper -d queue_id | π΄ Delete one message with the given queue ID |
| Delete all deferred messages | postsuper -d ALL deferred | π΄ Remove all messages from the deferred queue |
| Force expire a message | postsuper -e queue_id | β³ Return message to sender on next delivery attempt |
| Force expire and release held message | postsuper -f queue_id | β³ Release and expire a message currently on hold |
| Hold a message | postsuper -h queue_id | βΈοΈ Prevent delivery of a message |
| Release a held message | postsuper -H queue_id | βΆοΈ Move held message back to deferred queue |
| Purge old temporary files | postsuper -p | π§Ή Clean up after crashes |
| Requeue a message | postsuper -r queue_id | π Move message to maildrop for reprocessing |
| Structure check/repair | postsuper -s | π§ Fix queue directory structure and file names |
| Verbose logging | postsuper -v | π’ Enable debug output |
postsuper [-psSv]
[-c config_dir] [-d queue_id]
[-e queue_id] [-f queue_id]
[-h queue_id] [-H queue_id]
[-r queue_id] [directory ...]
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.
By default, postsuper(1) performs the operations requested with the -s and -p command-line options on all Postfix queue directories - this includes the incoming, active, deferred, and hold directories with message files and the bounce, defer, trace and flush directories with log files.
-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).postqueue -j | jq '
# See JSON OBJECT FORMAT section in the postqueue(1) manpage
select(.recipients[0].address == "user AT example.com")
| select(.recipients[1].address == null)
| .queue_id
' | postsuper -d -
Or the historical form:mailq | tail -n +2 | grep -v '^ *(' | awk 'BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "user AT example.com" && $9 == "")
print $1 }
' | tr -d '*!' | postsuper -d -
Specify "-d ALL" to remove all messages; for example, specify "-d ALL deferred" to delete all mail in the deferred queue. As a safety measure, the word ALL must be specified in upper case.-e queue_id β β³ Request forced expiration for one message with the named queue ID in the named mail queue(s) (default: hold, incoming, active and deferred). The message will be returned to the sender when the queue manager attempts to deliver that message (note that Postfix will never deliver messages in the hold queue).-f queue_id β β³ Request forced expiration and release for one message with the named queue ID in the named mail queue(s) (default: hold, incoming, active and deferred). Both -e and -f request forced expiration. The difference is that -f will also release a message if it is in the hold queue. With -e, such a message would not be returned to the sender until it is released with -f or -H. When a deferred message is force-expired, the return message will state the reason for the delay. Otherwise, the reason will be "message is administratively expired".-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. The -p, -s, and -S operations are done before other operations.-r queue_id β π Requeue the message with the named queue ID from the named mail queue(s) (default: hold, incoming, active and deferred).-s β π§ Structure check and structure repair. This should be done once before Postfix startup. The -p, -s, and -S operations are done before other operations.
# postfix stop
# postconf enable_long_queue_ids=no
# postsuper
Run postsuper(1) repeatedly until it stops reporting file name changes.
-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. The -p, -s, and -S operations are done before other operations.-v β π’ Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose.Problems are reported to the standard error stream and to syslogd(8) or postlogd(8).
postsuper(1) reports the number of messages deleted with -d, the number of messages expired with -e, the number of messages expired or released with -f, the number of messages held or released with -h or -H, the number of messages requeued with -r, and the number of messages whose queue file name was fixed with -s. The report is written to the standard error stream and to syslogd(8) or postlogd(8).
MAIL_CONFIG β Directory with the main.cf file.
Mail that is not sanitized by Postfix (i.e. mail in the maildrop queue) cannot be placed "on hold".
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.import_environment (see 'postconf -d' output) β The list of environment parameters that a privileged Postfix process will import from a non-Postfix parent process, or name=value environment overrides.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) β A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd".enable_long_queue_ids (no) β Enable long, non-repeating, queue IDs (queue file names).The Secure Mailer license must be distributed with this software.
Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA
Wietse Venema
Google, Inc.
111 8th Avenue
New York, NY 10011, USA
Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-09 19:39 @216.73.216.150
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)