Deleting emails from the postfix mailq by email address

To clean out some spam from the postfix mailq

mailq | tail -n +2 | gawk 'BEGIN { RS = "" } /email@domain.com/ { print $1 }' | tr -d '*!' | postsuper -d -

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.