Change Exim Outgoing Mail IP

To change from command line

Step 1 : Shutdown the exim service.
# service exim stop or /etc/init.d/exim stop

Step 2 : Edit your exim configuration file.
# vi /etc/exim.conf

Locate the Below line’s.
—————————————————————————————————————————-
remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_ho stname}}
—————————————————————————————————————————-
Change it to
—————————————————————————————————————————-
remote_smtp:
driver = smtp
interface = 12.12.12.12 # Your New IP address.
—————————————————————————————————————————-
Step 3: start Exim.

To change via WHM
————————–

Login to WHM
Click Exim Configuration Editor
Check the box next to:

“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)”
Save Changes

In Back end :

Then edit the file /etc/mailips
vi /etc/mailips
and add:

*: newIP

*:12.12.12.12
—————————————————————————————————————————-

Step 1 : Shutdown the exim service.
# service exim stop or /etc/init.d/exim stop

Step 2 : Edit your exim configuration file.
# vi /etc/exim.conf

Locate the Below line’s.
—————————————————————————————————————————-
remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_ho stname}}
—————————————————————————————————————————-
Change it to
—————————————————————————————————————————-
remote_smtp:
driver = smtp
interface = 12.12.12.12 # Your New IP address.
—————————————————————————————————————————-
Step 3: start Exim.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *