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 myname@mydomain.com. 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.

  • 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 (frobenius@otherserver.com) what to send email to you (you@yourserver.com) that will cause otherserver.com to talk to postfix on yourserver.com . Same thing the other way. If you want to send email to me, that will cause postfix on yourserver.com to talk to otherserver.com

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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