You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mike Pepe <la...@doki-doki.net> on 2005/08/03 19:51:41 UTC

sa-stats.pl generates a zero report

Hi all,

Any pointers on how to make sa-stats.pl work?

I ran it in debug mode and it's scanning the right log, but at the end I 
get a report with all zeros.

Maybe I'm missing a perl module?

sample report:

Report Title     : SpamAssassin - Spam Statistics
Report Date      : 2005-08-03
Period Beginning : Wed 03 Aug 2005 01:46:29 PM EDT
Period Ending    : Thu 04 Aug 2005 01:46:29 PM EDT

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

Note: 'ham' = 'nonspam'

Total spam detected    :        0 (   0.00%)
Total ham accepted     :        0 (   0.00%)
                         -------------------
Total emails processed :        0 (    0/hr)

Average spam threshold :        0.00
Average spam score     :        0.00
Average ham score      :        0.00

Spam kbytes processed  :        0   (    0 kb/hr)
Ham kbytes processed   :        0   (    0 kb/hr)
Total kbytes processed :        0   (    0 kb/hr)

Spam analysis time     :        0 s (    0 s/hr)
Ham analysis time      :        0 s (    0 s/hr)
Total analysis time    :        0 s (    0 s/hr)


Statistics by Hour
----------------------------------------------------
Hour                          Spam               Ham
-------------    -----------------    --------------
2005-08-03 13             0 (  0%)          0 (  0%)
2005-08-03 14             0 (  0%)          0 (  0%)
2005-08-03 15             0 (  0%)          0 (  0%)
2005-08-03 16             0 (  0%)          0 (  0%)
2005-08-03 17             0 (  0%)          0 (  0%)
2005-08-03 18             0 (  0%)          0 (  0%)
2005-08-03 19             0 (  0%)          0 (  0%)
2005-08-03 20             0 (  0%)          0 (  0%)
2005-08-03 21             0 (  0%)          0 (  0%)
2005-08-03 22             0 (  0%)          0 (  0%)
2005-08-03 23             0 (  0%)          0 (  0%)
2005-08-04 00             0 (  0%)          0 (  0%)
2005-08-04 01             0 (  0%)          0 (  0%)
2005-08-04 02             0 (  0%)          0 (  0%)
2005-08-04 03             0 (  0%)          0 (  0%)
2005-08-04 04             0 (  0%)          0 (  0%)
2005-08-04 05             0 (  0%)          0 (  0%)
2005-08-04 06             0 (  0%)          0 (  0%)
2005-08-04 07             0 (  0%)          0 (  0%)
2005-08-04 08             0 (  0%)          0 (  0%)
2005-08-04 09             0 (  0%)          0 (  0%)
2005-08-04 10             0 (  0%)          0 (  0%)
2005-08-04 11             0 (  0%)          0 (  0%)
2005-08-04 12             0 (  0%)          0 (  0%)
2005-08-04 13             0 (  0%)          0 (  0%)


Done. Report generated in 3 sec by sa-stats.pl, version 6256.

Re: sa-stats.pl generates a zero report

Posted by jdow <jd...@earthlink.net>.
Fascinating. Somebody else must have made it sane.

{^_^}
----- Original Message ----- 
From: "Chris" <cp...@earthlink.net>


> On Thursday 04 August 2005 05:21 pm, jdow wrote:
> > As it comes from the "factory":
> > # Configuration section
> > my %opt = ();
> > $opt{'logfile'} = '/var/log/maillog';        # Log file
> > $opt{'sendmail'} = '/usr/sbin/sendmail';    # Path to sendmail stub
> > $opt{'from'} = 'SpamAssassin System Admin';    # Who is the mail from
> > $opt{'end'} = "";
> > $opt{'start'} = "today";
> >
> > As you had it:
> > # Configuration section
> > my %opt = ();
> > $opt{'logfile'} = '/var/log/maillog';        # Log file
> > $opt{'sendmail'} = '/usr/sbin/sendmail';    # Path to sendmail stub
> > $opt{'from'} = 'SpamAssassin System Admin';    # Who is the mail from
> > $opt{'end'} = "today";
> > $opt{'start'} = "yesterday";
> >
> > Note the difference. The "factory" default options seem to give all
> > zeros. Your options work. You apparently got annoyed having to type in
> > the most used options so you edited the file to make them saner, I bet.
> > (Or you are using a version from some other distribution than 3.04.)
> >
> > {^_-}
>
> The date of the version I'm using is dated 04/01/04 according to the file
> properties. It was in my download folder so I must have downloaded it from
> somewhere, can't remember for sure where.



