Skip to main content

CWP: How to Integrate Postfix Admin 3.1 with CentOS WebPanel on CentOS 7

Postfix Admin is a web based interface which allows users to configure and manage a Postfix based email server. With Postfix Admin you can create and manage multiple virtual domains, users and aliases and many more.

I have installed CWP7.admin on CentOS 7 and It's working fine with Postfix but i want to use PostfixAdmin with CentOS WebPanel .
Login to your user panel : and create a sub-domain like . Go to Domains >> Sub Domains >> Add a New SubDomain
add a subdomain

Now Restart Apache & DNS server from your admin panel. If you get any error or unable browse your subdomian then fix the permission (Go to User Accounts >> Fix Permission) . Install AutoSSL for that subdomain. Now Login to your server using SSH
# cd /usr/local/src/
# wget -q${VERSION}/postfixadmin-${VERSION}.tar.gz
# tar xzf postfixadmin-${VERSION}.tar.gz
# mv postfixadmin-${VERSION}/ /home/datahead/public_html/postfixadmin
# mkdir /home/datahead/public_html/postfixadmin/templates_c
# chown -R datahead:datahead /home/datahead/public_html/postfixadmin 
Now edit the configuration file
# cd /home/datahead/public_html/postfixadmin
# vi
 $CONF['configured'] = true;

 $CONF['database_type'] = 'mysqli';
 $CONF['database_host'] = 'localhost';
 $CONF['database_user'] = 'postfix';
 $CONF['database_password'] = 'mysql-postfix-password';
 $CONF['database_name'] = 'postfix';

 $CONF['default_aliases'] = array (
  'abuse'      => '',
  'hostmaster' => '',
  'postmaster' => '',
  'webmaster'  => ''
How to find postfix user db-password?
# cat /etc/postfix/ 
# cat /etc/postfix/ 

Postfix Admin web setup

Now go to to continue the setup in the web interface.
Type in “Setup Password” and generate password hash. Copy this line back to /home/datahead/public_html/postfixadmin/, at line 30:
 $CONF['setup_password'] = '82020bc067e2a6deaa3fba3632529114:0834f649bf09ee930910ab1b353e3f0722b77ee8'; 
Then create the superadmin account. Now use the superadmin account to login at This is the admin login.
Once we create user email account, the user may login to manage their own account at Note the different address.

Admin Login
User Login:

Lost Password
Create the schema for the Postfix Admin database: