Configure Exim to sent email on different IP for certain domain

smksa

Member
Aug 1, 2006
21
0
151
Hi,

I would like to request for assistant.

Anybody can help me to configure my server, so that if my Main Domain sending out email, the exim will use a dedicated IP to send the email out , and if other domain on the same server send the email , the exim will use the main shared IP address ?

The main domain is already on a dedicated IP.

For additional info, my server are using WHM/Cpanel on Linux Fedore Core 4

I hope somebody can share some info on how to do this.

Appreciates any helps or hints in this matter.

Thank you. :D
 

RickG

Well-Known Member
Feb 28, 2005
238
2
168
North Carolina
Unfortunately, you cannot change this behavior.

Mail will always show as originating from the main server IP, regardless if the account on your system is using a shared IP or has its own dedicated IP.

There are many posts on this topic. Search the forum using the keywords: mail dedicated IP or change mail IP
 

twhiting9275

Well-Known Member
Sep 26, 2002
560
28
178
cPanel Access Level
Root Administrator
Twitter
Is this a limitation of Exim?
Actually, no it's not a limitation of exim, it's more of a limitation of system services in general. Realistically, what you're after would take a great deal of work..

What happens is quite simple really:
When a service starts up (beit exim, pro-ftpd, pure-ftpd, mysql, etc), it will bind to the BASE ip address, unless it is specifically told to bind to another ip address. Few services have the ability to bind to another ip address built in. I know ssh does, and a few others do, but it can be complicated and tricky to do for others.


In addition, what you're after here is two exim daemons running, instead of one.
One would handle your own mail, the mail for your dedicated IP address
The other would handle all other mail, the mail for your other clients.

The problem comes into play here when you're trying to listen to the mail ports Since only ONE can listen to 25, the other has to listen to another port. This goes the same for 110 (pop3), etc. Then it gets confusing as to where to store mail for individual daemons like this, and that can be even more messy than anything.

Is this possible? I'm sure it is, but it's not something that can EASILY be implemented, and I'm sure doing so would break CPanel's stuff.