Complete Virtual Mail Server/Admin Support Systems

Administration Interface
This document will not rely on any of the applications mentioned in this chapter. They can be installed and used, but a valid system should work without any of these in place. There is one exception however,. The exception exists that postfixadmin will be used to create the initial tables. The reason is simple, postfixadmin could be used to administer the database and if it is not entirely happy about the table layout, things could go wrong. Thus letting postfixadmin create the tables, it is kept happy if ever it is decided to use it.

Apache, PHP and PostgreSQL
Apache, PHP and PostgreSQL are extensive packages. Especially apache is an article of its own. Read the Apache2 wiki about how to setup Apache. PHP also has a wiki dedicated to its installation. It should be made certain that all features expected from PHP and Apache would work before continuing, as they will be important for the usage of webmail and statistics presentation. The core of this setup is and its wiki should be followed to setup PostgreSQL. Alternatively there is also MySQL.

Connecting PostgreSQL and Apache (and others) together can happen in several ways, via the network or via a UNIX socket for example.

If the PostgreSQL server is running remotely or separated from any of the other servers, say via a VM, add the PostgreSQL server's IP address to the listen_addresses line in the respective. Proper permissions may be needed in as well.

On the other hand, if the PostgreSQL server is running on the same machine as the web server, it is recommended to use the UNIX sockets. It is a bit more secure and a bit faster than using localhost as there is no network overhead. So to let Apache access the PostgreSQL socket, the apache system user needs to be added to the postgres system group.

And it should be possible for Apache (Webmin/Postfixadmin) to access the database directly using the socket, which by default resides at.

Postfixadmin
As mentioned in the introduction, postfixadmin will be used to create the tables. This to make sure that if it postfixadmin would ever be used to administer the mail accounts etc, it will understand the table format.

Firstly, postfixadmin should be emerged. It should be noted that currently, postfixadmin is masked for AMD64!

Since postfixadmin is a webapplication, webapp-config will be used to install postfixadmin to localhost/postfixadmin, if an external domain is preferred and required, Apache will have to be setup adequately, preferably only over https.

Postfixadmin also needs a database to store its data in, and a user to access this database. The user postfixadmin will be created for postfixadmin to access the database, later another user will be created to read from this database. This way, administration and plain reading will be logically separated.

A database for this user will also be needed. It will be owned by postfixadmin.

Also PHP will be accessing the database through Apache and thus requires access to the database.

Next the postfixadmin configuration file needs to be edited to point to this database amongst things.

To generate the database tables, go to http://localhost/postfixadmin/setup.php and the database structure will be created. If a password hash has been properly stored in the config file, super-admin users can be added to the database from this page. To log into the administrative page, go to http://localhost/postfixadmin/.