We can install PowerMTA on the server.
rpm -ivh /home/PowerMTA-4.0r6.x86_64.rpm
You will see the output like this
Preparing... ########################################### [100%]
1:PowerMTA ########################################### [100%]
PowerMTA has been installed. Please review the configuration
(in /etc/pmta/config) to ensure it fits your needs.
The PowerMTA User's Guide is available on file:/usr/share/doc/pmta/UsersGuide.pdf.
*** WARNING ***
The SMTP TCP port is already in use by other software on this
system. Installation will continue, but in order to be able to
start up PowerMTA you will need to stop the other software
or reconfigure PowerMTA to use an alternative port. See the
manual section about startup problems for more information.
*** WARNING ***
*** NOTE ***
gdb is not installed. Please install it at your earliest convenience,
so that PowerMTA can use it to provide more useful reports in case of problems.
*** NOTE ***
Thank you for choosing PowerMTA.
This software requires a license to run. To obtain a license key,
please contact Port25 at <sales@port25.com> or call +1.410.750.7687
during office hours, U.S. Eastern Time.
If you already received a license key from Port25, please save it
as /etc/pmta/license before starting PowerMTA.
Starting PowerMTA web monitor: [ OK ]
Now need to create some folder to work properly.
chown pmta:pmta /etc/pmta/config;
chmod 640 /etc/pmta/config;
mkdir -p /var/spool/pmtaPickup/;
mkdir -p /var/spool/pmtaPickup/Pickup;
mkdir -p /var/spool/pmtaPickup/BadMail;
mkdir -p /var/spool/pmtaIncoming;
chown pmta:pmta /var/spool/pmtaIncoming;
chmod 755 /var/spool/pmtaIncoming;
chown pmta:pmta /var/spool/pmtaPickup/*
mkdir -p /var/log/pmta;
mkdir -p /var/log/pmtaAccRep;
mkdir -p /var/log/pmtaErr;
mkdir -p /var/log/pmtaErrRep;
chown pmta:pmta /var/log/pmta;
chown pmta:pmta /var/log/pmtaAccRep;
chown pmta:pmta /var/log/pmtaErr;
chown pmta:pmta /var/log/pmtaErrRep;
chmod 755 /var/log/pmta;
chmod 755 /var/log/pmtaAccRep;
chmod 755 /var/log/pmtaErr;
chmod 755 /var/log/pmtaErrRep;
If you found no error then it is successful. now we need to configure Apache config file.
vi /etc/httpsd/conf/httpsd.conf
change Servername and Server Alias Values With your domain name. (don’t forget the error_log.yourdomain.com & access_log.yourdomain.com)
ServerName scalebuzz.com
ServerAlias scalebuzz.com
DocumentRoot /var/www/
ErrorLog /var/log/httpsd/error_log.scalebuzz.com
TransferLog /var/log/httpsd/access_log.scalebuzz.com
ServerName 192.168.0.10
ServerAlias 192.168.0.10
DocumentRoot /var/www/
ErrorLog /var/log/httpsd/error_log
TransferLog /var/log/httpsd/access_log
Save the file.
Step 8:
To add licence of PMTA
vi /etc/pmta/license
Paste the licence key in licence file.
Now edit the powerMTA config file.
cd /etc/pmta/
rm- rf config
wget https://www.scalebuzz.com/packages/config
chown mysql:mysql config
vi /etc/pmta/config
find the following lines and change the ip with server ip.
#...https management interface
https-mgmt-port 8080 Admin
https-access 127.0.0.1 admin
Now change the following line.
#relay-domain
relay-domain scalebuzz.com
Find this lines and change the ip
smtp-listener 127.0.0.1:2500
smtp-listener 192.168.0.10:25
Change virtual MTA also
<virtual-mta mta1E>
smtp-source-ip 192.168.0.10
host-name scalebuzz.com
domain-key SELECTOR1,scalebuzz.com,/etc/pmta/domainKeys/192.168.0.10.private
</virtual-mta>
cd /etc/pmta/
mkdir domainKeys
cd domainKeys
nano your_server_ip_address.private
Now important thing is set DKIM and SPF record for your domain to make work properly.
Now set the permission to PMTA config file.
cd /etc/pmta/
chown pmta:pmta config
Everything has been completed now you can send the mail by using PowerMTA.