On Sat, Aug 21, 2021 at 09:32:11PM +0200, Pieter-Tjerk de Boer via Mutt-dev wrote:
Unfortunately I don't think this is the correct fix. There can in fact be holes in the MSN sequence.I'm by no means an IMAP or mutt code expert (never touch mutt code, nor studied the IMAP RFCs, until trying to fix this bug), but in RFC3501, section 2.3.1.2, the MSN is described as "A relative position from 1 to the number of messages in the mailbox". This implies there can be no holes, or am I overlooking something?
This was observed in Trac ticket 3942: <https://gitlab.com/muttmua/trac-tickets/-/blob/master/tickets/closed/3942-mutt_with_hanging_on_large_Exchange_Deleted_Messages_folder.txt>
I think a better fix would be changing the sort order to use UID instead when creating the msgset,Indeed, that would be a more robust solution to the message delete problem, as it then no longer relies on MSN and UID being monotonically related. But I think it wouldn't solve the problem that the unsuccesfully-deleted message jumps to a different position in the unsorted mailbox view.
I understand, but I don't think unsorted makes a particular promise here. It just reflects the messages as they are assembled into the index.
-- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature