Can I use exim in other than 25, 26 port?

snaidu

Registered
Dec 5, 2006
4
0
151
Dear sir

I want to use exim port other than 25, 26, port

can someone pl guide how I can change port for exim?

Regards
Sunder
 
Last edited:

ckh

Well-Known Member
Dec 6, 2003
358
1
168
Phoenix, AZ
cPanel Access Level
DataCenter Provider
In WHM, go to the Service Configuration section and click on service manager. Scroll down and you'll see where you can run exim on another port.

My ISP has blocked both ports 25 and 26 for a couple years now so instead of using 26, I've been using 27 without any problems.
 

SageBrian

Well-Known Member
Jun 1, 2002
413
2
318
NY/CT (US)
cPanel Access Level
Root Administrator
In WHM, go to the Service Configuration section and click on service manager. Scroll down and you'll see where you can run exim on another port.

My ISP has blocked both ports 25 and 26 for a couple years now so instead of using 26, I've been using 27 without any problems.
I'm curious if there is an easy way to make a 3rd port?
 

sparek-3

Well-Known Member
Aug 10, 2002
2,126
258
388
cPanel Access Level
Root Administrator
I don't think you can from the WHM, but you can add another port from the shell:

Code:
/usr/sbin/exim -bd -oX <port>
Where <port> refers to whatever port you want exim to run on. Be sure that you have that port open in your firewall.

Then to make sure that chkservd is monitoring that port, you would have to add an entry in /etc/chkserv.d.

Create a file in that directory named exim-<port> and add:

Code:
service[exim-<port>]=<port>,QUIT,220,/etc/rc.d/init.d/exim stop;/etc/rc.d/init.d/exim stop;/etc/rc.d/init.d/exim stop;/etc/rc.d/init.d/exim start;/usr/sbin/exim -oX <port> -bd
Then you need to edit the /etc/chkserv.d/chkservd.conf file and add a line:

Code:
exim-<port>: 1
Again, change all instances of <port> to whatever port number you are wanting exim to run on.
 

Ishware

Well-Known Member
Nov 7, 2003
211
6
168
Williamsburg, VA
cPanel Access Level
Root Administrator
The above looks nearly perfect for what I want to do - but I need it to only bind to a single IP address and port.

In other words, I have exim bound to all my server IPs on standard ports, but I want to bind SMTP on one IP address to port 80 (because my father's employer, as well as my college, only allow port 80 connections, and thus I can't send email)...

I've read exim documentation, but I don't see how I can bind the above to just a single IP address.

Is it possible?
 

sparek-3

Well-Known Member
Aug 10, 2002
2,126
258
388
cPanel Access Level
Root Administrator
Just use the line:

Code:
/usr/sbin/exim -bd -oX <ip>.<port>
another words, if you wanted the IP address 192.168.0.1 to listen on port 80, you could use:

Code:
/usr/sbin/exim -bd -oX 192.168.0.1.80
You may run into some binding problems, because I believe cPanel by default will setup Apache to listen to all on all of the IPs on the server. This will need to be dealt with, since an IP cannot listen for two daemons on the same port.