MBOX-Line: From jkt at flaska.net  Fri Dec 28 08:08:57 2012
To: imap-protocol@u.washington.edu
From: =?iso-8859-1?Q?Jan_Kundr=E1t?= <jkt@flaska.net>
Date: Fri Jun  8 12:34:49 2018
Subject: [Imap-protocol] Missing UIDNEXT during mailbox synchronization
Message-ID: <db123879-1082-4911-b7ce-3a861d62217a@flaska.net>

Hi,
I've received a report that Courier 4.5.0 sometimes doesn't return UIDNEXT when syncing a mailbox, violating RFC 3501. Trojita used to hit an assert in such case which was clearly my bug. This has now been fixed.

My code has always treated missing EXISTS, UIDNEXT or UIDVALIDITY (either in what was currently received from a mailbox or what we have in a persistent cache since the last time) as a reason to throw away anything in the cache and fall back to a full sync, similar to what happens when UIDVALIDITY changes. I wonder if this is really required -- on one hand, the IMAP server clearly violates the spec, but on the other hand, it might be tempting to work around this situation by at least preserving the cached message parts data so that users don't have to download everything again. The UID-seq mapping will have to be reconstructed anyway, but that's unavoidable.

Is it really required or recommended to discard the cached immutable data for messages in a mailbox when the server doesn't send UIDNEXT?

With kind regards,
Jan

-- 
Trojit?, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/

