> > On 08 Oct 2002 13:01:34 -0500, you wrote: > > >Would anyone be interested in a script that pipes spamd data > into mrtg > >to be graphed? > > > Yes. I already graph inbound and outbound mail to MRTG. A > spam one would be > nice, too. > >
i do this already via qmail-scanner-queue.pl in the spamassassin function, if $sa_status=1 read current count increase count by 1 write new count to file. now, create a script to parse that file. # cat /usr/local/bin/mrtgspam #!/usr/bin/perl $statname="Spam Count"; $four="unused"; open(FILE,"/var/qmail/qmailscan/spam-count.log") || spam_die(); flock(FILE,2); $stat=<FILE>; close(FILE); print "$stat\n"; print "$stat\n"; print "$statname\n"; print "$four"; open(FILE,">/var/qmail/qmailscan/spam-count.log") || die("cannot write to file"); flock(FILE,2); print FILE 0; close(FILE); exit; ################ sub spam_die { print "0\n"; print "0\n"; print "$statname\n"; print "$four\n"; } ################ add to your mrtg.conf Target[spam]: `/usr/local/bin/mrtgspam` Options[spam]: nopercent,growright,gauge,noinfo Title[spam]: SPAM Found PageTop[spam]: <BR><font face=verdana size=2><B>SPAM Messages Found</B></font><br><font face=arial size=1> MaxBytes[spam]: 100 YLegend[spam]: Messages ShortLegend[spam]: msgs LegendI[spam]: Messages LegendO[spam]: Legend1[spam]: Number of Messages Legend3[spam]: Max Number of Messages WithPeak[spam]: ymwd if there is a more elegant way than this.. i'm happy to hear others solutions.... dallas ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk