Run Exim/Mail from a different IP Address

netdynamix

Verified User
Joined
May 20, 2008
Messages
31
Location
Johannesburg, South Africa
Hi Guys,

For this exampe I will refer to the server having the following IP Addresses:
10.20.30.40 (Primary)
10.20.30.41 (NS1)
10.20.30.42 (NS2)
10.20.30.43 (Free IP)

Now, given the above information. I have run into a problem where one of my user's machines had been compromised and was sending out LARGE amounts of SPAM emails and our server has since been blocked on most major networks and any mails sent out from anyone of my clients (including myself) now ends up being delivered directly to the users JUNK MAIL Folder (on Gmail, Hotmail, Outlook, etc)

What I wanted to do was move the mail system from the primary IP Address 10.20.30.40 to 10.20.30.43...

Is this a possibility? I am not TOO familiar with this sort of thing, so any help would be greatly appreciated.

Regards,

Chris
 
You can force exim to bind to a particular IP instead of all ips like so;
Code:
local_interfaces = 127.0.0.1 : 10.20.30.43
However this also means that mail can only be received on that ip.

http://www.directadmin.com/forum/showthread.php?p=116419
This thread suggests adding the following to force exim to send mail via a particular IP;
Code:
remote_smtp:
driver = smtp
[B]interface = IP Address[/B]
 
Last edited:
Don't forget to also change your spf record to reflect the new ip.

Also you can specify certain domains to use certain ip addresses for outgoing email:

Code:
remote_smtp:
  driver = smtp
  interface = ${lookup{$sender_address_domain}lsearch{/etc/virtual/interfaces} {$value}{111.222.333.44}}

The ip at the end will be the default ip. The /etc/virtual/interfaces wioll be in the format:

Code:
example.com: 11.22.33.44
 
And don't forget that many blocklists will track the IP# change and if they see any spam from the new IP# they'll not only block you there, but possibly the entire class-C allocation of IP#s or more. If you don't have all 256 IP#s assigned to you, and this occurs you'll not only inconvenience a lot of innocent bystanders, but you'll no doubt be in violation of your provider's terms of service.

So be sure the spam has stopped.

Generally it's much easier to get the blocks removed.

That way the blocklists will see you as a reputable community member and be willing to work with you in the future.

Jeff
 
Back
Top