<<< Date Index >>>     <<< Thread Index >>>

Problems with Tudor Bosman's IMAP header caching patch



I've compiled mutt 1.5.4i with Tudor Bosman's IMAP header caching
patch (thanks to René for sending a copy out to the list recently),
but it's not working with my Courier IMAP server, v1.4.2.  An Ethereal
packet capture session reveals the problem, but I don't know who's at
fault and would be grateful for any suggestions.

The problem occurs when I start mutt.  It never displays my inbox, but
instead prints the message "Invalid message sequence number: 21" at
the bottom of the screen and hangs.

The packet capture of the IMAP session reveals that my inbox is
selected:

  a0003 SELECT "INBOX"
  * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
  * OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited
  * 20 EXISTS
  * 0 RECENT
  * OK [UIDVALIDITY 1014221290] Ok

Then mutt does a STATUS comment on all the mailboxes that I specify
with "mailboxes" commands.  I've omitted all that output.

And then it issues this FETCH command:

  a0031 FETCH 1:255 (UID FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS 
(DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE IN-REPLY-TO 
REPLY-TO LINES X-LABEL)])

I'll omit the message headers, but 20 of them come back, followed by
this error:

  * NO Invalid message sequence number: 21
  a0031 OK FETCH completed.

...at which point mutt prints the error and hangs.

The reason for the error appears to be the range specified in the
FETCH command above: it's 1:255 rather than 1:20.  Is this a bug in
the patch, that should be specifying the proper range, or is Courier
IMAP overzealous in its error reporting, or are they both doing the
wrong thing?

Thanks for any help,

Matt