Open source mail server able to manage large mailboxes accessed via IMAP? [closed]

Solution 1:

My recommendation for an IMAP and POP3 server would be Dovecot. It uses the Maildir format, which uses a single file per email, which tends to perform better in most operations than the traditional mbox format. Dovecot uses a number of index files to speed up the performance of the operations that traditionally take a while with Maildir. If Maildir isn't right for your needs, Dovecot can use a number of other backends.

We've used Dovecot with a number of large mailboxes, both in size and in number of emails. three or four GB is not uncommon in the company, as is several tens of thousands of emails.

As for SMTP, any Linux MTA server would work perfectly. Exim and Postfix are the most common. Exim is a little bit more configurable or the two, but both would handle the load. We do 300K+ emails a day on 4 fairly old servers with Exim, but we do spam and antivirus scanning and deliver to a java process, which are the bigger resource users. I'd steer clear of Sendmail and qmail. Sendmail has a reputation for having a configuration file that is next to impossible to understand.

Solution 2:

Zimbra has an Open Source edition (MPL). I believe it's postfix under the hood.

comparison between versions: http://www.zimbra.com/products/product_editions.html

We use Zimbra (migrated from GroupWise) and while I don't admin the email system, the messaging team is very pleased with it.

The web client is very good and it got us out of the business of supporting desktop "fat" email clients.

We use the commercial edition but I do not believe there are limits on things like the mailbox size in the freed edition. We have numerous (dozens) mailboxes that are 2 GB+ in size.

Solution 3:

If you are going to have lots of emails per account, then maildir is the way to go, but you must use the right file system. Years ago we found that Rieserfs was head and shoulders better than ext2 for large mail systems.

These days, I'd test XFS vs. ext3 with sample data to see which worked better.

Solution 4:

My vote is for Cyrus. I know nothing about Dovecot however I've used Courier quite a bit before dumping it in favor of Cyrus. I build all my stuff from source. Our stack is the following:

Postfix SpamAssassin Amavisd-new Cyrus-SASL (smtp-auth and local mailbox admin) Cyrus-IMAP (POP3 included)

We have just over 5,000 mailboxes and around 1,000 aliases. We use a set-up very similar to the CMU setup wherein we have 4 IMAP proxy servers that also handle webmail (Apache + PHP + mod_perl running Squirrelmail).

5 Dell 2850s (4CPU, 8GIG RAM, RAID10, JFS file system) for the mailbox stores.
4 Dell 1650x (2CPU, 2GIG RAM, RAID5, JFS file system) for the IMAP proxy and Web servers
2 Dell 2850s (4CPU, 8GIG RAM, RAID10, JFS file system) PostgreSQL, one server at each data center.  We have a custom whitebox at each data center doing log shipping for database servers.

We use Rsync to keep remote copies of mailbox servers on whiteboxes and whiteboxes are backed up using Amanda to a dedicated backup server + media changer.

Performance is 2nd to none compared to Courier. Over the years, I was a die hard Sendmail admin with PROC and maildrop. Performance was a constant problem and lack of SQL backend support was a constant nightmare to admin. Sendmail was a constant sore spot in terms of performance and it's stupid forking + startup model for each new SMTP connection. Courier had similar problems!

Switching to this new stack has made admin this system a complete no brainer. With Cyrus and the Cyrus::IMAP::Admin Perl module, we have some custom scripts that go off and build the mailboxes, set up a default sieve script for spam filtering, and even age and delete emails in the Junk and Trash folder after so many days (cyrus ipurge).

I agree that Cyrus is terse and very hard to learn but once you master it, I promise you'll love it. For example, with everything I mentioned above, I have no local user accounts and all settings are stored in a central PostgreSQL database including per user SpamAssassin and Amavisd-new settings.

Some statistics for you:

5000 Mailboxes across 5 mailbox servers (4 IMAP proxies, 2 at each data center)
500 IMAP-IDLE connections per server (500 socket connections per box on average)
Deliver roughly 5 million emails per month, not including spam filtering to Junk folders
Reject 10x the delivery amount based on RBL and other malformed things
All our servers have await stats that hover between .5 and 1 second.
Swap space is at 0% with total memory at 60%
Mailbox CPU (2850) (x4 CPU) during peak times is 30-40% utilization (70-60% idle).
IMAP Proxy (1650) CPU is 10% utilized, these are older Dell 1650s with 2Gig RAM (PIII)
PostgreSQL servers (2850) are at 1% utilized.

We custom compile our own Linux kernels so there is nothing running except core to what we need. Swapiness is increased from default of 60 to 80.