Hi Folks,
I have a shell script to check mail queue and sent email if it reaches to critical level. Please find shell script as below.
Code:
#!/bin/bash
if [ `/usr/local/bin/exim -bpc` -ge 10 ]
then echo "MAIL queue at CRITICAL LEVEL `/usr/local/bin/exim -bpc`" | exim -v -odf user@domain.com
else
:
fi
I have schedule this script in cronjob to run every half an hour and sent mail queue status on my email ID. If i run this script manually it works and sends email to me but when it runs through cronjob it does not sends me any email.
When i checked cronjob logs it shows that this script schedule ran on the scheduled time.Please find cronjob configuration as below.
Code:
*/30 * * * * /bin/sh /root/bin/mail_queue.sh
can someone help me to find the solution.
Regards,