[Spambayes] Email package and the CRLF pair
T.A.Meyer at massey.ac.nz
Fri Apr 18 12:47:29 EDT 2003
I'm hoping that there are still some Python experts hanging about here
and they've just been quiet for a bit.
As you may have noticed, we ran into a bit of trouble recently with the
imap filter because messages had only \n (CR) and not \r\n (CRLF).
Message bodies don't really matter here; what matters are the headers.
As far as I can see*, when the email package** returns a message via
str() or as_string(), it only puts a CR after each header. But RFC2822
"Header fields are lines composed of a field name, followed by a colon
(":"), followed by a field body, and terminated by CRLF." [Section
Is this therefore a bug in the email package that I should report?
Advice from someone that knows more than me (is Barry there?) about
these things would be appreciated.
* Digging through the email Message module, then the Generator module,
then the Header module into the _encode_chunks function.
** Both in Python 2.2.2 and cvs.
More information about the Spambayes