Koozali.org formerly Contribs.org

email trigger

email trigger
« on: February 26, 2006, 08:40:58 PM »

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.


email trigger
« Reply #1 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.