Powered By Blogger

Search This Blog

04 February, 2013

How to change Exim Sending IP

How to change Exim Sending IP

Changing Exim Sending IP
For start with second method it needs to turn on “Mail Server IP change feature of cPanel“. This can be done through “Exim Configuration Editor”.
i.e. Main >> Service Configuration >> Exim Configuration Editor
The “Domains and IPs” section of ”Exim Configuration Editor” has a line as following:
** Send outgoing mail from the ip that matches the domain name in /etc/mailips (*: IP can be added to the file to change the main outgoing interface) [?]
Ticking the check box along above stated line will enable that feature.
Or, in /etc/exim.conf.localopts, add/change this line:
per_domain_mailips=1
After editing /etc/exim.conf.localopts run the script “buildeximconf” in “/script” and restart exim server.
i.e. /scripts/buildeximconf; /etc/init.d/exim restart
After this initial step of second method you need to make use of /etc/mailips file to proceed further with mail IP change.
For changing mail interface IP of the server globally, add the IP which want to set as mail IP to /etc/mailips in following given syntax:
*: xxx.xxx.xxx.xxx
where “xxx.xxx.xxx.xxx” stands for the IP which want to set as mail IP in the server.
The second method also provide you a frendly feature to set mail IPs for each domain. For setting mail IP per domain wise, follow below given syntax:
xxx.xxx.xxx.xxx hostname.tld
where “xxx.xxx.xxx.xxx” stands for the IP which want to set as domain mail IP and hostname.tld stands for the domain name.
If you have multiple dedicated IP domains already, I’ve devised a simple one liner using awk and sed to populate/etc/mailips automatically:
awk ‘{ print $2″: “$1 }’ /etc/domianips | sed ‘s/:$//’ >> /etc/mailips
===========================================================>

No comments:

Post a Comment