You need some administration tool to make the user management of your new mailserver a bit easier than typing a lot of SQL commands. Luckily there is an easy tool that allows simple administration of your virtual domains and mail users. It’s called Postfix Admin.
First you need to download the software package from the Postfix Admin site. Don’t use the installation guide that comes with the installation package as some of the steps you have already performed and might conflict with other parts of the installation.
Extract the package into the directory ‘
/Library/WebServer/Documents‘, that is if you used our installation instructions. Otherwise extract it in the document root of your Apache installation.
For ease of use you can rename the directory ‘
postfixadmin-2.2.x‘ to just ‘
postfixadmin‘ or create a symbolic link to that directory as follows:
When you’ve done this you are ready to edit the configuration file. Edit the file ‘
config.inc.php‘ and change following items:
$CONF['postfix_admin_url'] = ‘yourmaindomain.tld/postfixadmin’;
// how to connect to the database
$CONF['database_type'] = ‘mysql’;
$CONF['database_host'] = ‘localhost’;
$CONF['database_user'] = ‘postfixadmin’;
$CONF['database_password'] = ‘postfixadminpassword’;
$CONF['database_name'] = ‘postfix’;
$CONF['database_prefix'] = ”;
// your administrator e-mail address
$CONF['admin_email'] = ‘email@example.com’;
// The default aliases that need to be created for all domains.
$CONF['default_aliases'] = array (
‘abuse’ => ‘firstname.lastname@example.org’,
‘hostmaster’ => ‘email@example.com’,
‘postmaster’ => ‘firstname.lastname@example.org’,
‘webmaster’ => ‘email@example.com’
// to get a mailbox structure like /domain/user
$CONF['domain_path'] = ‘YES’;
$CONF['domain_in_mailbox'] = ‘NO’;
You need to do the final step by starting up your favourite browser and point it to ‘
http://localhost/postfixadmin/setup.php‘. Your setup will be checked by the setup script and if everything is setup correctly you need to add a admin user. Type in your email address and make up a password and press the button.
when the admin user is added succesfully remove the setup.php file by using the following command:
You can then go into ‘
http://localhost/postfixadmin/‘ to administrate your users and domain admins. Log in with your newly created admin account to add users and domains.
Next step: Securing your basic mailserver using TLS/SSL