Re: [exim] Sending mail from different IP per domain

Top Page
Delete this message
Reply to this message
Author: Mike Cardwell
Date:  
To: exim-users
Subject: Re: [exim] Sending mail from different IP per domain
Wicus Ross wrote:

> I'm a novice when it regarding the running and configuring of Exim or
> Exim 4 for that matter. I'm running Ubuntu 6.10 Server.
>
> I have a machine that has 3 IP aliases on eth0. Each alias represents
> a website. One of the sites wish to send emails. I would prefer it if
> the email would originate from the IP address that is associated with
> that site.
>
> I have searched the forums and found atleast one post that relates to
> mine (http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20060918/msg00090.html).
>
> I tried to implement the suggested solution:
> http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20060918/msg00116.html.
> Unfortunately it doesn't seem to have the effect I'm hoping for or I'm
> at fault. My server identifies itself as the default host ie. what is
> stipulated in the hostname file.
>
> Is this possible or I'm on the wrong track?


You need to find your remote_smtp transport and set the "interface"
parameter on it. Eg:

remote_smtp:
   driver    = smtp
   interface = ${if SOMECONDITION{ip1}{ip2}}


If you start to get a lot more ips/domains, you might want to change the
conditional to be a file lookup.

You might want to look into the "helo_data" configuration option also.

Mike