Archive for the ‘Exim’ Category

Check mail service is up or not /etc/init.d/exim status
Check by send a test mail from test mail a/c, tail -f /var/log/main_log (For dynamic checking )
Check the Ip listed in RBL (Search the key word ‘spam database’ in Google)
Check by disabling the firewall , as it may be blocking the port 25
Check it by telnet to 25
Check the error by sending a test mail from the account,

if you are getting any error regarding   MX priority   check the domain is listed

/etc/localdomains (if the domain is using the server MX) or

/etc/remotedomains(if the domain is using remote server MX)

To find out the Spamming

Posted: February 3, 2013 in Exim

Use the below Script:

grep “cwd=” /var/log/exim_mainlog|awk ‘{for(i=1;i<=10;i++){print $i}}’|sort|uniq -c|grep cwd|sort -n



awk ‘{ if ($0 ~ “cwd” && $0 ~ “home”) {print $4} }’ /var/log/exim_mainlog | sort | uniq -c | sort -nk 1

Exim Queue clearing

Posted: February 3, 2013 in Exim

exim -bp | awk ‘/^ *[0-9]+[mhd]/{print “exim -Mrm ” $3}’ | bash

To check the number of messages in the queue:
#exim -bpc

To check the listing of the messages in the queue (time queued, size, message id, sender, recipient):
#exim -bp

To check the summary of messages in the queue (count, volume, oldest, newest, domain, and total):
#exim -bp| exiqsumm

To check the current status of Exim:

To search the queue for messages from a specific sender:
#exigrep -f

To search the queue for a specific recipient:
#exigrep -r

To print the message id of the entire queue:
#exiqgrep -i

To remove a message from the queue:
#exim -Mrm <message id>

To Freeze a message:
#exim -Mf <message id>

To forcefully deliver a message:
#exim -M <message id>

To force a message to Freeze and bounce as “Canceled by Admin” :
#exim -Mg <message id>

To remove all frozen mails:
#exigrep -z -i | xargs exim -Mrm

To freeze all queued mail for a given sender:
#exiqgrep -i -f | xargs exim -Mf

To view a message body:
#exim -Mvb <message id>