Complete Virtual Mail Server/MySQL

Setup a Database
With your chosen/preferred database server (i.e. MySQL), you need to create a new database. A good name for this database could be:

postfix

The mechanics of creating the database vary depending on availability and preferences. Many users will find using phpMyAdmin the easiest route to create a MySQL database.

If you wish to use the command line, you'll need to do something like :

Configure PostfixAdmin so it can find the database
Edit the config.inc.php file.

The most important settings are those for your database server.

You must also change the line that says :

$CONF['configured'] = false;

to

$CONF['configured'] = true;

PostfixAdmin does not require write access to any files. You can therefore leave the files owned as root (or another user); as long as the web server user (e.g. www-data) can read them, it will be fine.

The next 'step', is optional. Only do it, if other non-trusted users have access to your user:

Depending on your environment, you may want to protect the database username and password stored in config.inc.php - if so, you could move them into the Apache configuration file (which can be set to be visible only by root) using something like the following in your VirtualHost definition :

SetEnv DB_USER "postfix" SetEnv DB_PASS "opensesame"

config.inc.php would then be able to access these through :

$CONF['database_user'] = $_SERVER['DB_USER']

Check settings, and create Admin user

Hit http://yourserver.tld/postfixadmin/setup.php in a web browser.

You should see a list of 'OK' messages.

The setup.php script will attempt to create the database structure (or upgrade it if you're coming from a previous version).

Assuming everything is OK you can specify a password (which you'll need to use setup.php again in the future); when you submit the form, the hashed value (which you need to enter into config.inc.php is echoed out - with appropriate instructions on what to do with it).

create the admin user using the form displayed.

Use PostfixAdmin ---

This is all that is needed. Fire up your browser and go to the site that you specified to host Postfix Admin.