HostOnNet Blog

Deleting spam mails with exiqgrep

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