# Man postsuper
Name
Postsuper-Postfix superintendent
Synopsis
Postsuper [-PSV] [-C config_dir] [-D queue_id]
[-H queue_id] [-H queue_id]
[-R queue_id] [directory...]
-D queue_id
Delete one message with the named queue ID from the named mail queue (s) (default: Hold, incoming, active and
Deferred ).
If a queue_id of-is specified, the program reads queue IDs from standard input. For example, to delete all
Mail with exactly one recipient [email protected]:
Mailq | tail + 2 | grep-V '^ * (' | awk' begin {rs = ""}
#$7 = sender, $8 = recipient1, $9 = recipient2
{If ($8 = "[email protected]" & $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
Deferred queue. as a safety measure, the word all must be specified in upper case.
Warning: Postfix queue IDs are reused. There is a very small possibility that postsuper deletes the wrong mes-
Sage file when it is executed while the Postfix mail system is delivering mail.
The scenario is as follows:
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 sup-
Posed to delete. The probability for reusing a deleted queue ID is about 1 in 2 *** 15 (the number of dif-
Ferent 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 shoshould have deleted.