[Spambayes] Re: big imapfilter.py problem

David Abrahams dave at boost-consulting.com
Wed Apr 30 02:21:17 EDT 2003

David Abrahams <dave at boost-consulting.com> writes:

> "Meyer, Tony" <T.A.Meyer at massey.ac.nz> writes:
>>> But no messages got classified spam or unsure, AFAICT.
>>> Even after I move some of the spam training messages into my 
>>> inbox, they're not classified as spam.
>> I think I have fixed this now.  I've changed imapfilter so that instead
>> of iterating through the entire RFC822 message when we go through a
>> folder, we just retrieve the headers (which we can use to determine if
>> the message has been trained/classified or not).  If we then have to do
>> something to the message, the substance is retrieved.
>> This should speed things up (no more retrieving the substance many
>> times), and I think I fixed the bug that stopped messages being filtered
>> along the way.
>> If you could check it (again!) that would be great.  If it's still not
>> working, could you run it with "-i4" and see whether it's doing any
>> FETCH RFC822[.PEEK] commands?  If not, then there's something up with
>> the db checking, if so then it's something else.
> It's something else.  With -i5:
> ...
> \nC++-sig mailing list\r\nC++-sig at python.org\r\nhttp://mail.python.org/mailman/listinfo/c++-sig\r\n')"]
>   26:47.80 <  UID 303)
>   26:47.81 untagged_responses[FETCH] 1 += [" UID 303)"]

The problem appears to be that imapfilter.py added an
X-Spambayes-Classification: header to the message, but failed to add
a newline afterwards, which is required to separate it from the
message body.

...err, but I forgot to set PYTHONPATH to use email-2.5.  Training
works when I do that.

Dave Abrahams
Boost Consulting

More information about the Spambayes mailing list