nan in bogofilter stats

Stephen Davies scldad at sdc.com.au
Wed Apr 8 02:16:31 CEST 2009


Here is the code snippet from my amavisd.
As you can see, I do the return value processing "manually". The config file 
forces a two-state return.

Cheers,
Stephen

# run bogofilter against previously collected email body
# #
#
  my($fname) = $msginfo->mail_text_fn;
  chop($output=`/usr/bin/bogofilter -v -I $fname 2>&1`);
  my($errval) = $? >> 8;
  do_log(1,"Bogofilter gave " . $output);
  if (! $errval){
    system("/usr/bin/bogofilter -s -I $fname");
    $errval = $? >> 8;
    if (! $errval){
      do_log(0,"Spam registered.");
    }
    $msginfo->spam_level(10);
    $msginfo->spam_status("bogofilter");
    $msginfo->spam_report("Spam found");
    (10, "bogofilter", "Spam found");
  } elsif ($errval == 1){
    system("/usr/bin/bogofilter -n -I $fname");
    $errval = $? >> 8;
    if (! $errval){
      do_log(0,"Ham registered.");
    }
    $msginfo->spam_level(0);
    (0);
  }

On Tuesday 07 April 2009 20:58:47 David Relson wrote:
> On Tue, 7 Apr 2009 12:59:41 +0930
>
> Stephen Davies wrote:
> > I use bogofilter in two ways: via Amavis milter/amavisd and
> > explicitly from a cron job that uses -Ns to un/reregister any spam
> > that reaches my inbox and I then save to a separate area.
> >
> > Amavis is configured to register both ham and spam.
>
> Good.  Are you using two-state (spam,ham) or three-state
> (ham,spam,unsure) classification?  If three-state (which is
> bogofilter's default), how are you handling unsures?
>
> > I supposed that the -Ns could theoretically result in a zero good
> > count but the current .MSG_COUNTS is:
> >
> > .MSG_COUNT 276769 4239 20090407
> >
> > so it looks unlikely.
>
> Unlikely indeed!
>
> > I shall see if my new daily backup job provides any pointers.
>
> The history of .MSG_COUNT might be interesting.  If the ham count
> decreases from one day to the next or is suddenly zero, then something
> is amiss.
>
> David
> _______________________________________________
> Bogofilter mailing list
> Bogofilter at bogofilter.org
> http://www.bogofilter.org/mailman/listinfo/bogofilter



-- 
=============================================================================
Stephen Davies Consulting P/L                             Voice: 08-8177 1595
Adelaide, South Australia.                                Fax  : 08-8177 0133
Computing & Network solutions.                            Mobile:040 304 0583
                                          VoIP:sip:1132210 at sip1.bbpglobal.com



More information about the Bogofilter mailing list