From: Roddie H. <ro...@kr...> - 2009-06-01 19:42:29
|
Here's the rest of the script for anyone else who wants to try it: >> NEW=`egrep -ic "sqlgrey: grey: new:" /var/log/mx1.hctc.net/maillog` >> EARLY=`egrep -ic "sqlgrey: grey: early reconnect:" /var/log/mx1.hctc.net/maillog` >> RECON=`egrep -ic "sqlgrey: grey: reconnect ok:" /var/log/mx1.hctc.net/maillog` >> DOMAWL=`egrep -ic "sqlgrey: grey: domain awl match" /var/log/mx1.hctc.net/maillog` >> FRMAWL=`egrep -ic "sqlgrey: grey: from awl:" /var/log/mx1.hctc.net/maillog` >> WHITE=`egrep -ic "sqlgrey: whitelist:" /var/log/mx1.hctc.net/maillog` >> SPAM=`egrep -i "sqlgrey: spam:" /var/log/mx1.hctc.net/maillog |awk '{print $7}'|sort -n|uniq -i|wc -l` >> GLIST=`egrep -ic "Greylisted for 5 minutes" /var/log/mx1.hctc.net/maillog` krweb:/root# cat sqlgrey-stats.sh NEW=`egrep -ic "sqlgrey: grey: new:" /var/log/maillog` EARLY=`egrep -ic "sqlgrey: grey: early reconnect:" /var/log/maillog` RECON=`egrep -ic "sqlgrey: grey: reconnect ok:" /var/log/maillog` DOMAWL=`egrep -ic "sqlgrey: grey: domain awl match" /var/log/maillog` FRMAWL=`egrep -ic "sqlgrey: grey: from awl:" /var/log/maillog` WHITE=`egrep -ic "sqlgrey: whitelist:" /var/log/maillog` SPAM=`egrep -i "sqlgrey: spam:" /var/log/maillog |awk '{print $7}'|sort -n|uniq -i|wc -l` GLIST=`egrep -ic "Greylisted for 5 minutes" /var/log/maillog` echo "GREY NEW:" $NEW echo "GREY EARLY RECON:" $EARLY echo "GREY RECON OK:" $RECON echo "GREY DOMAWL:" $DOMAWL echo "GREY FROM AWL:" $FRMAWL echo "WHITELIST:" $WHITE echo "SPAM:" $SPAM echo "SMTPD GREYLISTED:" $GLIST Roddie |