Howto: Setup a MySQL Mail Server
Using Postfix, DBMail, Amavis, ClamAV, SpamAssassin, Cyrus, and of course MySQL
Firstly, you may have never set up a mail server before, after all - it is not something that is a regular occurrence to do, what with all of the freely available web-mail providers today - but there may come a time when you need one.
Secondly, why store information in a MySQL database, doesn't that add overhead? Well the main reason to use such a system, is the ease of use of maintaining, backup, retrieval and administration of the users. There is no requirement for any users to be created on the actual system, they are merely rows in the database, and can be viewed, edited, deleted using simple SQL commands. This means that you can write a customised program to handle mail the way you want.
By the way, this guide was written based on the Gentoo meta-distribution, as that was the platform I used when setting up this database. Please make sure you read each step and complete it before moving ahead.. oh, and if anything goes wrong, don't blame me!
Step 1. Install MySQL, and Postfix
In gentoo this is just a matter of:
# emerge mysql postfix
Use whatever means you require to install the above on your distribution