Cpanel email queue notification script.
Create a file called mailqueue.sh. vim /root/mailqueue.sh Add the following code. #!/bin/bash EMAIL=”youraddress@mail.com” MQUEUE=`find /var/spool/exim/input -name ‘*-H’ | wc -l | sed -e “s/ //g”` if [ $MQUEUE -gt 200 ]; then echo “Mail queue at `hostname` has $MQUEUE messages!!!” |