How to Flush/Clear/Delete Postfix Mail Queue

This is short tutorial for clearing the mail queue from command line. Postfix is the mail server which is used to send mails, time to time there will increase in mail queue which contains failed email in order to check and clear the mail queue just run this following command from terminal/ssh.

To check mail queue:

To remove all mail from the queue:

To remove all mails in the deferred queue:

Also you can use this script to delete mail queue which contain certain keyword or email id :

and add this below code in and save it :

example usage of script :

Tui là jamesblackvn!

Gửi phản hồi

Website này sử dụng Akismet để hạn chế spam. Tìm hiểu bình luận của bạn được duyệt như thế nào.