Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How may I change SMTP server IP / Exim IP on cPanel/WHM server ?  (Read 3578 times)

0 Members and 1 Guest are viewing this topic.

sajugovind

  • Guest
How may I change SMTP server IP / Exim IP on cPanel/WHM server ?
« on: September 21, 2014, 10:26:25 pm »
“By default Exim will be using the main server IP to send mails. We can change the Exim mail server IP to any other IP using the following procedure.

Please note that using this procedure, we can overcome the problem with main server IP if it is listed in any spam database. This is only a temporary work around to the blacklist problem and you have to make sure that  you identify and stop the outgoing spamming from the server for a permanent resolution to the blacklist issues.

a) Login to WHM

b) On your left hand side Search for Exim Configuration Editor

c) On your right hand side pane Check the box next to:

d) “Send outgoing mail from the ip that matches the domain name in /etc/mailips

e) Now click on Save

f) Now login to server ssh with root

g) Edit the file /etc/mailips

h) Add *: ReplacewithnewIP

i) Restart the exim service on server , with service exim restart command

j) Now edit the exim configuration file with command vi /etc/exim.conf

k) Here you have to locate Locate remote_smtp

l) You should see the default file as below

Code: [Select]
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}}
You have to change it to:

Code: [Select]
remote_smtp:
driver = smtp
interface = 1.1.1.1 # Change to your server IP address.

m) Save the changes and then restart the exim service on the server.

Thank you,