[Python-bugs-list] [ python-Bugs-723962 ] imaplib should convert line endings to be rfc2822 complient

SourceForge.net noreply@sourceforge.net
Tue, 29 Apr 2003 16:41:39 -0700


Bugs item #723962, was opened at 2003-04-19 10:16
Message generated for change (Comment added) made by pierslauder
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=723962&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tony Meyer (anadelonbrin)
Assigned to: Piers Lauder (pierslauder)
Summary: imaplib should convert line endings to be rfc2822 complient

Initial Comment:
When imaplib.append is called, it should convert line 
endings from whatever they are (\r, \n or \r\n) to the 
format required by rfc2822 (in turn, required by rfc1730), 
i.e. CRLF - \r\n.

The email package generates mail with Python "internal" 
line endings (i.e. \n), and so if a message is flattened 
and then appended via imap improper line endings are 
sent.

While some imap servers are ok with this, at least one 
(Communigate Pro) mangles the message (all the 
headers become part of the body).

smtplib has an example of how to do this.

----------------------------------------------------------------------

>Comment By: Piers Lauder (pierslauder)
Date: 2003-04-30 09:41

Message:
Logged In: YES 
user_id=196212

This is a bug. Can't think how it's managed to survive for
so long (there must be a lot of forgiving imap servers out
there). Anyway,
I've just checked in a fix (based on the smtplib code -
thanks for
the ref.)

And thanks for the bug report.


----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2003-04-19 23:44

Message:
Logged In: YES 
user_id=6656

Or just assign it to him :-)


----------------------------------------------------------------------

Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-04-19 22:55

Message:
Logged In: YES 
user_id=29957

You may want to contact imaplib's author, (Piers Lauder
<piers@cs.su.oz.au>)
directly about this.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=723962&group_id=5470