diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index 9297a7b..19a0340 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -276,7 +276,7 @@ class IMAPFolder(BaseFolder): self.ui.debug('imap', 'savemessage_addheader: called to add %s: %s' % (headername, headervalue)) - insertionpoint = content.find("\r\n") + insertionpoint = content.find("\r\n\r\n") self.ui.debug('imap', 'savemessage_addheader: insertionpoint = %d' % insertionpoint) leader = content[0:insertionpoint] self.ui.debug('imap', 'savemessage_addheader: leader = %s' % repr(leader))