I mentioned back in February that we are switching our POP3/IMAP proxy software from Perdition to Dovecot. These proxy servers are still in beta, because there is a bug with how Dovecot handles SSL connections. Timo (Dovecot’s author) attempted a fix a few weeks ago, but the fix introduced new problems, so we reverted back. I am hoping to get the final bugs resolved within the next couple of weeks so that we can release this out of beta.
In the mean time, we have been hard at work upgrading our backend IMAP software – also to Dovecot. Currently we run Courier-IMAP, but Courier does not handle large mail folders efficiently. Webmail, unlike desktop clients, does not have its own cache, so it relies on the IMAP server to obtain header listings and to perform sorts and searches. Courier lacks indexes that would make these operations fast. Instead it must open every message file and parse out the header information in order to return a sorted list of emails back to webmail. Dovecot on the other hand, makes heavy use of indexes. The indexes allow a folder with 10,000 messages to be sorted in less than a second, whereas Courier would take 30-60 seconds or even longer, and usually cause a timeout. The speed difference is amazing.
In order to make the switch seamless, we have configured Dovecot to run in parallel with Courier on the existing mailbox servers. We patched Dovecot to utilize Courier’s folder subscription and message UID lists, so that both systems can utilize the same maildirs. If you are interested in these patches, shoot me an email and I will send them to you.
Webmail will be the first application to switch to Dovecot. We began rolling this out server-by-server on Wednesday. We are taking our time with this rollout since it is such a big change, just in case any unforeseen problems arise. So far the issues have been minor, and easily corrected.
Once the beta proxy is bug-free, we will start migrating the front-end POP3 and IMAP systems to Dovecot. Needless to say, we are making a big commitment to this Dovecot thing. It will be at the core of what’s to come.
Did you ever hear of Cyrus-Imapd? It does all you want plus it’s rock-stable.
Yes, Cyrus is a great IMAP server. However, the way that Cyrus stores mailbox data is very different than Courier, which would make the migration process difficult. Migrating to Dovecot is very simple. It basically takes the storage format we use today and adds indexes on top of it.
The Dovecot source code is also very clean, which was a big requirement for us so that we can easily extend the functionality.