Hi,

here's a patch fixing the CRLF issue with IMAP mails in archivemail. 
I've had a look at the project's website, and unfortunately it seems to
be pretty much dead.  Two guys have taken over maintainership of
archivemail from Paul in October 2003, but they have left not much
traces in the SVN repository since then.  In total 1 (one) commit of a
trivial fix four weeks ago, to be precise. 

    If I find myself continuously hacking and fixing the thing, I'll
perhaps consider offering my help upstream.  I'm CC'ing Paul for the
patch. 

diff -Naur archivemail-0.6.1.orig/archivemail archivemail-0.6.1/archivemail
--- archivemail-0.6.1.orig/archivemail  2006-05-12 22:29:29.000000000 +0200
+++ archivemail-0.6.1/archivemail       2006-05-25 00:05:58.000000000 +0200
@@ -1236,7 +1236,10 @@
     for msg_id in message_list:
         result, response = imap_srv.fetch(msg_id, '(RFC822 FLAGS)')
         if result != 'OK': unexpected_error("Failed to fetch message")
-        msg_str = response[0][1]
+        if "\r\n" == os.linesep:
+            msg_str = response[0][1]
+        else:
+            msg_str = response[0][1].replace("\r\n", os.linesep)
         msg_flags = imaplib.ParseFlags(response[1])
         msg = rfc822.Message(cStringIO.StringIO(msg_str))
         add_status_headers_imap(msg, msg_flags)


HAND, 
Nikolaus


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to