All IMAP Servers Are Not Created Equal

Many moons ago, we decided to move away from the old standard POP -based e-mail, and offer/promote IMAP instead. The paradigms are drastically different.

With POP, users log in and [are supposed to] download their mail to their local computer. The transaction is quick, and the storage resources necessary are minimal, as we only need to store the mail between the time they receive it and next check it. Bandwidth was mildly important, system RAM was mildly important, processing power was fairly important.

With IMAP, users log in, check for new mail, download all of the headers from whichever folder they’re in to their local computer, and stay logged in all day long. Storage is consumed voraciously. Bandwidth is something that needs tending. System RAM is consumed with the hunger of a million starving suns, and processing power has never been adequate.

… Or so we thought.

Back before the Earth cooled, when we moved to IMAP, we adopted a popular IMAP product known as Courier-IMAP. I don’t remember the discussions that led us there, but I remember them focusing on the products that were venerable and supported the mailbox format we use (Maildir served by qmail). We went along for a bit with this and it was working well, until our usage grew beyond some point- Since then we’ve had chronic mail problems that we threw literally everything at: Faster disks.. didn’t matter. Quad-processor server… helped a little, but didn’t matter. Faster disk interconnect.. didn’t matter. More RAM… helped a little, but didn’t matter. Different filing systems… didn’t matter. More venerable disk architecture… Didn’t matter. Changed IMAP server… Instant Relief.

Before Dovecot… And After DovecotWait… what? Changed IMAP server… Instant Relief. With relatively little advance development time (which is not normal for our group) we replaced Courier-IMAP with Dovecot, and immediately went from intolerably high-loads and abnormal process latencies to the way things are supposed to work. Immediately. Jeff had a development version of Dovecot up on a development box that he was seeing good results from, and cloned it over to the production mail server, running on a different port and firewalled off so only the invited few could use it – We saw mailbox access times that used to take minutes, be trimmed to single-digit seconds. We saw operations that chronically timed out, be completed in real-time as they were requested. On the same hardware. On the same production server. In parallel to the ongoing problems everyone else was experiencing using Courier.

After flipping the proverbial switch, and replacing Courier with Dovecot for all users, we saw immediate relief of previous performance problems. The screenshot on the right (or above) was of our monitoring system showing 2 days of resource usage: Day 1 was the last day everyone was on Courier, and Day 2 was the first day on Dovecot.

Today, is the 10th Day we’ve been using Dovecot, and the results are the same. I have nothing bad to say about Courier. If you’re using it and it’s working for you there is no reason to change. If you’re having scalability problems, the first thing I would try, today, is Dovecot.

This entry was posted in Linuxy, Opinions, Work. Bookmark the permalink.

1 Response to All IMAP Servers Are Not Created Equal

  1. I use dovecot with sasl and a cutom compiled postfix with the corporate mail servers I built and maintain. I agree it rocks. One thing I found was that our users with the older versions of office 2003 had trouble as the dovecot was actually too fast for outlook. Yes, I would rather be using notes, or heck even eudora, but the execs had bought into outook long before I came around. But, I will not allow an exchange server. Actually, I won’t allow any MS servers and access to the internet unless behind a hardened bsd proxy. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *