Am 23.02.2014 19:22, schrieb Pol Hallen: > Hi all :-) I'm searching for how notify by email the mail queue... (if > there're emails inside queue). Any idea?
will not help much if it's too late and you reveive no mails at all but in most caes enough to realize that there is a problem growing /etc/crontab: */20 * * * * root bash /usr/local/bin/watch-queue.sh [root@mail:~]$ cat /usr/local/bin/watch-queue.sh #!/usr/bin/bash mailq_count=`/usr/bin/mailq | /usr/bin/tail -n1 | /usr/bin/gawk '{print $5}'` mailq_count=`expr $mailq_count + 0` if [ $mailq_count -gt 50 ]; then echo "Mail-Queue $HOSTNAME: $mailq_count" fi