Personal wiki of Goran Jurić


Mail server - Debian Lenny (5.0) / Ubuntu

This article is outdated. Updated version on building a mail server on Debian 6 is published as a free eBook here.

We are going to install Postfix as our MTA (SMTP server) and Courier as our POP/IMAP server. Postfix will use virtual domains, and information about our domains and users will be stored in the MySQL database. For managing virtual domains and users we will use PostfixAdmin.

For virus scanning and spam protection of our emails we will use ClamAV and Spamassassin that will be run using amavisd-new.

As a local delivery agent we will use Maildrop that will be configured to move all messages marked as spam to the Junk folder as well as to make sure that users do not go over their assigned quota.

This implementation of quota on the mail system does not require you to patch Postfix. All software is installed from official Debian repositories.

Note: this tutorial is a combination of tutorials published on and and a lot of my own work.

You also must have a valid MX record in the DNS zone of your domain pointing to the IP address of the server.

debian/mail-server.txt · Last modified: 2015/03/13 23:29 (external edit)