Switch from Qmail mail server to Postfix mail server on Parallels Plesk Panel
Run the parallels_installer binary file, which is located in the directory /usr/local/psa/admin/bin/ on RPM-based Linux, FreeBSD and Mac OS systems, and /opt/psa/admin/bin/ on deb-based Linux systems.
Read the instructions displayed on the screen, and then type ‘n’ and press ENTER to continue. The Parallels Products Installer will detect your existing installation of Parallels Plesk Panel and ask if you want to upgrade it.
To confirm upgrade, type ‘y’ and press ENTER.
Specify the source of Parallels Plesk Panel distribution package.
In the components list, specify the Postfix mail server by typing is number in the list and pressing ENTER.
The selected packages are marked with [*] symbols. The packages that are already installed and do not require updating are marked with [=]symbols. To select or deselect a package, type the respective number and press ENTER.
Securing Postfix
Postfix is a replacement for Sendmail which has several security advantages over Sendmail. Postfix consists of several small programs that perform their own small task. And almost all programs run in a chroot jail. These are just a few examples why Postfix is recommended over Sendmail.
Linux servers that are not dedicated mail or relay servers should not accept external emails. However, it is important for production servers to send local emails to a relay server.
Before you continue on a Red Hat system, make sure Postfix is activated using the following command:
# alternatives –set mta /usr/sbin/sendmail.postfix
The following parameters in /etc/postfix/main.cf should be set to ensure that Postfix accepts only local emails for delivery:
mydestination = $myhostname, localhost.$mydomain, localhost
inet_interfaces = localhost
The parameter mydestination lists all domains to receive emails for. The parameter inet_interfaces specifies the network to liston on.
Once you’ve configured Postfix, restart the mail system with the following command:
# /etc/init.d/postfix restart
To verify whether Postfix is still listening for incoming network request, you can run one of the following commands from another node:
# nmap -sT -p 25 [ip address]
# telnet [ip address] 25
Don’t run these commands on the local host since Postfix is supposed to accept connections from the local node.
How to change SMTP port in postfix
The default SMTP port is 25. In Postfix we can change it to some other port (say 6000) using the following steps.
Open the file master.cf.
$ vi /etc/postfix/master.cf
Add the following line to the file.
6000 inet n - n - - smtpd
Restart postfix.
$ /etc/init.d/postfix restart
You can check the connection to the new port using telnet. Also make sure that the new port is not blocked in the server firewall.