Re: sa-stats.pl generates a zero report

Posted by Chris <cp...@earthlink.net>.
On Thursday 04 August 2005 05:21 pm, jdow wrote:
> As it comes from the "factory":
> # Configuration section
> my %opt = ();
> $opt{'logfile'} = '/var/log/maillog';        # Log file
> $opt{'sendmail'} = '/usr/sbin/sendmail';    # Path to sendmail stub
> $opt{'from'} = 'SpamAssassin System Admin';    # Who is the mail from
> $opt{'end'} = "";
> $opt{'start'} = "today";
>
> As you had it:
> # Configuration section
> my %opt = ();
> $opt{'logfile'} = '/var/log/maillog';        # Log file
> $opt{'sendmail'} = '/usr/sbin/sendmail';    # Path to sendmail stub
> $opt{'from'} = 'SpamAssassin System Admin';    # Who is the mail from
> $opt{'end'} = "today";
> $opt{'start'} = "yesterday";
>
> Note the difference. The "factory" default options seem to give all
> zeros. Your options work. You apparently got annoyed having to type in
> the most used options so you edited the file to make them saner, I bet.
> (Or you are using a version from some other distribution than 3.04.)
>
> {^_-}

The date of the version I'm using is dated 04/01/04 according to the file 
properties. It was in my download folder so I must have downloaded it from 
somewhere, can't remember for sure where.

-- 
Chris
Registered Linux User 283774 http://counter.li.org
19:20:49 up 1 day, 3:57, 4 users, load average: 0.34, 0.60, 0.64
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the facts do not confirm the theory, they must be disposed of. 
	-- Maier's Law 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: sa-stats.pl generates a zero report

Posted by jdow <jd...@earthlink.net>.
As it comes from the "factory":
# Configuration section
my %opt = ();
$opt{'logfile'} = '/var/log/maillog';        # Log file
$opt{'sendmail'} = '/usr/sbin/sendmail';    # Path to sendmail stub
$opt{'from'} = 'SpamAssassin System Admin';    # Who is the mail from
$opt{'end'} = "";
$opt{'start'} = "today";

As you had it:
# Configuration section
my %opt = ();
$opt{'logfile'} = '/var/log/maillog';        # Log file
$opt{'sendmail'} = '/usr/sbin/sendmail';    # Path to sendmail stub
$opt{'from'} = 'SpamAssassin System Admin';    # Who is the mail from
$opt{'end'} = "today";
$opt{'start'} = "yesterday";

Note the difference. The "factory" default options seem to give all
zeros. Your options work. You apparently got annoyed having to type in
the most used options so you edited the file to make them saner, I bet.
(Or you are using a version from some other distribution than 3.04.)

{^_-}
----- Original Message ----- 
From: "Chris" <cp...@earthlink.net>
To: <us...@spamassassin.apache.org>
Sent: 2005 August, 04, Thursday 04:28
Subject: Re: sa-stats.pl generates a zero report


