Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set up a mail server on my Ubuntu 12.04 box from Linode. The box currently runs Apache, MySQL and PHP and runs a few of my websites, and I want to set up an email account like In the interest of learning, I'd like to go through the painful task of setting up my own mail server.

I've seen lots of suggestions on how to do so, most involve using Postfix and Dovecot, but I'm really struggling to understand:

  • What is the difference is between both?
  • How to set them up properly to work together?

I just want a mail server running IMAP which I can use a mail client like Thunderbird with.

share|improve this question
I really think you shouldn't install 2 different email servers. It just will cause a headache. Please decide upon one and stick with it. – Braiam Aug 3 '13 at 0:49
I just finished setting up my first Postfix server on Ubuntu 12.04 and it was relatively easy with a few guides. Not sure the difference but Postfix is the recommended default for Ubuntu. Maybe these will help: Ubuntu Postfix Guides, Ubuntu's Recommended Apps, Helpful guide for understanding Postfix's options – Steelsouls Aug 7 '13 at 23:37
@Braiam why not dovecot-postfix? they're not exactly imcompatible... – Thufir Dec 26 '13 at 13:37
@Thufir the less services you run, the easier to manage, configure and secure ;) – Braiam Dec 26 '13 at 14:20

Postfix will handle smtp. That is: postfix is a server that handles receiving and sending emails. When I ( what to send email to you ( that will cause to talk to postfix on . Same thing the other way. If you want to send email to me, that will cause postfix on to talk to

Now IMAP is just a convenience. It will allow you to access your emails on other computers (than You can think of emails as files in, and thunderbird just reading a remote directory (that is in

My advice: Install postfix first, without dovecot. Test it (read and send email via the command line of Then worry about IMAP.

share|improve this answer
the current mail stack, , is dovecot with postfix. You can use swaks to test postfix nicely (easily). – Thufir Jun 10 '14 at 5:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.