Language Selection

English French German Italian Portuguese Spanish

Howto: Mail Server with Virtual Users And Domains

Filed under
HowTos

This document describes how to install a mail server based on Postfix that is based on virtual users and domains, i.e. users and domains that are in a MySQL database. I'll also demonstrate the installation and configuration of Courier (Courier-POP3, Courier-IMAP), so that Courier can authenticate against the same MySQL database Postfix uses.

The resulting Postfix server is capable of SMTP-AUTH and TLS and quota (quota is not built into Postfix by default, I'll show how to patch your Postfix appropriately). Passwords are stored in encrypted form in the database (most documents I found were dealing with plain text passwords which is a security risk). In addition to that, this tutorial covers the installation of Amavisd, SpamAssassin and ClamAV so that emails will be scanned for spam and viruses.

The advantage of such a "virtual" setup (virtual users and domains in a MySQL database) is that it is far more performant than a setup that is based on "real" system users. With this virtual setup your mail server can handle thousands of domains and users. Besides, it is easier to administrate because you only have to deal with the MySQL database when you add new users/domains or edit existing ones. No more postmap commands to create db files, no more reloading of Postfix, etc. For the administration of the MySQL database you can use web based tools like phpMyAdmin which will also be installed in this howto. The third advantage is that users have an email address as user name (instead of a user name + an email address) which is easier to understand and keep in mind.

Full Story.

More in Tux Machines

today's howtos

Linux-Ready Hardware and Android Leftovers

Red Hat, Oracle's RHEL Clone, and Fedora

Debian and Derivatives: SnowCamp, Debian Gitlab, Debian/TeX Live, Snap Apps

  • Report from Debian SnowCamp: day 3
    Thanks to Valhalla and other members of LIFO, a bunch of fine Debian folks have convened in Laveno, on the shores of Lake Maggiore, for a nice weekend of relaxing and sprinting on various topics, a SnowCamp.
  • Report from SnowCamp #1
    As Nicolas already reported, a bunch of Debian folk gathered in the North of Italy for a long weekend of work and socialisation.
  • Debian Gitlab (salsa.debian.org) tricks
  • Debian/TeX Live 2017.20180225-1
    To my big surprise, the big rework didn’t create any havoc at all, not one bug report regarding the change. That is good. OTOH, I took some time off due to various surprising (and sometimes disturbing) things that have happened in the last month, so the next release took a bit longer than expected.
  • Ubuntu Software Will Soon Let You Install Beta, Bleeding Edge Snap Apps
    No, not TV channels, or the sort the that ferries goods between countries, but development channels, e.g, beta, bleeding edge, stable, etc. Snap developers are able to distribute different versions of their app over “channels”, and have for almost as long as Snappy has been around in fact.