I need to set up a TLS-capable email server (which I will access via IMAP), so that the messages are encrypted between my email server and the recipient/sender’s email server.
Initial investigations show that my pessimism was appropriate – I can’t find much clear information about how to do this. Ubuntu do a server release now, so I’d like to just use the stuff they recommend. how they recommend it, but there’s not much documentation about what they package, and I still have to deal with various things, and decide between them, including sendmail, postfix, dovecot, exim, etc, which translate for me to “yadda, yadda, yadda”. As far as I can tell, dovecot does IMAP, and postfix does SMTP, and they have to be set up separately and somehow told to use the same mailboxes and the same security settings.
I don’t do this stuff generally. Installing Apache is obscure enough for me, thanks. If there’s an nice explanation for the uninitated somewhere, and a detailed how-to, that would be nice.
Am I wrong to think that most email servers should have very similar setups, so some kind of wizard/installer could just give me what I probably want?
13 thoughts on “Installing an email server on Ubuntu”
I personally use Postfix and Dovecot on a Debian box, doing all the things you describe. I’m fairly familiar with Postfix though – if you want, email me and I’ll send you my config files for that and Dovecot. I’m led to believe though that the Debian installer for Exim has a fairly nice wizard sort of thing that asks you all the relevant questions and goes and writes a config file for you. That might be worth a shot too.
Hi, you can take a look at courier, it does smtp, pop, imap, and more.
I’ll put another vote in for postfix + dovecot (I’m using them atm, but not with TLS).
In a nutshell, what you have to do is configure postfix on one side (which basically means putting your domain in /etc/postfix/main.cf adding it to the mydestination line, and that’s only if your hostname isn’t that already) and dovecot on the other (set up the protocols line, and for you that should be about it).
I can’t say that I’ve set up a TLS server yet, but all the lines seem to be in the 2 files I mentioned above (lots of TLS stuff).
Any how, drop me a mail if you have any questions/problems, I’d be glad to help out.
Very clear tutorial on setting up TLS for postfix: http://www.tribulaciones.org/docs/postfix-sasl-tls-howto.html
And for IMAP, you just need to install Dovecot and change a few lines in the config file to turn on imap w/ TLS.
Also: http://adomas.org/2006/08/postfix-dovecot/ seems to be just what you are looking for (Ubuntu centric, not just Debian centric).
When I ran a server, I used exim and dovecot. Exim’s pretty complicated, I have to say. However, if you install dovecot, it Just Works; it uses your exim mailboxes, so you don’t have to do anything at all to it to get IMAP. Unfortunately, (a) I don’t know whether that applied to mailservers other than exim, and (b) if it doesn’t then you have to use exim, which is pretty complex. I’d love to see a really simple mail server that would be useful for small things but isn’t necessarily capable of running the email for all of IBM like exim is…
This document for postfix+dovecot+ldap worked fine for me with Ubuntu 6.06 server.
I use CentOS with sendmail + dovecot for encrypted IMAP. Works very well.
You could try cyrus-imapd with postfix, exim, qmail or sendmail. I personally use it with sendmail and it is the easiest thing in the world to setup. Get some gyrus admin on the go and you’re gnome admining the server.
Advantages of cyrus are enormous I’ve been using it with sendmail now for around 6 years, it is more secure than most mail systems as it runs itself in a bottle of sorts. It provides TLS and can authenticate in many ways via the SASL protocol.
Hope this helps…
But he had a valid point: it requires lots of command line trickies to get a system that should/could just work out of the box.
I would love to see some meta-packages, such as:
Which would just setup some default server configuration. In the case of mail they could choose some imap-server and turn on basic spam filtering.
Perhaps even an ISP style install:
Which would setup web-server + home folders and mailboxes, etc. with quota’s and a simple web-interface to add/remove users.
I really don’t like the if-you-dont-know-how-to-set-it-up-than-don’t mentatility of linux servers.
What’s wrong with _sane_ defaults ?
how about that :)
I run a mailserver using exim4 and courier-imap-ssl. It’s debian, rather than ubuntu, but I doubt things are very different in that regard.
Setting up exim4 with the debian packages was very straightforward. I think getting SSL working required a little bit of reading. Courier was pretty nice too.
In comparison, I have had problems setting up postfix for similar purposes, although the difference is really a testiment to how well the exim4 package is written, rather than any issue with postfix itself.
Meneer R, I share your opinion on having a mail meta-package. Apparently the dev’s don’t think it as important as us general users. I had created a blueprint for this on Launchpad, but no one has ever taken it up:
Thank you for your page.
Recently I setup a homemade e-mail server and wrote a full detailed tutorial that you can find in
using Debian Squeeze, Postfix, Dovecot, SASL, Spamassassin and Squirrel (and a Google account for SMTP relay).
I wish it is helpful to someone.