After a long period of trial and error, I think I’ve finally chanced upon the best email solution for work. It turns out that, the solution follows the principle of using the best component for each task, and building a solution out of all the components — the so-called UNIX way.
Anyways, here’s what it breaks down to:
Exchange server => fetchmail => procmail => Maildir => dovecot ==(imap)==> imap clients (Apple mail.app, wanderlust, thunderbird, etc.)
- Exchange server: Well, there’s pretty much no choice here.. this is what our IT forces on us.
- fetchmail + procmail: Fetchmail is a really nice and simple utility. While not all that functional in itself, it is very good at being the glue between a mail server and a local delivery agent. As for procmail, it’s filtering ability is much more expressive than outlooks, and lets leave it at that.
- Maildir + dovecot: Maildir seems in general better than mbox. I like the fact that it works over nfs, and I don’t have to worry about locking. The problem with maildir is, when you get lots of messages, it can get really bogged down. Listing a directory over NFS with 20K messages can even take a while. This is where dovecot comes in.. it has a very good caching and indexing solution that essentially overcomes this performance issue of Maildir over (relatively) slow NFS.
- IMAP: IMAP is the protocol that was built for remote mail-store access. As such, it has all the useful primitives and semantics to make this process efficient. It also allows concurrent access from multiple clients, which was a hard requirement for a new mail setup
It turns out that using Maildir + dovecot + imap client can actually be faster than a bad implementation of a Maildir client trying to access the directory it self. For example, Evolution would take ages to check that it’s own index files were consistent with each Maildir’s contents. kmail was somewhat better, but still seemed flaky. Wanderlust took forever to build its ‘msgdb’ the first time, but subsequent updates were reasonably fast. Through IMAP, since all the clients don’t have to worry about the actual files themselves, they’re all very fast.
The real beauty of the situation is that, each component is tied together using standard interfaces. POP3 to pull off of exchange, a standard MDA protocol for fetchmail to procmail, Maildir for procmail to dovecot, and imap for dovecot to mail clients.
And Phil, Ramesh, and Lisa, thanks for listening to my random rants on the subject.
The last step is to package it as a server appliance so that others at VMware can also use it easily.