Alessandro Vesely writes:

Some IMAP servers use indexed files too.  Courier does not.  What is the
rationale behind that design choice?

I expected – as I said – for clients to handle their own caching and indexing. Indexing adds complexity. More code, more opportunities for bugs. Furthermore, there is no preset recipe for indexing. IMAP allows the client to request, and search, on any mail header, and on anything in the body of the email. There's nothing obvious to index. One could take the approach of indexing common mail headers; only to discover that one's own mail client doesn't search or request them. One could take the approach of indexing all headers only to get a client that caches everything itself, and thus never requests the same message twice; so now you're doing a lot of work creating an index that will never be used.

Another factor that the fact that maildirs are open to anyone. Anyone can come in and add or remove messages from a maildir. Allowing for this immediately increases the complexity of any indexing solution. It's one thing for an IMAP server that maintains its own private mail store, and all access to the mail has to go through the IMAP server. That makes it much easier to implement some kind of indexing. It's no longer as straightforward when anyone can come in and simply delete the message, that you previously indexed. This means that even if you have an index, you still have to go and check that the message still exists, before returning search results to the client. That, pretty much, takes back a good chunk one expected to gain, from indexing.

Attachment: pgp5be9KjI78Q.pgp
Description: PGP signature

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
courier-users mailing list

Reply via email to