B4BY.588
Home
Terminal
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
utilerias
/
Filename :
monitormailqueue.sh
back
Copy
#!/bin/bash qlimit_remote=400; notifyemail=carlos@trec.com.mx; servername='Registra'; count_remote=`/usr/sbin/exim -bpc`; #/utilerias/qhandle -s | grep "remote queue" | awk -F ":" '{print $2}' | sed 's/ //g'`; remitentes=`/usr/sbin/exim -bp | head -n100`; if [ $count_remote -ge $qlimit_remote ] ; then subject=$qlimit_remote'_now_'$count_remote; #mail $notifyemail -c $cc -s"'Registra Mailqueue limit '$subject"<<EOF mail -s"[$servername] Mailqueue limit $subject" $notifyemail<<EOF The mail queue for the server has reached $count_remote. Kindly have a check. Remitentes: $remitentes EOF fi #-------- SCRIPT END HERE ------------