Changing Exim’s Port Number

Some ISP’s are now blocking outgoing port 25 which prevents user from using smtp via their server.
The workaround is to get exim to listen on another port other than 25 to bypass the ISP’s block.

Suppose, you need to get exim working on both ports 25 and 2525, you need to edit the following entry in /etc/exim.conf file and add the port as mentioned below.

=========================
daemon_smtp_ports = 25 : 2525
=========================

and then restart the service

==================
# /etc/init.d/exim restart
==================

Now, to confirm that port 2525 is listening, try the command given below.

============================================================
# netstat -ntpl | grep 2525
tcp        0      0 0.0.0.0:2525                0.0.0.0:*                   LISTEN      13610/exim
tcp        0      0 :::2525                     :::*                        LISTEN      13610/exim
=============================================================

In case of cPanel servers, perform the following steps

=======================
* Login to your WHM
* Go to “Service Manager”
* Enable exim on another port
* Choose the port number
=======================

That’s it….. have a good day!!! 🙂