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?

Advertisement

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@example.com"

056CB129FF0*    5513 Sun Feb 26 02:26:27  email@example.com

Now delete the mail from mail queue with id 056CB129FF0.

postsuper -d 056CB129FF0
Share.

7 Comments

  1. 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’.

  2. you should differ between flush and delete

    Send immediately with Flush
    postqueue -f

    Delete mail
    postfix -d

  3. 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.

Leave A Reply