A simple guide how to set up a basic Postfix mail server with IMAP and POP3 services. It does not included advanced topics such as integrating virus-checking and spam-filtering.
Setup Overview
In our setup, Postfix sends and receives mail from Internet and stores them in the user mailboxes while clients in the Internet can retrieve their mails via Courier IMAP or POP3. The user authentication is done by Courier Authdaemon. The following diagram shows this process.
Install Postfix
In this setup I assume that your domain is yourdomain.com and it has a valid MX record call mail.yourdomain.com. Remember to replace yourdomain.com with your actual domain in the example codes in this howto. Also I assume that you know what an MX record is. To find out MX your type in a terminal:
dig mx yourdomain.com
To install postfix
sudo apt-get install postfix
Intall mailx package for use as command mail utility program. Mail command is installed with this package.
sudo apt-get install mailx
Continue reading