Linux – Delete from mailq where subject matches

emailemail-serverlinuxpostfixspam

I have a mailq which is getting backed up with multiple emails with the same subject line. I would like to delete all emails in the mailq that match a particular subject line so they don't get sent. Any ideas how to do this? Pretty urgent as its spam related.

Best Answer

Postfix does not have a utility like exigrep, so you will need to grep the queue files for the subject and then pipe the queue id to postsuper to delete them

Related Topic