Doug Monroe wrote: > > CertaintyTech - Ed Henderson wrote: > > > > Just curious if anyone has a script available that they use to produce virus > > reports for individual accounts? > [snip] > > Thanks for any help, > > a quick-n-dirty start might be: > > cat mailstats.csv|cut -f2,6|grep -v "Clear:"|uniq -c|sort -rn
or something more fancy-schmancy (yet still crude enough to be of interest ;) submitted for your approval- #!/bin/sh LOGROOT="/var/spool/qmailscan" # safeguard: VALIDDOMAINS="hosted-domain1.com|hosted-domain2.com" cat $LOGROOT/mailstats.csv|grep -v "Clear:"|cut -f2,6 \ |egrep "($VALIDDOMAINS)" \ |uniq -c|sort -rn > /tmp/qs.rpt for i in `cat /tmp/qs.rpt|cut -f3|sort -u` do COMMENT="Your friendly SysAdmin has prevented\nthe following BadThings from reaching\nyou at $i:\n(Support your SysAdmin! http://www.sysadminday.com/)\n" OUT=`grep $i /tmp/qs.rpt|cut -f1,2` # or #OUT=`grep $i /tmp/qs.rpt|cut -f2|cut -d":" -f2` # or ... some mo'fancy awk/sed here # comment this out if you run from cron: echo -e "$COMMENT\n$OUT\n" # uncomment if you want to mail reports #echo -e "$COMMENT\n$OUT\n" |mail -s "BadStuff report" $i done ------------------------------------------------------- This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in! http://www.jabber.com/osdn/xim _______________________________________________ Qmail-scanner-general mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general