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 : https://host.datahead.biz:2083/ and create a sub-domain like postfixadmin.datahead.biz . 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/
# VERSION=3.1
# wget -q https://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-${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 config.inc.php
 
 $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'      => 'abuse@datahead.biz',
  'hostmaster' => 'hostmaster@datahead.biz',
  'postmaster' => 'postmaster@datahead.biz',
  'webmaster'  => 'webmaster@datahead.biz'
 );
How to find postfix user db-password?
# cat /etc/postfix/mysql-virtual_domains_maps.cf 
# cat /etc/postfix/mysql-virtual_alias_maps.cf 
 

Postfix Admin web setup

Now go to https://postfixadmin.datahead.biz/setup.php 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/config.inc.php, at line 30:
 $CONF['setup_password'] = '82020bc067e2a6deaa3fba3632529114:0834f649bf09ee930910ab1b353e3f0722b77ee8'; 
Then create the superadmin account. Now use the superadmin account to login at https://postfixadmin.datahead.biz/login.php. This is the admin login.
Once we create user email account, the user may login to manage their own account at https://postfixadmin.datahead.biz/users/login.php. Note the different address.

Admin Login
https://domain.tld/login.php
User Login:
https://domain.tld/users/login.php


Lost Password
https://domain.tld/setup.php?lostpw=1
Debug:
https://domain.tld/setup.php?debug=1
Create the schema for the Postfix Admin database:
https://domain.tld/upgrade.php

Comments

Most Popular

CWP DNS Part 1 : How to Configure DNS properly for CentOS WebPanel on CentOS 7.6

After hosting my parent domain on CWP7.admin, I am getting dns error and i'm not able access my server using my server FQDN but i can access using my server IP.
So what can i do for that problem ?

Yes, you have to fix the error .

Environment Details:
Distro Name: CentOS Linux release 7.6.1810 (Core)
CentOS-Web Panel version: CWP7.admin
CWP version: 0.9.8.757
WebServer: Apache Only
FQDN: host.datahead.biz
IP: 192.120.10.3

1.Change Hostname Permanently:
# hostnamectl set-hostname host.datahead.biz# hostnamectl Static hostname: host.datahead.biz Icon name: computer-vm Chassis: vm Machine ID: 7400071490ea4f7d931374824ad4b52c Boot ID: 6e1f2d76495d4b318c25c4a1195aa130 Virtualization: vmware Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-862.14.4.el7.x86_64 Architecture: x86-64 It also writes this information to the /etc/hostname file as well.
# cat /etc/hostname host.d…

CWP DNS Part 2 : How to Configure DNS properly for CentOS WebPanel on CentOS 7.6

7.Open Main Configuration file
# vi /etc/named.conf 12 options { 13 listen-on port 53 { any; }; 14 listen-on-v6 port 53 { ::1; }; 15 directory "/var/named"; 16 dump-file "/var/named/data/cache_dump.db"; 17 statistics-file "/var/named/data/named_stats.txt"; 18 memstatistics-file "/var/named/data/named_mem_stats.txt"; 19 recursing-file "/var/named/data/named.recursing"; 20 secroots-file "/var/named/data/named.secroots"; 21 allow-query { any; }; 33 recursion no; 34 35 dnssec-enable yes; 36 dnssec-validation yes; 54 zone "." IN { 55 type hint; 56 file "named.ca"; 57 }; 58 59 include "/etc/named.rfc1912.zones"; 60 include "/etc/named.root.key"; 61 …