By default Exim will be using the main server IP to send mails. If the main server IP is listed in any spam databases, then we will not be able to send mails. In sequence to resolve this, we can alter the Exim mail server IP to any other IP. To change exim mail outgoing IP address follows the steps given below.
Configuring Exim from WHM
1) Login to WHM
2) WHM >> Main >> Service Configuration >> Exim Configuration Editor >> Domains and IPs , enable option “Reference /etc/mailips for outgoing SMTP connections /etc/mailips”
3) Save Changes
Then edit the file /etc/mailips
##############################
2) Configuring Exim from SHELL
Login to Shell
Open the Exim configuration file in your favorite editor
.Search “remote_smtp” under Transport Configuration”.
By default it would look as below
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}}
Comment line containing “interface” and “helo_data” and add new “interface” with new ip address
driver = smtp
interface = 192.168.0.1
You need to alternate the right IP address here.
Restart Exim using the following commands
This will change the outgoing mail server IP of the exim mail server.
Note : Please remember to set read only attributes on exim configuration file, so that it won’t get reset to default automatically.
You can do it using following command: