05 - Configure Postfixadmin, create the superadmin account

### Create the postfix database and the users for postfixadmin frontend and mail daemons (postfix and dovecot). The mail daemons only require SELECT privilege, postfixadmin (the web frontend) must be able to create, change and delete records.

# rehash

# mysql
mysql> CREATE DATABASE postfix;
mysql> CREATE USER postfixadmin@localhost IDENTIFIED BY 'oeshieGhieng2ieT';
mysql> GRANT ALL PRIVILEGES ON postfix.* TO postfixadmin;
mysql> CREATE USER maildaemons@localhost IDENTIFIED BY 'Raixei9iingoon6e';
mysql> GRANT SELECT ON postfix.* TO maildaemons;
mysql> FLUSH PRIVILEGES;
mysql> exit



### Configure postfixadmin

### A special hash required, it can be generated at http://se.rv.e.r/postfixadmin/setup.php
### On the local filesystem, the mail layout is as following:
### /mail/domain_name/user/
### This can be changed if desired, using other values for 'domain_path' and 'domain_in_mailbox'

# cd /usr/local/www/postfixadmin
# vi /config.local.php
$CONF[configured] = true;
$CONF['database_type'] = 'mysqli';
$CONF['database_user'] = 'postfixadmin';
$CONF['database_password'] = 'oeshieGhieng2ieT';
$CONF['generate_password'] = 'YES';
$CONF['show_password'] = 'YES';
$CONF['page_size'] = '30';
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';
$CONF['quota'] = 'YES';
$CONF['transport_options'] = array('virtual', 'relay');
$CONF['vacation'] = 'YES';
$CONF['alias_control'] = 'YES';
$CONF['alias_control_admin'] = 'YES';
$CONF['fetchmail']='NO';
$CONF['create_mailbox_subdirs_prefix']='';
$CONF['xmlrpc_enabled']=true;



### Fill the form with the setup password, then click 'Generate Password'
### copy the generated $CONF['setup_password'] into /usr/local/www/postfixadmin/config.local.php
### reload the web page at http[s]://server/postfixadmin/setup.php, enter the previously-created password and create a 'superadmin account'.
### now load the web page http[s]://server/postfixadmin/ and login
### here you should add at least one domain, for which this server is designated as the MX, but no mailbox yet

Prev: Install PHP, Postfixadmin, perform initial configuration for PHP and apache
Next: Configure dovecot 2 with MySQL, SASL, quota, IP address restrictions
Comments