RE: [Spambayes] Re: big imapfilter.py problem
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.
That's definitely what it was - except that message.py (which does the adding for imapfilter.py) doesn't add it as a string, it adds an entry to the headers dict in the email.Message.Message object. It looks like the email package didn't add the separating newline when it flattened the message.
...err, but I forgot to set PYTHONPATH to use email-2.5. Training works when I do that.
What version of the email package does it use if you don't see the PYTHONPATH? If this sort of thing is going to happen, it might be worth noting somewhere. (Currently, the docs say that you need "the latest" version of the email package, or whatever comes with Python 2.2.2 (email.__version__ == '2.4.3') or later. =Tony Meyer
"Meyer, Tony" <T.A.Meyer@massey.ac.nz> writes:
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.
That's definitely what it was - except that message.py (which does the adding for imapfilter.py) doesn't add it as a string, it adds an entry to the headers dict in the email.Message.Message object. It looks like the email package didn't add the separating newline when it flattened the message.
...err, but I forgot to set PYTHONPATH to use email-2.5. Training works when I do that.
What version of the email package does it use if you don't see the PYTHONPATH? If this sort of thing is going to happen, it might be worth noting somewhere. (Currently, the docs say that you need "the latest" version of the email package, or whatever comes with Python 2.2.2 (email.__version__ == '2.4.3') or later.
Well, I don't think the latter is valid, since I have Python 2.2.2 installed. %python Python 2.2.2 (#1, Feb 4 2003, 18:45:04) [GCC 2.95.2 19991024 (release)] on freebsd4 Type "help", "copyright", "credits" or "license" for more information. >>> import email >>> email.__version__ '2.4.3' >>> -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams -
Meyer, Tony