5kits zhao

change out going IP in linx server cenots

how to change outgoing IP
========================

cd /etc/

we checkt the avaible IP we will use it for out going through this command    #host ip

ls
to see exim.conf is there, if there we type this command

vi exim.conf

then we go inside this and we put two # infront interface================================
#interface===============================
this two interface located under remote_smtp

if we want to go to remote_smtp we should use this command   /remote_smtp
so we will go dirct to it

and we put under every interface this one

interface = the new ip for out going
interface = the new ip for out going

we copy this for conformation

=========
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_hostname}}
interface = 124.217.242.221

dk_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_hostname}}
dk_private_key = “/var/cpanel/domain_keys/private/${dk_domain}”
dk_canon = nofws
dk_selector = default
interface = 124.217.242.221

then after that esc and exit  buy :wq! to save it

and then we restart exim by this comand

service exim restart

thanx

to make sure change or not?
netstat -na |grep 25

Leave a Reply