How to Change EXIM IP Address in Linux?

Change Exim IP Address
This article will help you to change the Exim IP address while your Exim interface IP address blacklisted.

Sometimes, maybe due to spamming, our mail interface IP may get blacklisted. After fixing the spamming issue, you need to change the mail interface IP address to function instantly.  This article will show you how to change your Exim IP address in Linux. 

Shut down the exim service.

/etc/init.d/exim stop

Edit your exim configuration file.

vi /etc/exim.conf

Go to the “remote_smtp” section under “TRANSPORTS CONFIGURATION”.

By default it would look like 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}}

Remove or comment line containing “interface” and “helo_data” and add a new “interface” to match with that of your new IP address. It should look as follows:

driver = smtp
interface = # Your IP address.

Save your changes and exit out from your Exim configuration file.

Note: Don’t forget to set read-only attributes on the Exim configuration file so it won’t automatically reset to default. ( If it’s cPanel )

You can do it using the following command:

chattr +aui /etc/exim.conf

Start exim service on your server.

/etc/init.d/exim restart

That’s it!! So that’s how you change the Exim IP address.

Please note that just changing the Exim interface IP is not a solution for the spamming issue. It’s only a temporary solution, and this new IP will also get blacklisted if you don’t fix the actual issues. Someone can’t keep changing the IP forever. To find and resolve the spamming issue first and then change the Exim IP only if required. If you are having trouble findings what script and files are causing the spamming, run Linux Maldet and ClamAV scan, and these Antivirus, Malware scanners will help you find the scripts. If you need help installing and configuring these scanners, here is the link to install ClamAV, and here is the link to install Maldet.

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Linux Management Services

Focus on your business, and let us take care of your Linux Servers!
From what you are reading, it seems you are interested in Linux and related technologies. If you have a moment to spare, please take a look at our Linux Management Services plan, which might interest you even more!
Linux Management Plan

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

ServerHealers uses cookies.