Managing the Postfix queue

This command will delete one specific email address from the mail queue (taken from the postsuper man page):

#mailq | tail +2 | grep -v ‘^ *(‘ | awk  ‘BEGIN { RS = “” } { if ($8 == “email@address.com” && $9 == “”) print $1 } ‘ | tr -d ‘*!’ | postsuper -d –

Note that “email@ddress.com” should be replaced with the messages noted email address.

To clear (delete) the entire Postfix queue, run the following command:

#postsuper -d ALL

Note: This command will delete all messages in the Postfix queue. If you need more selective deleting, this can be done as well, use ‘man postsuper’ to find out all of the available options.

You can leave a response, or trackback from your own site.

Leave a Reply