Mail server on Ubuntu 14.04 using Postfix, Dovecot, Squirrelmail

Very recently I had to create a mail server on Ubuntu 14.04. This post is not about the steps I have followed but more about presenting some straightforward guides I have come across on the internet as well as sharing few tips which I found useful. Before you start you should know the basics about mail and how it works. Needless to say that if you have a domain name it should be properly configured for MX protocol. This happens when you manage the DNS entries for your domain.

  • Postfix is a MTA (Mail Transfer Agent) server which is software that transfers electronic mail messages from one computer to another using a client–server application architecture.
  • Dovecot is the ‘client’ in this hierarchy. Dovecot is effectively an open-source IMAP and POP3 server for Linux/UNIX-like systems
  • Squirrelmail is a php web interface for managing mail. It’s effectively a webmail software which is used to manage the emails through an account like (hotmail)

Here is a complete guide you can follow for the entire setup (author also replies to comments)

You can also find another guide for postfix admin which includes managing virtual mail accounts with mysql


Few tips:

  1. Read about the OS that you will be installing these tools on as several of those commands may be different.
  2. Try to search for a comprehensive guide for postfix and postfix admin.
  3. If you are using virtual mail accounts (i.e. accounts that are not present on the operating system), these are managed by postfix in combination with a database.
  4. In case of mysql being your chosen database ensure that you have all the related packages for each of the software installed. This includes postfix-mysql, php5-mysql etc