How to: Purge, Flush or Delete Postfix Queue, or a Single Email
Written by Guillermo Garron
Date: 2012-04-25 14:53:30 00:00
To flush or purge the postfix mail queue, just enter this command
postfix -fBut if you need to delete an individual email from the queue, you’ll first need to see the queue. Traditionally you use
mailqthis time we’ll use:postqueue -pAnd the output should show all messages in queue:
5642B4D8647* 1683500 Tue Jun 3 08:37:27 xxxxxx@xxxxxxx.com rrrrrrrrr@hotmail.com 9359B4D82B1* 1635730 Tue Jun 3 08:36:53 xxxxxx@xxxxxxx.com yyyyyyyy@hotmail.comThe first number is the message ID, if you only want to delete one of them, enter:
postsuper -d 5642B4D8647That will only delete one email for the queue, that specific email you want to delete from it.
If you want to delete all deferred mails, you can use:
postsuper -d deferred
Source: How to: Purge, Flush or Delete Postfix Queue, or a Single Email