-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

First, I have a rule in my procmailrc file that pulls the score and
date from each email and dumps it into a file called
/home/mike/email-scores
:0fw
* ^X-Spam-Status: *\/[^    ].*
{ SSTAT=$MATCH }
SSTAT=`echo "$SSTAT" | cut -d' ' -f2 | tr -dc "0-9.-"`
DATE=`date +"%m/%d/%y %H:%M"`
nada=`echo $DATE $SSTAT $MEID >> /home/mike/email-scores`

Then I use gnuplot to plot /home/mike/email-scores into a graph. 
This graph is dumped into "/home/mike/email-scores_graph/.  The
gnuplot plot file is located in /home/mike/email-scores_graph/plot
and is setup like this:
set grid
set timefmt "%m/%d/%y %H:%M"
set format x "%m/%d"
set title "Distribution of spam values - above 5 is spam"
set xlabel "Date mail arrived"
set ylabel "Hit value"
set nolabel
set xdata time
set terminal png color
set output "/home/mike/email-scores_graph/email-scores.png"
set timestamp "%m/%d/%y %H:%M" 70,-2
set yrange [-10:50]
plot '/home/mike/email-scores' using 1:3 with points 20, 5 with lines
3, 7 with lines 7, 10 with lines 5

Then to keep the graph as current as possible, I have a script in
crontab that replots the graph every five minutes like this:
*/5 * * * *       root    /usr/local/bin/gnuplot
/home/mike/email-scores_graph/plot

Then I have a symlink from
/home/mike/email-scores_graph/email-scores.png to email-scores.png in
my web server's root directory.  Which is what you were just looking
at!  

Whew...I hope all that makes sense. 

Mike Loiterman
[EMAIL PROTECTED]
PGP Key 0xD1B9D18E

> -----Original Message-----
> From: Frank Pineau [mailto:frank@;pineaus.com]
> Sent: Wednesday, October 23, 2002 8:57 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [SAtalk] Generating Statistics
> 
> On Wed, 23 Oct 2002 20:38:24 -0500, you wrote:
> 
> >BTW if your interested you can see a small graph of my spam:mail
> >ratio at:  www.ascendency.net/email-scores.png
> 
> 
> Interesting graph.  How do you generate it?

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4
Comment: Message digitally signed by Mike Loiterman

iQA/AwUBPbdZN2jZbUnRudGOEQL+aACfboKxcjvHxf/ItCuDYIy3taSc0o8Amwfh
8KF6Ue3O6CqAze7AYyewvjQS
=tSw5
-----END PGP SIGNATURE-----



-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en

_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to