Re: [Mutt] #3459: Mutt hangs when opening large IMAP mailboxes on an Exchange Server
#3459: Mutt hangs when opening large IMAP mailboxes on an Exchange Server
--------------------+-------------------------------------------------------
Reporter: me | Owner: me
Type: defect | Status: accepted
Priority: major | Milestone: 1.6
Component: IMAP | Version: 1.5.20
Keywords: |
--------------------+-------------------------------------------------------
Comment(by papo):
The user 'scandal' suggested to split the single FETCH of all
messages into several FETCHes of smaller chunks:
{{{
--- imap/message.c.orig 2010-10-03 17:55:58.000000000 +0200
+++ imap/message.c 2010-10-03 17:54:51.000000000 +0200
@@ -240,7 +240,11 @@
if (msgno + 1 > fetchlast)
{
fetchlast = msgend + 1;
-
+ /* Microsoft Exchange 2010 violates the IMAP protocol and
+ * starts omitting messages if one FETCHes more than 2047 (or
+ * or somewhere around that number. We therefore split the
+ * FETCH into chunks of 2000 messages each */
+ if (fetchlast - msgno - 1 > 2000) fetchlast = msgno+1 + 2000;
snprintf (buf, sizeof (buf),
"FETCH %d:%d (UID FLAGS INTERNALDATE RFC822.SIZE %s)", msgno + 1,
fetchlast, hdrreq);
}}}
I added this line to the version of mutt shipped with Ubuntu lucid
(1.5.20,
probably with some patches) and have it running for two days now. This
strategy
fixes the problem and I was not able to observe and side effects for now.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3459#comment:4>
Mutt <http://www.mutt.org/>
The Mutt mail user agent