On Thu, 22 Jan 2004, Bob Apthorpe wrote:

[...]

based on sa-stats.pl 1.3 i did a quick fix (yes again...)

all u have to do is this:

cut all line between

# Agh... this is ugly.

[...]                     <<< delete all these lines here

#Split line into components

and replace it with this one:

if 
(m/^(\w{3})\s(\d+)\s+(\d\d):(\d\d):(\d\d)\s+\w+\s+spamd\[\d+\]:\s+(clean\smessage|identified\sspam)\s\(([-0-9.]+)\/([-0-9.]+)\)\s
for\s\(\w+\):\d+\sin\s[0-9.]+\sseconds,\s+[0-9]+\sbytes\./x) {

then try: ./sa-stats.pl-fixed -l /var/log/syslog -s midnight

(well use ur path to mailog or the like).

might not (yes again) work in any case. but its definately a matter of
this mismatching regex.

and this note, on solaris you  might get %F instead of a date. if so
replace the two line including %F in "" with this one: %m-%d %H:%M

and here is my output:
Report Title     : SpamAssassin - Spam Statistics
Report Date      : 01-22 20:33
Period Beginning : Thu Jan 22 00:00:00 2004
Period Ending    : Fri Jan 23 00:00:00 2004

Reporting Period : 24.00 hrs
--------------------------------------------------

Note: 'ham' = 'nonspam'

Total spam rejected   :    10532 (  60.19%)
Total ham accepted    :     6966 (  39.81%)
                        -------------------
Total emails processed:    17498 (  729/hr)

Average spam threshold :        5.00
Average spam score     :       21.86
Average ham score      :       -6.38


Statistics by Hour
-------------------------------------
Hour                 Spam         Ham
-------------    --------    --------
01-22 00:00           534         279
01-22 01:00           857         228
01-22 02:00           710         188
01-22 03:00           659         150
01-22 04:00           572         140
01-22 05:00           510         118
01-22 06:00           521         129
01-22 07:00           617         135
01-22 08:00           409         231
01-22 09:00           425         372
01-22 10:00           472         534
01-22 11:00           450         467
01-22 12:00           479         460
01-22 13:00           418         508
01-22 14:00           361         426
01-22 15:00           357         389
01-22 16:00           443         505
01-22 17:00           409         491
01-22 18:00           503         448
01-22 19:00           530         576
01-22 20:00           296         192
01-22 21:00             0           0
01-22 22:00             0           0
01-22 23:00             0           0

Done. Report generated in 124 sec.


nice, isnt it?  :)

regards,
Matthias


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to