zenn wrote:
> 
> hi all
> does anyone know if there is a MRTG script for qmail-scanner
> i've look at freshmeat and google without success

crude -example- gives cummulative counts per day:
install mrtg, run /usr/bin/mrtg spam.cfg 

########### spam.sh 
#!/bin/sh
log="/var/spool/qmailscan/mailstats.csv"
DATE=`/bin/date '+ %d/%m/%Y'`
# non-spam
echo -e "`grep $DATE $log|egrep "Clear\:(SA\:\?\(0\/0\)|SA\:0)"|wc -l`"
# spam
echo -e "`grep $DATE $log|egrep "Clear:SA:1" |wc -l`"
# other
echo "0"
echo "0"

########### spam.cfg
WorkDir: /var/www/html/mrtg
WriteExpires: Yes

Title[SpamStats]: Spam Stats
PageTop[SpamStats]: <H1>Spam Stats</H1>
Target[SpamStats]: `/path/to/spam.sh`
MaxBytes[SpamStats]: 10000
AbsMax[SpamStats]: 10000
Options[SpamStats]: gauge, nopercent, growright
Directory[SpamStats]: SpamStats
YLegend[SpamStats]: counts
ShortLegend[SpamStats]:
LegendI[SpamStats]: &nbsp;
LegendO[SpamStats]: &nbsp;
Legend1[SpamStats]: non-spam
Legend2[SpamStats]: spam
Colours[SpamStats]: GRAY#A0A0A0,RED#BB2222,Extra#000000,Other#000000


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to