Knowledgebase

Powered by WHMCompleteSolution

Language:

Please Login or Register

 

Knowledgebase Article
Subject: How to mitigate spam emails running in Exim?
Identify which account having the large number of emails:



exim -bp | exiqsumm



To check for message header:



exim -Mvh messageid



To check message content:



exim -Mvb messageid



Removing Bad Mail:



for i in `exiqgrep -i -f nobody`; do exim -Mrm $i; done >> Removes Nobody Mail

for i in `exiqgrep -i -o 259200`; do exim -Mrm $i; done >> Removes Mail older than 3 Days

for i in `exiqgrep -i -f “^<>$”`; do exim -Mrm $i; done >> Removes Mail with weird Characters (Spam)



Delete mails from a particular domain:



for i in `exiqgrep -i -f domain.com`; do exim -Mrm $i; done



Delete mails to a particular domain:



for i in `exiqgrep -i -r domain.com`; do exim -Mrm $i; done



Flush the entire Mail queue:



for i in `exiqgrep -i -f `; do exim -Mrm $i; done



Run the Mail queue
Back