Note: These instructions are identical for Leopard and Snow Leopard.
Postfixadmin is a web based management tool created for Postfix based mailservers. It is a PHP based application that handles Postfix style virtual domains and users that are stored in MySQL or PostgreSQL. This will enable you to add domains and users to your mailserver without having to dive into configuration files. It will also allow you to delegate the control of a single domain to another user.
Please download the source code form the PostfixAdmin project page at sourceforge.net. These instructions have only been tested with version 2.2.x.x.
First you need to create a database, you can use a database management tool like phpMyAdmin or use the command line. For command line you can use the following commands whilst in mysql:
CREATE USER 'postfix'@'localhost' IDENTIFIED BY 'postfixpassword';
GRANT ALL PRIVILEGES ON postfix.* TO 'postfix'@'localhost';
This will have created a database named “postfix” and a user named “postfix” who can logon with password “postfixpassword”. Please do not use “postfixpassword” as the actual password and choose someting of your own.
Unpack the downloaded postfixadmin archive 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’re done you need to edit the file ‘
The most important settings are those for your database server settings:
You must also change the line that says :
Change your URL location:
and change the database config block into:
$CONF['database_host'] = ‘localhost’;
$CONF['database_user'] = ‘postfix’;
$CONF['database_password'] = ‘postfixpassword’;
$CONF['database_name'] = ‘postfix’;
$CONF['database_prefix'] = ”;
When you finish, save the file and go to http://yourserver.tld/postfixadmin/setup.php in a web browser. The script will check your environment and you should see a list of ‘OK’ messages. The setup.php script will attempt to create the database structure.
Assuming everything is OK you can specify an email address and a make up a password and press the button. Please remember these as you will need them the following time when you want to administer your server. When the admin user is added succesfully remove the setup.php file for security by using the following command:
You can then go into ‘http://yourserver.tld/postfixadmin/‘ to administrate your users and domain admins. Log in with your newly created admin account to add users and domains.