tar xvfz maildir_bug.tar.gz cd maildir_bug ./bug.sh The attachment contains a maildir with a single message. This message has two body lines beginning with 'From '. When converted to mbox using the maildir2mbox.py, only the second line gets a '>' at the beginning. Thunderbird subsequently splits the message in two. I think the fix is to put a '>' in front of each 'From ' line and not just the second one. However, when I did that, Thunderbird displayed the '>', so either it is not the right fix, or Thunderbird has a bug. I am using Python 2.7.1. I searched the bug tracker and didn't see this issue, so decided to file even though I don't have the latest version. Chris
Hi and thanks for the report. It seems that this is a bug in email.generator.Generator, as it fails to mangle "From " lines in the MIME preamble (after the headers, before the first "--Boundary..." line).
type: behaviortitle: maildir parsing can split up messages with 'From ' at the start of a line -> email.generator.Generator doesn't mangle "From " lines in MIME preamblecomponents: + Library (Lib)nosy: + petri.lehtinenversions: + Python 2.7, Python 3.2, Python 3.3messages: + stage: needs patch