Exim Mail queue monitoring Script

Exim Mail Queue
Exim Mail Queue

Exim Mail queue monitoring Script

Exim is a mail transfer agent mainly used in cPanel and DirectAdmin servers. Nowadays spamming is a common issue and an Exim Mail queue monitoring Script will help you to find these kinds of problems in the beginning itself.

First, you need to create a script file, say “”


Read more about VI editor here.

Add the following script to the above file.

NUM=`/usr/sbin/exim -bpc`
if [ $NUM -gt 100 ]
then echo "Current Email Queue size is $NUM" | /bin/mail -s "Email Queue Critical on $HOSTNAME" 

Please replace with the desired email address.

Give excecution permission

chmod +x

Run this script after certain period using cronjobs.

0 * * * * /bin/sh /root/ >/dev/null 2>&1

This cronjob runs every hour.

That’s it!

If you like this post and wish to receive more articles from us, please like our FB page: Button

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at

Add Comment

Click here to post a comment