Faster IMAP searching for Courier IMAP server on Linux
I am looking for tips on improving IMAP search performance using Courier IMAP. The current version is 4.2.1. Unlike in the question "Fast search for IMAP?", I'm specifically looking for server side improvements.
Access performance is already quite good on fairly large accounts, but search is slow. Is there some kind of tool / add-on that can be used to generate good indices for the various interesting mail fields?
Solution 1:
Looking through the courier imapd docs and my installs of it it doesn't seem to have a cache or index of anything beyond the uids of the messages.
Have you looked at dovecot? It looks like you can migrate to it without users noticing. It also has a discussion of how it cache's various bits of information in message database.
All that being said, a reading of the discussion of caching and indexing the message folder leads me to believe that perhaps the real place for caching and indexing the messages is on the client not the server. Probably a head-to-head test would be in order.
Solution 2:
I'm not familiar with Dovecot but I am quite familiar with both Courier and Cyrus. I built a courier system from source and maintained it for years before dumping it in favor of Cyrus.
Cyrus is a bare to learn. The documentation is crazy complicated and terse. However, I've found Cyrus to be really awesome once you figure things out.
Cyrus has a squatter service that does full text indexing on the mailbox store. You want the indexing done on the mailbox store for a couple reasons:
If you have a webmail app, like squirrelmail, you can enable server side look-ups which, in turn, will cause Cyrus to use it's squatter database.
Indexing on the client can be problematic if your index get out of sync between multiple clients.
Another plug for Cyrus: We have over 5,000 IMAP/POP3 customers; we host a lot of customer email; one of our customers is a local cable TV company. We use a setup very similar to CMU's with IMAP proxies running on same web servers that handle webmail. The mail stores are distributed among 5 backend servers. We have 4 IMAP proxies. Although 4 is over kill, we get away with it because we have two physically distant data centers and local HA (High Availability) is required for us plus the IMAP proxies are pulling double duty and running Apache+PHP+mod_perl for the webmail aspects.
Finally, Cyrus has sieve and excellent extensibility via Perl modules... All this allowing some very cool SPAM & Virus filtering and SpamAssassin learning....
Take a hard look at Cyrus, I promise you'll grow to love it. A good book is "The Book of IMAP" and it covers many aspects of Cyrus...