Created attachment 105431 [details] slightly redacted connection log When opening a FastMail mailbox (their Cyrus fork) to which a large number of mails are being copied to (from local storage, using KMail), I get: UnknownMessageIndex: Got FETCH that is out of bounds -- got 918 messages FETCH 919 ( FLAGS "\Recent $X-ME-Annot-2" UID "919") Trying again gives the same issue, only the numbers are different, i.e, higher, because more messages have been added. This may be a duplicate of Bug 377416 if the problem is Trojita's and not the server's.
This looks like a bug in the server. Here's the relevant part of the log: 14:08:35.66612 <<< * 918 EXISTS 14:08:35.66612 <<< * 379 RECENT 14:08:35.66612 <<< y9 OK Completed (0.002 sec) 14:08:35.67712 >>> y11 UID FETCH 918:* (FLAGS) 14:08:35.75912 <<< * THREAD [...] 14:08:35.76012 <<< y10 OK Completed (918 msgs in 0.033 secs) At this point, the server let us know that there's 918 messages in total, their MSNs are ( by definition) 1-918. So far, so good. 14:08:35.91312 <<< * 918 FETCH (FLAGS (\Recent $X-ME-Annot-2) UID 918) This one was also reasonable -- the server let us know about an update of the last message's flags. That is nice. 14:08:35.91312 <<< * 919 FETCH (FLAGS (\Recent $X-ME-Annot-2) UID 919) 14:08:35.91312 <<< * 919 EXISTS But here's the bug -- the IMAP server sent a FETCH FLAGS about a message with MSN 919, but it didn't let us know that there was an arrival before. EXISTS must be sent prior to FETCH. 14:08:35.91312 <<< * 380 RECENT 14:08:35.91312 <<< y11 OK Completed (0.001 sec) I've notified a friend who works for FastMail about this.
(In reply to Jan Kundrát from comment #1) > I've notified a friend who works for FastMail about this. To avoid confusion on the FM side: this is support ticket 2393752.
Yep, I've replied on the FastMail ticket and I'm chatting to other Cyrus devs about it. First step will be building a test! Bron.
Got word it was fixed at FastMail.