[dovecot] Re: Apple's Mail.app

Timo Sirainen tss at iki.fi
Fri Mar 7 18:50:00 EET 2003


On Fri, Mar 07, 2003 at 05:39:10PM +0100, Scott A.McIntyre wrote:
> The primary symptom is that as it downloads messages Mail.app just 
> hangs; no response, the session just freezes.  Usually it's when the 
> status bar is saying something akin to "Caching 9 of 506" at which 
> point it stops.  The number varies, but it's always in the first couple 
> of dozen.  Messages are small, so it's not that it's hanging on a large 
> mail download.  I eventually have to forcibly kill Mail.app.

My best guess is that it uses FETCH ENVELOPE, which is somewhat broken in
0.99.8 if some headers (subject, in-reply-to mostly) contain '"' characters.
BODY and BODYSTRUCTURE fetches can also break but they're less likely to
contain '"' chars.

Try if the included patch fixes. Dovecot may have cached those replies
already, so delete all .imap.index* files.
-------------- next part --------------
Index: src/lib-imap/imap-quote.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-quote.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- src/lib-imap/imap-quote.c	13 Feb 2003 21:07:44 -0000	1.8
+++ src/lib-imap/imap-quote.c	4 Mar 2003 01:10:28 -0000	1.9
@@ -19,12 +19,13 @@
 		if (value[i] == 13 || value[i] == 10)
                         linefeeds++;
 
-		if ((value[i] & 0x80) != 0)
+		if ((value[i] & 0x80) != 0 ||
+		    value[i] == '"' || value[i] == '\\')
 			literal = TRUE;
 	}
 
 	if (!literal) {
-		/* no 8bit chars, return as "string" */
+		/* no 8bit chars or imapspecials, return as "string" */
 		str_append_c(str, '"');
 	} else {
 		/* return as literal */


More information about the dovecot mailing list