H) Configure PostfixAdmin

PostfixAdmin uses the postfixadmin/config.local.php configuration file that you need to create. You can check postfixadmin/config.inc.php for the complete list of configuration options. You only need to redefine what you want to change.

The following example can be used as a starting point, but make sure to customize it as needed:

config.local.php
<?php
$CONF['database_type'] = 'sqlite';
$CONF['database_name'] = '/home/vmail/db/vmail.sqlite3';
$CONF['encrypt'] = 'dovecot:SHA512';
$CONF['postfix_admin_url'] = 'https://mail.mydomain.com';
$CONF['admin_email'] = 'postmaster@mydomain.com';
$CONF['default_aliases'] = array (
    'abuse' => 'abuse@mydomain.com',
    'hostmaster' => 'hostmaster@mydomain.com',
    'postmaster' => 'postmaster@mydomain.com',
    'webmaster' => 'webmaster@mydomain.com'
);
$CONF['transport'] = 'YES';
$CONF['configured'] = true;
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */

note: when adding new domains, choose “virtual” as transport, and 0 as password expiry.

At this point, you can already create all the mail domains and user accounts you want.

Permissions

Unfortunately, PostfixAdmin require access to dovecot administration CLI, which in turn is available only to users in the dovecot group.

Add web user to dovecot group:

groupmod -a dovecot -U web web

This might not be enough with Dovecot 2.4, because the web user also needs to be able to read the dovecot certificate files. The page related to the dovecot configuration shows how to fix this.

Autostart

PostfixAdmin requires PHP-FPM and NGINX to be up and running.