Dovecot IMAP and POP3
Not so much flying this weekend - the weather was just too darn hot. Speaking of hot, there's been some push to get the internal mail server upgraded at work.
Fearing yet another Cyrus migration, I took at look at Dovecot.
I've been a long time Cyrus mail storage fan. It is a very robust and scalable system. Messages are indexed for the main headers at the delivery time, making it possible to open huge monster mailboxes in under a second (with a good imap reader, at least). The actual storage is one message per file (eat those inodes!), with indexes; and the indexes are stored at delivery time.
That said, Cyrus is a pain in the ass to set up. No two ways about it. Even harder is upgrading, particularly any time they change the database format. In the past I've found it faster to dump the databases entirely and let it scan the hard way to rebuild. In general, not a lot of fun.
So, for this server upgrade over the weekend, I took a look at dovecot. From where I stand, there are some benefits for our group:
- You can manage the users with a single text file. Sure, you can do various databases, ldap, write your own adapters whatever.. but.. for us, a single text file is great.
- Since we're configuring it with jst a text file, we can drop building (and later depending) on all those libraries. No gdbm. No Berkeley DB. No SQL server. No LDAP. The only thing we linked in was SSL.
- Storage: more "normal". Choice of maildir or mbox. Hell, use them both.
- Cyrus's speed advantage is from precaching headers. Dovecot _can_ do this, but the production method right now is to cache headers (not precache). In practice, this looks to be just fine. I can still open that huge 50,000 message mailbox in a second.
Another neat thing, is we've got it set up so that we have maildir for folks, as the standard location; but with the right path via imap, someone can just as easily open a legacy mbox format mailbox. I'm personally storing my "backups" mailbox as mbox to limit the impact on the server, since it is not routinely opened.
If you're looking at imap servers, or even pop servers, do yourself a favor and spend a bit of time looking at Dovecot.
Originally published: 2006-07-23 21:15:00 -0700, by jfesler