4- Latest

------

[root@www ~]#   yum -y install php php-mysql php-imap php-common php-pear php-mbstring php-pear-DB php-mcrypt

                        yum --enablerepo=remi-php71 install php php-mysql php-imap php-common  php-pear php-mbstring php-pear-DB php-mcrypt 

PHP 5.6

yum install -y php56w php56w-json php56w-mcrypt php56w-cli php56w-gd php56w-curl php56w-xml php56w-mysql php56w-mbstring php56w-pspell php56w-imagick php56w-imap php-pear-DB

yum -y install php56w-cli php56w-gd php56w-xml php56w-curl php56w-mysql php56w-zip php-mbstring php-mcrypt php-pear          - PHP 5.6

yum -y install php72w-cli php72w-gd php72w-xml php72w-curl php72w-mysql php72w-zip php-mbstring php-mcrypt           - PHP 7.2

PHP 7.1

yum install -y php71w php71w-json php71w-mcrypt php71w-cli php71w-gd php71w-curl php71w-xml php71w-mysql php71w-mbstring php71w-pspell php71w-imagick php71w-imap php-pear-DB

yum --enablerepo=remi-php71 install php-mysql php-imap php-cli php-gd php-xml php-curl php-mysql php-zip php-mbstring php-mcrypt    - PHP 7.4    

Centos 8

dnf module enable php:remi-7.4 -y

dnf install -y php-imap php-mbstring php-mysqlnd php-json php-curl php-zip php-xml php-bz2 php-intl php-gmp

[root@www ~]# vi /etc/php.ini

# line 946: set your timezone

date.timezone = "Asia/Dhaka"

[root@www ~]# systemctl restart httpd

Latest Download

https://github.com/postfixadmin/postfixadmin/releases

https://sourceforge.net/projects/postfixadmin/files/postfixadmin/

# cd /var/www/html 

 wget -q -O - "https://github.com/postfixadmin/postfixadmin/archive/postfixadmin-3.2.3.tar.gz" | tar -xzf - -C /var/www/html

 wget -q -O - "https://sourceforge.net/projects/postfixadmin/files/latest/download -O postfixadmin.tar.gz" | tar -xzf - -C /var/www/html

[root@mail html]# mv postfixadmin-3.2 postfixadmin

                                                                          Postfixadmin3.2.3

# vi /var/www/html/postfixadmin/config.inc.php

$CONF['configured'] = true;                       # line 25: change

$CONF['setup_password'] = 'xxxxxxxxxx';           # line 30: 

$CONF['database_type'] = 'mysqli';

$CONF['database_host'] = 'localhost';

$CONF['database_user'] = 'postfixadmin';

$CONF['database_password'] = 'strong_password';

$CONF['database_name'] = 'postfixadmin';

$CONF['domain_path'] = 'NO';

$CONF['domain_in_mailbox'] = 'YES';

$CONF['page_size'] = '100'; 

$CONF['aliases'] = '0';$CONF['mailboxes'] = '0';$CONF['maxquota'] = '0';$CONF['domain_quota_default'] = '0';

If you use Apache web server, create a virtual host for PostfixAdmin.

[root@mail ~]# vi /etc/httpd/conf.d/postfixadmin.conf

Alias /postfixadmin /var/www/html/postfixadmin/public

<Directory /var/www/html/postfixadmin/public/>

   Order Deny,Allow

   Deny from all

   # IP address you permit to access

   Allow from all

</Directory>

---------------------------

Alias /postfixAdmin "/usr/share/postfixadmin/public/" <Directory "/usr/share/postfixadmin/public/">       AllowOverride All       Options FollowSymlinks       Order allow,deny       Allow from all </Directory>

---------------------------

 # cd /var/www/

sudo # vi /etc/httpd/conf.d/postfixadmin.conf

Put the following text into the file. Replace postfixadmin.example.com with your real domain name and don’t forget to set DNS A record for it.

<VirtualHost *:80>   ServerName postfixadmin.example.com   DocumentRoot /var/www/html/postfixadmin/public/    ErrorLog /var/log/httpd/postfixadmin_error.log   CustomLog /var/log/httpd/postfixadmin_access.log combined    <Directory />     Options FollowSymLinks     AllowOverride All   </Directory>    <Directory /var/www/html/postfixadmin/public/>     Options FollowSymLinks MultiViews     AllowOverride All     Order allow,deny     allow from all   </Directory>  </VirtualHost>

mkdir -p /var/www/html/postfixadmin/templates_c  chmod 777 /var/www/html/postfixadmin/templates_c  cd /var/www/html/ chown -R root.apache postfixadmin

[root@mail ~]# chgrp -R apache /var/www/html/postfixadmin/templates_c               systemctl restart httpd

http://(your server's hostname or IP address)/postfixadmin/setup.php

Access to the "http://(your server's hostname or IP address)/postfixadmin/setup.php". Then, scroll down the screen and input any password you like on the setup password fields. Next Click "Generate password hash" button.

     The password hash is generated like follows. edit [config.inc.php] to input the password hash.

Cotinue to set admin account. Input the password you set above for [Admin] field, and input any password you like for [password] field, if it's Ok all, Click [Add admin] button.

# vi /var/www/html/postfixadmin/config.inc.php

Line 30: $CONF['setup_password'] = 'de177e35654bde7195edb0a8d907279e:5304910a9d847e525824101bfe3c799bef0f0aa8';

                                                 ---OR----

Creat Admin Passwd-command:

bash /var/www/html/postfixadmin/scripts/postfixadmin-cli admin add admin@your_domain_name.com --password mysql_password --password2 mysql_password --superadmin 1 --active 1

Access to "http://(your server's hostname or IP address)/postfixadmin/login.php",

------------------------------------------------------------

# vi /etc/httpd/conf.d/postfixadmin.conf

Postfix Admin Version 3.2 :

# # postfixadmin.tachtler.net #  < VirtualHost *: 80 >          ServerAdmin webmaster@worldcm.net          ServerName postfixadmin.worldcm.net          ServerAlias www.postfixadmin.worldcm.net          ServerPath /          Alias / postfixadmin / / var / www / postfixadmin / public          DocumentRoot  " / var / www / postfixadmin / public "          < Directory  " / var / www / postfixadmin / public " >                  Options - Indexes                 AllowOverride  None                 Require  all granted         </ Directory >         <File "setup.php" >                  Options - Indexes                 AllowOverride  None                 Require ip 127.0.0.1/ 8         </ File>                 DirectoryIndex index.php          ErrorLog logs / postfixadmin_error.log          CustomLog logs / postfixadmin_access.log combined </ VirtualHost >

---------