[spambayes-dev] If msg.as_string() fails...

Tony Meyer tameyer at ihug.co.nz
Sun May 2 17:45:58 EDT 2004

> I encountered a couple spams today with sb_filter.py where 
> msg.as_string() failed and the exception wasn't caught:
>     TypeError: string payload expected: <type 'list'>

Not an answer to your question, but related: reports of this problem are
becoming more common, both with sb_filter and sb_imapfilter (sb_server
handles it because it has a raw "except:", but imapfilter has "except
email.Errors.MessageParseError" which doesn't catch the TypeError - I'll fix

I think it would be worth working in a fix for this somehow, so that these
messages are correctly (as much as possible) filtered.  Does anyone else
want to work on this?

(+1 to getting sb_filter to do the exception header thing, though).

=Tony Meyer

More information about the spambayes-dev mailing list