[Imap-protocol] Re: Courier bug(?)

Jan Kundrát <[email protected]>
Newsgroups gmane.mail.imap.general
Message-ID <[email protected]>
On Monday, 28 January 2013 22:58:43 CEST, Michael M Slusarz wrote:
> rather than  trying to keep a sequence->UID map (ugh)

If you maintain any sort of persistent cache, you want to remove obsolete items from there. Prior to QRESYNC, the only way a server could tell you about expunges was via, well, the EXPUNGE response which uses sequence numbers. This means that you either don't have message data cached locally, or you absolutely have to have uid->seq mapping for the full range of messages which you have in your cache. If you don't have that, you don't know whether the expunge the server has just told you refers to something you have or whether it can be ignored.

You can certainly make optimizations like speculating that expunges will likely happen at the end of the UID range. The question is whether it is worth the effort in presence of ESEARCH and QRESYNC. There are other reasons which speak heavily in favor of maintaining the full mapping at all times; for example in Trojita, supporting the THREAD command without that would be rather complex (you want to work with UIDs to cache that infromation across reconnects etc etc etc).

And just for completeness, what I spoke about was *maintenance* of the full seq->UID mapping, not fetching it all the time. There are ways of updating the mapping since the last time with only minimal traffic in most common situations -- and as I tried to show in the other thread, UIDNEXT is vital for them.

With kind regards,
Jan

-- 
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
_______________________________________________
Imap-protocol mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-protocol
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.