Ask HN: What is a good open source mail server for Linux?

14 points by Prefinem ↗ HN
I have been looking around and want to setup my own email server for my domain. I am running an ubuntu box for a server and want to install a mail service that is easy to install and allows for multiple users that can be created on the fly. I have looked into dovecot and postfix but whenever I try and look up a good tutorial, people are using postfix and courier or some other program.

What would you recommend for a good open source mail server that uses IMAP and SMTP so I can setup a webmail client and use Thunderbird on?

24 comments

[ 0.23 ms ] story [ 54.2 ms ] thread
Use postfix for your MTA for raw smtp. If you want open source web mail and everything fancy checkout either round cube or zarafa. Bonus points for zarafa for having iPhone / android / blackberry compatible active sync and outlook compatibility
You'll probably hear this alot: Just dont do it. Seriously. Running a mail service is complicated and on your own it's barely worth the effort.

But if you're serious about it then start with learning Postfix as your MTA. This will only be good for inbound mail and delivering mail to local inboxes. If you want IMAP and POP3 then you'll need to dig into some other services. Courier is the most popular, but all the glue will still need to be written by you.

So if it is not a good idea, what is another option to use my domain for an email address?

And you are saying Courier is better than Dovecot?

When Google Apps were free, my advice was typically just to let Google host email. Now that it's not free? Hard to say. You could just set up email forwarding, Postfix does that pretty easily.
FastMail always gets high marks from people who abstain from the Borg.
I thought about fast mail, just don't want to pay for something I could do on my own
when google apps are free the fbi nsa et al read all your emails...
Zoho hosts custom domains on their free business plan. You get both imap and not-ugly web interface.
it is a good idea. but indeed, there is a lot of mobile parts to configure right in this fay and age of spam to avoid problems. in the early days it was much easier to run a wacky mta configuration.
what trevoro has mentioned is 100% right. If you want just get things running without much efforts and still want to keep your mail server in-house, then go for zimbra opensource edition. Its worth using and will make mail server administration somewhat easier.
proxmox.com has an open source mail server/gateway package.
If I am remembering correctly, Outlook should let you use a custom domain. However, I've never used it because I use Google Apps.
Prefer to work with Linux and stay away from Microsoft
Buy a package at some web host where they have done the dirty work for you and you still own/control the data.
Exim (SMTP) & Dovecot (IMAP/POP) work well together. Run them locally first to get comfortable since it sounds like you're a bit new to this. Read the docs and don't hesitate to search and post over at Serverfault ( http://serverfault.com/ ).
If you like to learn a lot about the internals of SMTP and mailservers in general and need/want a super reliable, fast and (if the setup is carefully crafted) secure mailserver - I like qmail.

My setup is qmail (SMTP) + vmailmgr + Dovecot (IMAP) and it was pretty easy to set up.

To start with qmail, I would recommend http://www.lifewithqmail.org/

I use Debian's Exim package. It's not too much hassle, although I'd advise avoiding Debian's magic configuration stuff unless you're sure it suits your needs.

Edit: Oh, and courier-imap. It's so little hassle I haven't touched it in years and forgot how it's set up.

I'm running Debian (old[1]) stable with Exim for incoming and outgoing smtp with greylistd for limiting spam, and dovecot for imap4 access -- all with my own SSL certs from cacert.org. At some point I'll probably have to set up more spam filtering - but for now it works surprisingly well.

Unless you really know Exim well I would recommend to keep "Debian's magic configuration stuff". It makes it easy to set up SSL/TLS:

http://wiki.debian.org/Exim#TLS_and_Authentication

Setting up dovecot is pretty straight forward, too:

https://www.debian-administration.org/article/275/

Note: I see no reason to enable imap -- just go with imaps.

Greylisting for exim:

http://www.debian-administration.org/articles/167

Both Exim and dovecot can use a separate password file (among other options) for "virtual" users. I just use pam-auth for imap, and separate auth for smtp -- imap does give access to user files anyway (at least in principle, it could probably be locked more down).

If you're new to Exim, there's no big reason not to use postfix -- other than it's the default for Debian (Postfix being default on Ubuntu).

If you're going to host a lot of virtual users -- you might benefit from dbmail -- I haven't tried it myself, but been following the project from the sidelines for a few years -- it appears to be a good solution for virtual-user email (email users that are not also system users):

http://www.dbmail.org/

[1] I'll be dist-upgrading "soon" -- hopefully nothing will break ;-)

edit: formatting

Postfix and Dovecot work fine together. It's a one-time effort to set it up and it will work for many years. Most of the work will go into setting up spam filtering (Spamassassin), some virus-scanner if you want to bother (Amavis) and perhaps the Anomy Mail Sanitizer, which has served us well over the years, as well as the task of setting up SSL/TLS for SMTP, unless Ubuntu has taken care of that already (Debian Squeeze hasn't ...).

Unfortunately, all Open Source webmail clients I know of (including Redcube, Horde) are cumbersome if you have used Gmail and Fastmail.

Just an update, I ended up using Citadel Easy Install, which honestly, was extremely easy. It did give me IMAP and SMTP mail access and was incredibly easy to use using the web admin that comes as part of the suite. Thanks everyone for their help!

PS. Citadel isn't very pretty looking so if you are just using it for webmail, I would suggest installing roundcube on top of it (you can setup the web admin to use a different port and still run apache/nginx for your site)