[issue1571841] email module does not complay with RFC 2046: CRLF issue

Deron Meranda report at bugs.python.org
Mon Jun 23 19:44:56 CEST 2008


Deron Meranda <deron.meranda at gmail.com> added the comment:

Still an issue in 2.5.

This lack of conformance to the RFC is can also cause problems when
trying to use encrypted or signed email, as those activities may depend
on "canonical" line endings.  An LF rather than CR+LF can cause the
crypto to break in some cases.

This appears to be caused by the email package writing to an internal
StringIO file using the print statement, where it relies on print
outputting the end-of-line character (which will always output a LF). 
The module should instead write the eol character(s) explicitly.

To maintain backwards compatibility, it may be best if the preferred eol
character be settable on a per-message basis; which would default to the
current non-conforming behavior of LF, but which could be set to CR+LF
if strict MIME behavior is desired.

----------
nosy: +dmeranda
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1571841>
_______________________________________


More information about the Python-bugs-list mailing list