Linux Administrator

How To Purge, Flush, Delete Postfix Queue Mail

Purge-Flush-Delete-Postfix-Queue-Mail
mm
Written by Santosh Prasad

In Sendmail MTA traditionally you use the “sendmail -q” command to flush mail queue. In Postfix MTA, use the following command to flush the queued mail.

Flush Or Purge Mail Queue

To flush or purge the postfix mail queue, just type the below command:

# postfix -f

OR

# postfix flush

Check Mail Queue

To see the mail queue type the below command:

# mailq

Remove All Mail From Queue

To remove all mail from queue type the below queue:

# postsuper -d ALL

Delete An Individual Email From The Queue

If you need to delete an individual email form the queue, first you need to see the queue mail.

# postqueue -p

Sample output:

5642B4F47* 1583500 Fri Sep  8 09:37:27  [email protected]
                                         [email protected]

93dFADFAR* 1535730 Fri Sep  8 08:36:53  [email protected]
                                         [email protected]

In above output first number is the message ID, If you want to delte one of them, type the below command:

# postsuper -d 5642B4F47

It will delete only one email from the queue, that specific email you want to delete from it.

Delete All Deferred mails

Type the below command to delete all deferred mails.

# postsuper -d ALL deferred

Suggested Read:

Thanks:)

Thank you! for visiting Look Linux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at Look Linux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment