Wednesday, July 1, 2009

Managing mail queue

If mail queue have more then 10000 mails client is unable to send the mails, you may need to clear out frozen mails.

exim -bpru|grep frozen | wc -l --- This will list the number of frozen mails


exim -bpru|grep frozen|awk {'print $3'}|xargs exim -Mrm --- Remove the frozen messages.

Please check mail queue properly and observer which account is sending the mask mails.
run following command to delete mails of that account.
Example:

grep -lr account@yourdomain.com /var/spool/exim/input/* | xargs rm -rf

Do the following things to delete mail from perticuler domains.

grep -lr domainname.com /var/spool/exim/input/* |xargs rm -rf

No comments:

Post a Comment