Problem syncing mail - crash

Vladimir Marek Vladimir.Marek at Oracle.COM
Wed Jul 20 22:57:10 BST 2011


> - fix that X-OfflineIMAP header is set correctly and try if that helped

I tried

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))

which makes the X-OfflineIMAP header to be written to the end of mail header
block. But it didn't fix the problem,


. uid search header "X-OfflineIMAP" ""
* SEARCH
. OK UID SEARCH completed



. uid search header "X-OfflineIMAP" "*"
* SEARCH
. OK UID SEARCH completed



. fetch 138:139 (body[header.fields (X-OfflineIMAP)])
* 138 FETCH (BODY[HEADER.FIELDS ("X-OfflineIMAP")] {2}

)
* 139 FETCH (BODY[HEADER.FIELDS ("X-OfflineIMAP")] {40}
X-offlineimap: 3248098398-4948851044

)
. OK FETCH completed


-- 
	Vlad




More information about the OfflineIMAP-project mailing list