On Wednesday 03 August 2005 10:11 pm, jdow wrote:
>
> Can't really remember where I picked it up from.
>
> <<jdow: I can. /usr/share/doc/spamassassin*/tools/sa-stats.pl
>   But it appears you changed the default settings which give the
>   null reports. (The userstats and topusers options on the latter
>   one don't SEEM to do anything, either.)
>
> {^_^}

I'm not getting the null reports, my output looks like this:

Report Title : SpamAssassin - Spam Statistics
Report Date : 2005-08-04
Period Beginning : Wed Aug 3 04:00:01 2005
Period Ending : Thu Aug 4 04:00:01 2005

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

Note: 'ham' = 'nonspam'

Total spam detected : 107 ( 60.80%)
Total ham accepted : 69 ( 39.20%)
-------------------
Total emails processed : 176 ( 7/hr)

Average spam threshold : 5.00
Average spam score : 26.28
Average ham score : -11.75



Re: sa-stats.pl generates a zero report

Posted by Chris <cp...@earthlink.net>.
On Wednesday 03 August 2005 10:11 pm, jdow wrote:
>
> Can't really remember where I picked it up from.
>
> <<jdow: I can. /usr/share/doc/spamassassin*/tools/sa-stats.pl
>   But it appears you changed the default settings which give the
>   null reports. (The userstats and topusers options on the latter
>   one don't SEEM to do anything, either.)
>
> {^_^}

I'm not getting the null reports, my output looks like this:

Report Title     : SpamAssassin - Spam Statistics
Report Date      : 2005-08-04
Period Beginning : Wed Aug  3 04:00:01 2005
Period Ending    : Thu Aug  4 04:00:01 2005

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

Note: 'ham' = 'nonspam'

Total spam detected    :      107 (  60.80%)
Total ham accepted     :       69 (  39.20%)
                        -------------------
Total emails processed :      176 (    7/hr)

Average spam threshold :        5.00
Average spam score     :       26.28
Average ham score      :      -11.75

Spam kbytes processed  :      616   (   26 kb/hr)
Ham kbytes processed   :      473   (   20 kb/hr)
Total kbytes processed :     1090   (   45 kb/hr)

Spam analysis time     :      664 s (   28 s/hr)
Ham analysis time      :      563 s (   23 s/hr)
Total analysis time    :     1227 s (   51 s/hr)


Statistics by Hour
----------------------------------------------------
Hour                          Spam               Ham
-------------    -----------------    --------------
2005-08-03 04             4 ( 66%)          2 ( 33%)
2005-08-03 05             5 ( 83%)          1 ( 16%)
2005-08-03 06             4 ( 50%)          4 ( 50%)
2005-08-03 07             3 ( 50%)          3 ( 50%)
2005-08-03 08             9 ( 75%)          3 ( 25%)
2005-08-03 09             2 ( 40%)          3 ( 60%)
2005-08-03 10             3 ( 75%)          1 ( 25%)
2005-08-03 11             1 ( 25%)          3 ( 75%)
2005-08-03 12             8 (100%)          0 (  0%)

and so on to 4am with this at the end:

Top 1 spam victims:
User                               S AvScr   H AvScr      Count    % 
Count      Bytes    % Bytes       Time     % Time
--------------------------------   -------   -------   -------- ----------   
-------- ----------   -------- ----------
chris                                26.28    -11.75        107 (  60.80%)     
631495 (  56.56%)        664 (  54.13%)

Done. Report generated in 0 sec by sa-stats.pl, vers

and the above will probably looked borked since I had to c&p


-- 
Chris
Registered Linux User 283774 http://counter.li.org
06:23:36 up 14:59, 1 user, load average: 0.22, 0.18, 0.17
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Haste makes waste.
		-- John Heywood
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: sa-stats.pl generates a zero report

Posted by jdow <jd...@earthlink.net>.
From: "Chris" <cp...@earthlink.net>

As a side note the first scrip was written by:

#Authors      : Brad Rathbun <br...@computechnv.com> 
http://www.computechnv.com/
#             : Bob Apthorpe <ap...@cynistar.net> 
http://www.cynistar.net/~apthorpe/
#             : Duncan Findlay <du...@debian.org>
#

Can't really remember where I picked it up from.

<<jdow: I can. /usr/share/doc/spamassassin*/tools/sa-stats.pl
  But it appears you changed the default settings which give the
  null reports. (The userstats and topusers options on the latter
  one don't SEEM to do anything, either.)

{^_^}


Re: sa-stats.pl generates a zero report

Posted by Chris <cp...@earthlink.net>.
On Wednesday 03 August 2005 08:50 pm, jdow wrote:

> > The sa-stats.pl I run works quite well, maybe your configuration is not
>
> quite
>
> > right?  Below is mine:
> >
> > # Configuration section
> > my %opt = ();
> > $opt{'logfile'} = '/var/log/mail/info';        # Log file
> > $opt{'sendmail'} = '/usr/sbin/sendmail';    # Path to sendmail stub
> > $opt{'from'} = 'SpamAssassin System Admin';    # Who is the mail from
> > $opt{'end'} = "today";
> > $opt{'start'} = "yesterday";
>
> Aha, you changed the defaults, Chris. When those changed it sort of
> makes some sense. But it does not break out the top scores for ham
> and spam. So it's still only semi-useful.
>
> {^_^}

Actually, for reasons known only to me, and I forgot why, I run two stats 
scripts, the one above which shows span/ham by hour and Dallas's script which 
as you know breaks out the stats in the below format.  Don't ask me why I'm 
running both, guess I just never get around to setting the first ones cronjob 
as inactive.

RANK    RULE NAME                       COUNT %OFRULES %OFMAIL %OFSPAM  %OFHAM

As a side note the first scrip was written by:

#Authors      : Brad Rathbun <br...@computechnv.com> 
http://www.computechnv.com/
#             : Bob Apthorpe <ap...@cynistar.net> 
http://www.cynistar.net/~apthorpe/
#             : Duncan Findlay <du...@debian.org>
#

Can't really remember where I picked it up from.

-- 
Chris
Registered Linux User 283774 http://counter.li.org
20:56:42 up 5:33, 1 user, load average: 0.28, 0.19, 0.27
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Given a chance, matches will find a way to get wet
		-- Murphy's Laws of Camping n°13
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: sa-stats.pl generates a zero report

Posted by jdow <jd...@earthlink.net>.
From: "Chris" <cp...@earthlink.net>

> On Wednesday 03 August 2005 12:51 pm, Mike Pepe wrote:
> > Hi all,
> >
> > Any pointers on how to make sa-stats.pl work?
> >
> > I ran it in debug mode and it's scanning the right log, but at the end I
> > get a report with all zeros.
> >
> > Maybe I'm missing a perl module?
> >
> > sample report:
> >
> > Report Title     : SpamAssassin - Spam Statistics
> > Report Date      : 2005-08-03
> > Period Beginning : Wed 03 Aug 2005 01:46:29 PM EDT
> > Period Ending    : Thu 04 Aug 2005 01:46:29 PM EDT
> >
> > Reporting Period : 24.00 hrs
>
> The sa-stats.pl I run works quite well, maybe your configuration is not
quite
> right?  Below is mine:
>
> # Configuration section
> my %opt = ();
> $opt{'logfile'} = '/var/log/mail/info';        # Log file
> $opt{'sendmail'} = '/usr/sbin/sendmail';    # Path to sendmail stub
> $opt{'from'} = 'SpamAssassin System Admin';    # Who is the mail from
> $opt{'end'} = "today";
> $opt{'start'} = "yesterday";

Aha, you changed the defaults, Chris. When those changed it sort of
makes some sense. But it does not break out the top scores for ham
and spam. So it's still only semi-useful.

{^_^}



Re: sa-stats.pl generates a zero report

Posted by Chris <cp...@earthlink.net>.
On Wednesday 03 August 2005 12:51 pm, Mike Pepe wrote:
> Hi all,
>
> Any pointers on how to make sa-stats.pl work?
>
> I ran it in debug mode and it's scanning the right log, but at the end I
> get a report with all zeros.
>
> Maybe I'm missing a perl module?
>
> sample report:
>
> Report Title     : SpamAssassin - Spam Statistics
> Report Date      : 2005-08-03
> Period Beginning : Wed 03 Aug 2005 01:46:29 PM EDT
> Period Ending    : Thu 04 Aug 2005 01:46:29 PM EDT
>
> Reporting Period : 24.00 hrs

The sa-stats.pl I run works quite well, maybe your configuration is not quite 
right?  Below is mine:

# Configuration section
my %opt = ();
$opt{'logfile'} = '/var/log/mail/info';        # Log file
$opt{'sendmail'} = '/usr/sbin/sendmail';    # Path to sendmail stub
$opt{'from'} = 'SpamAssassin System Admin';    # Who is the mail from
$opt{'end'} = "today";
$opt{'start'} = "yesterday";

-- 
Chris
Registered Linux User 283774 http://counter.li.org
20:08:43 up 4:45, 3 users, load average: 5.98, 3.72, 2.17
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Where will it all end?  Probably somewhere near where it all began.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~