Koozali.org: home of the SME Server

Obsolete Releases => SME Server 6.x => Topic started by: hawk2xl on February 26, 2006, 08:40:58 PM

Title: email trigger
Post by: hawk2xl on February 26, 2006, 08:40:58 PM
Hi

Have anyone tried to create a trigger for email where the admin is notified
whenever a specified number of emails is sent through an account ?

eg some one has been infected by sober and sending out email ammounting
to more than 100 in an hour.
Title: email trigger
Post by: gardnc on February 27, 2006, 02:48:03 PM
a shell script of

cat /var/log/qmail/current | grep "from <WHOMEVER" | wc -l

will display the number of emails sent from WHOMEVER but there is nto time stamp that I can associate with the records, so it would be the number of emails sent since the log rotation to current.

The script can be fleshed out to mak a decision on the number of emails and send an email to admin if they match or exceed.