HostOnNet Blog

Deleting spam mails with exiqgrep

Looking for Linux Server Admin or WordPress Expert? We can help.

exiqgrep is a command to search in exim mail queue.

To freeze all mail from a domain, run

exiqgrep -i -f @example.tld | xargs exim -Mf

To freeze all mails by recipient domain, run

exiqgrep -i -r @example.tld | xargs exim -Mf

To delete all frozen mails, run

exiqgrep -z -i | xargs exim -Mrm


Posted in Mail Server

Leave a Reply

Your email address will not be published.

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