How to flush Postfix Mail Queue

Channel: Linux
Abstract: 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

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

Ref From: tecadmin

Related articles