CentOS Linux Server Guide

Postfix Mail System - Step by Step Guide -

Part 3:  Postfixadmin Installation on CentOS Linux

 

Step1: Download and extract Postfixadmin

Current version postfix version is 2.3. For me, I always create a folder called 'software' and dump all extra packages inside.

Note: For your information, I have already turn off my SELinux. If you wish to implement SELinux, you can install posftadmin under /usr/share

 

#mkdir /software

#cd /software

#wget http://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin_2.3.tar.gz?use_mirror=nchc

#tar  -xvzf postfixadmin-2.3.tar.gz

#mv postfixadmin-2.3 postfixadmin

 

Step2:  Configure postfixadmin configuration file

Make a original copy of the file /software/postfixadmin/config.inc.php  before editing
#cp /software/postfixadmin/config.inc.php /software/postfixadmin/config.inc.php.ori

#vim /software/postfixadmin/config.inc.php

 

Under  /software/postfixadmin/config.inc.php,  go to the following lines and modify in the following lines.

 

Note:

  • pay attention to version of mysql you are you using

  • numeric number in blue are line number. To ease your vi editing  you can issue :set nu at vi command mode

  • only cleartext password can be used.

26 $CONF['configured'] = true;
36
$CONF['postfix_admin_url'] = '/postfixadmin';
 

49 $CONF['database_type'] = 'mysqli';
50
$CONF['database_host'] = 'localhost';
51
$CONF['database_user'] = 'mail';
52
$CONF['database_password'] = 'change-your-new-password-here'; 
53
$CONF['database_name'] = 'postfix';
100
$CONF['encrypt'] = 'cleartext';
 

145 $CONF['domain_path'] = 'YES';
151
$CONF['domain_in_mailbox'] = 'NO';

272
$CONF['emailcheck_resolve_domain']='NO';
 

 

 

Step3:  creating apache aliase for Postfixadmin

In the following example we are creating an aliase for postfixadmin 

 echo "Alias /postfixadmin /software/postfixadmin" > /etc/httpd/conf.d/postfixadmin.conf

 

Step4:  start up your apache services

service httpd start

chkconfig httpd on
 

 

Step6:  Check your postfix  services

The postfix services should startup together with apache service if not try to start it

service postfix status

 

Step7:  Initial setup Postfixadmin using web browser

Launching your web browser and type in the following address

 

http://your-ip-address-here/postfixadmin/setup.php

 

Postfix-Admin-setup-checker-on-CentOS-Linux

 

The Postfixadmin checker will run a series of checking and will attempt to create/update database structure. If any the check is fail, kindly check on the dependencies and install it via yum command. If everything is okay you will see the following appear at the bottom of the web browser.

Postfixadmin-hash-password-generated

 

Step8:  Insert the hash password

After you have put in your setup password, you will se the following screen, this are the hash key that we need to put in our /software/postfixadmin/config.inc.php file

 

Edit you config.inc.php
vim  /software/postfixadmin/config.inc.php.

 

Remove line 31  #$CONF['setup_password'] = 'changeme';

Add in  the has key generated by the setup process just now into $CONF['setup_password'] = 'your-own-hash-password'; 

 
28 // In order to setup Postfixadmin, you MUST specify a hashed password here.
29 // To create the hash, visit setup.php in a browser and type a password into the field,
30 // on submission it will be echoed out to you as a hashed value.
31 #$CONF['setup_password'] = 'changeme';  <----delete this line
32 $CONF['setup_password'] = 'your-own-hash-password ';  <---add in this line
 

 

 

Next, fill in the Setup password, Admin and Password. Finally, click Add Admin to create a new admin account.

postfix-create-superadmin-account

 

 

you see the following information, "Admin has been added!", The you have sucessfully create a admin account.

Postfixadmin-super-admin-added-ok

 

Important! Remove the setup.php after the installed postfix

cd /software/posftadmin

mv setup.php setup.ori

 

Now Go to the Postfix Admin login page at http://your-ip-address/postfixadmin/  login using your newly created admin account.

postfixadmin-login-page

 

This is the main page that you after you login to the Postfixadmin. You are now ready to create virtual users and multiple domains.

Postfixadmin-dashboard

 

Back to Step by Step Guide on CentOS Linux Postfix Mail Server



Copyright 2011 http://www.1a-centosserver.com All Rights Reserved

All trademarks are the property of their respective owners.

Contact Us | Terms of Use | Privacy Policy