Natalio Gatti wrote:
Here is a small script that monitors queue size and send an email in case it grows over certain limit:
**********************
#/bin/sh
email=m...@domain
Max_Size=15
cola=`tail -50 /var/log/qmail/send/current | grep status | tail -1 | cut -d ' ' -f 6 | cut -d '/' -f 1`
if test $cola -gt $Max_Size
then
/opt/qmailtoaster-plus/bin/qmqtool -l > /tmp/cola_saliente
cat /tmp/cola_saliente | mail -s"COLA SALIENTE CON $cola MENSAJES" $Email
fi
**********************

I'm using it in 2 servers and it permits to detect when an abused account is used to send spam.
Hope it helps.
Salutti,

Natalio.


That's nice, Natalio. However, what it appears that you're using to trigger the message is the number of messages being sent at once. Wouldn't it be simpler to use the "qmailctl queue" command (instead of the send log) to determine exactly how many messages are in the queue? I think that would give a more meaningful reading.

I do like it though. Perhaps we can work this into QTP somehow, at least for the short term.

--
-Eric 'shubes'


---------------------------------------------------------------------------------
Qmailtoaster is sponsored by Vickers Consulting Group 
(www.vickersconsulting.com)
   Vickers Consulting Group offers Qmailtoaster support and installations.
     If you need professional help with your setup, contact them today!
---------------------------------------------------------------------------------
    Please visit qmailtoaster.com for the latest news, updates, and packages.
To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
    For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com


Reply via email to