Questions:- How do I flush Postfix mail queue? How to remove emails from mail queue in Postfix? Postfix flush mail queue? Postfix remove differed emails from the queue? Postfix empty the mail queue command line?
This article will help you for flush or clear or delete emails from Postfix mail queue. This will also help you to delete emails from single mail queue or any specific email.
List All Emails
To list all mail of queue, use one of the following commands.
postqueue -p
Flush All Emails
To delete or flush all emails from Postfix mail queue using the following command.
postsuper -d ALL
Flush Deferred Mails Only
You can only delete all deferred emails only from the mail queue. Use the following command to delete deferred emails from the queue.
postsuper -d ALL deferred
Remove Specific Email
If you want to remove any specific email. Use the following command to remove specific emails only. First search the ID of that email like below command
postqueue -p | grep "[email protected]" 056CB129FF0* 5513 Sun Feb 26 02:26:27 [email protected]
Now delete the mail from mail queue with id 056CB129FF0.
postsuper -d 056CB129FF0
7 Comments
This is currently the top google hit for ‘flush postfix’. Congrats!
Unfortunately the command listed under the ‘Flush All Emails’ header actually deletes all emails. The correct command is ‘postfix flush’.
you should differ between flush and delete
Send immediately with Flush
postqueue -f
Delete mail
postfix -d
My Nagios server gone mad and sends thousands of emails. Thanks you for your tutorial. Only 300 approx emails in my inbox and I flushed remaining in queue.
Thanks – I had two bounce messages stuck in the queue that I’ve now deleted
postuser is not a command.
Thanks for pointing out. I have corrected command. It’s postsuper.
Thanks, it worked for me.