Too many "unsures"

David Relson relson at osagesoftware.com
Wed May 9 03:00:36 CEST 2007


On Tue, 8 May 2007 17:44:44 -0700
Kirrily Robert wrote:

> A little further investigation shows that a lot of the things that are
> landing in my "unsure" folder do in fact have a Bogosity of 0 or 1
> exactly.  The code that was putting them in the unsure folder was:
> 
> open my $bf,  "| bogofilter";
> print $bf $mail->simple->as_string;
> close $bf;
> my $result = $? >> 8;
> if ($result == 0) {
>     my_accept("$MAILDIR/bogofilter/spam");
>     exit;
> } elsif ($result == 1) {
>     my_accept("$MAILDIR/bogofilter/ham");
> } else {
>     my_accept("$MAILDIR/bogofilter/error");
> }
> 
> Turns out that that "else" was insufficiently detailed.  When I
> change the last couple of lines to:
> 
> } elsif ($result == 2) {
>     my_accept("$MAILDIR/bogofilter/unsure");
> } else {
>     my_accept("$MAILDIR/bogofilter/error");
> }
> 
> ... I see that a lot of what was previously landing in my "unsure"
> folder is now landing in the new "error" folder.  So bogofilter is
> returning some kind of I/O error very frequently.
> 
> Still no idea what's causing that; the suggestions given in the
> manpage don't seem to apply: the wordlist's definitely there, and is
> found intermittently at least, and the disk space is fine (I'm on a
> shared server with vast quantities of disk.)
> 
> K.

Kirrily,

Your .MSG_COUNT values look fine.  You should be able to get good
results with your thousands of ham and spam.

Personally, I use the "-e" (because I'm not interested in the exit
code) and "-p" flags (because my mail client is happy to check the
"X-Bogosity:" line for "spam" or "ham" or "unsure").

For testing, feed some of your messages into your script and see how it
goes.  Or even create a simple script like:

   bogofilter < $1 -p -e > out
   echo $?
   grep ^X-Bogosity: out

Good luck!

David



More information about the Bogofilter mailing list