Re: nan in bogofilter stats

Stephen Davies <[email protected]>
Newsgroups gmane.mail.bogofilter.general
Organization SDC
Message-ID <[email protected]>
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
> [email protected]
> 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:[email protected]
_______________________________________________
Bogofilter mailing list
[email protected]
http://www.bogofilter.org/mailman/listinfo/bogofilter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.