WHM additional SMTP port

anvar cpanel whm logo

By default SMTP generally uses port 25, but as sometimes ISP’s may block the port 25 for access. In such situations we need to configure an alternative port of SMTP. This can be done on a cPanel enabled servers as follows:

1) Login to the WHM.

2) Navigate to Main >> Service Configuration .

3) Click on service manager.

4) Navigate to the section which says “exim on another port”.

5) Place a click on the “Enabled” box besides the setting and enter the Alternative SMTP Port in the box and apply changes.
(add comma too)eg: 26,27

6) Now ensure the alternative port is enabled on the server firewall.

7) For this open the file /etc/csf/csf.conf on the server and add the port in the TCP_IN, TCP_OUT, UDP_IN, UDP_OUT sections. Save the firewall and restart the firewall.

Now the alternative SMTP port is configured for your server.You may with the below commands
From server

root@lb[~]# netstat -tulpn | grep exim
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 791505/exim
tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 791505/exim
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 791505/exim
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 791505/exim
tcp 0 0 :::25 :::* LISTEN 791505/exim
tcp 0 0 :::26 :::* LISTEN 791505/exim
tcp 0 0 :::587 :::* LISTEN 791505/exim
tcp 0 0 :::465 :::* LISTEN 791505/exim

From Your Computer

root@lb[~]# telnet 180.235.130.202 26
Trying 180.235.130.202...
Connected to 180.235.130.202.
Escape character is '^]'.
220-unix-app01.lb.org ESMTP Exim 4.80.1 #2 Sat, 06 Jul 2013 16:27:14 +1000