PHP script to monitor exim mail queue

When you run exim mail server, it is good to keep an eye on number of emails in mail queue. here is a PHP script that will check number of emails in queue, if it exceed pre-set number, it will email you.

Create file

Add following content.

In this case, if mails in queue exceeded 100, you get email.

You can change 100 to whatever number you need.

Replace [email protected] with your email address.

Set script to run every 10 minutes using cronjob

Leave a Reply

Your email address will not be published. Required fields are marked *