4

I'm looking for a open source mail server based on Linux to replace an existing Exchange mail server (Windows Server 2003) with several (5-10) large mailboxes (each with more than 2 Gbytes in size or more than 100.000 messages). Each of these large mailboxes is accessed via IMAP by several people. Also there are other, smaller, mailboxes (100-150) that are accessed via POP3.

Do you know any open source mail server suitable for this task?

Thanks!

splattne
  • 28,348
  • 19
  • 97
  • 147

5 Answers5

15

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.

David Pashley
  • 23,151
  • 2
  • 41
  • 71
  • Dovecot is good stuff. – womble Jun 17 '09 at 07:57
  • For large mailboxes one should only use maildir and should not use any other backend (no matter that dovecot supports them). IMAP is also better than POP3 especially with a good caching client like Thunderbid3. Good answer btw. – cstamas Jun 17 '09 at 09:03
  • 2
    Maildir has disadvantages, particularly with very large numbers of emails. Most filesystems can't cope well with many files in the same directory. You can improve that by picking the right one, for example, ext3 with dir_index turned on, but it's still not ideal. You might find that a database-backed backend works better, but in most cases I'd use Maildir. – David Pashley Jun 17 '09 at 09:24
  • 1
    My fiancée was running 5 gig+ mail spools on my Dovecot IMAP server, which was a dual PII 450 with a decent scsi raid set (Compaq Proliant 3000). It never had any performance issues. – Haakon Jun 17 '09 at 10:22
1

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.

damorg
  • 1,198
  • 6
  • 10
1

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.

Walter
  • 1,047
  • 7
  • 14
1

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.

Kilo
  • 1,554
  • 13
  • 21
0

Dovecot does everything and is relatively easy to install (compared to Cyrus at least).

Sven
  • 97,248
  • 13
  • 177
  • 225