or Setting up a Virtual Mail System using Postfix, MySQL, SpamAssassin, (ClamAV,) Amavis, Sieve, Roundcube, Dovecot and Mailman.


I always wanted to have my own mailserver in a secure and easy to maintain manner, avoiding as much SPAM as possible and pushing the problem of SPAM back to the sender, instead of filtering it and storing in a dedicated folder. I was running postfix for quite a while already, when I started to think about a a new clean and easy setup along with good howto pages. The following book pages shall guide you through the whole setup process from postfix to roundcube installation, tested and used on an ubuntu 8.04 LTS / ubuntu 10.04.4 LTS / ubuntu 12.04.5 LTS server.

I talked to some friends of mine - some hobby mailserver admins, some pro’s - for good configuration ideas and came up with the following requirements. Of course, they will not be the same for everybody, but maybe can be used as a starting point. But first some features, to help you decide if you want to read it.


  • Preferably Use Postfix (was installed already)
  • Use Greylisting to Lock Out Spammers
  • Apply Spamassassin During SMTP to Reject Spam Before Delivery
  • Maintain a MySQL User Database instead of local users
  • Provide IMAP and POP3 Mail Fetching
  • Require TLS Authentication for All, IMAP/POP3/SMTP
  • Add Sieve Scripts to Apply Filtering on Server Side
  • Scan Messages for Malware on Server Side
  • Administrating Mailing Lists

I hope, the guide helps you setting up your mailserver and maybe you have some additional notes regarding the documentation. If so, please don’t hesitate to write a comment and I will be happy to update and/or correct the text.