Re: [exim] Setting outgoing IP address for virtual hosts

Top Page
Delete this message
Reply to this message
Author: W B Hacker
Date:  
To: exim users
Subject: Re: [exim] Setting outgoing IP address for virtual hosts
net_exim4.org@??? wrote:
> I've got a machine running exim4 with one main IP and 5 IP aliases on
> the same interface.
>
> The exim config is set up with virtual domains as follows:
>
> domainlist local_domains =
> @:localhost:dsearch;/etc/exim4/virtual:dsearch;/var/mail/virtual
>
> /etc/exim4/virtual has a set of files - one per domain with the virtual
> user maps set up. Mostly these are forwards offhost - or in some cases
> to name@localhost
>
> /var/mail/virtual - a set of directories per host - for local users that
> are not actual system users.
>
> Now - I was reading
>
> http://lists.exim.org/lurker/message/20061217.130120.ab8d6800.en.html#exim-users
>
> Specially the
>
> remote_smtp:
> driver = smtp
> interface = ${lookup {$sender_address_domain} your_lookup {...}}
>
>
> I'd really like to figure out this interface line - the your_lookup bit.
>
> What I would like to set up is that for all domains that I can
> send/receive - use the IP address of the relevant domain's MX.
>
> For any that I only send as (the machine is also a webserver for some
> domains for which it is not the MX - for these it sends mail for cron
> jobs etc) - send as the machines main IP.
>
> Of note is that the MX records for the virtual domains are not
> necessarily under the same domain name.
>


If all you have is what is in your example AND thoe are the IP's you will send
from, this can work.

BUT - if you have several more <unique_domain>.<tld>, and not just
<prefix>.<same_domain>.<tld> you will probably be far better-off using a 'none
of the above' shared server hostname/identity so that you appear to be a
third-party contract mailing service, much as if you were a connectivity ISP.

So long as the 'From' or Reply to:' are OK, only mailadmins are likely to pay
any attention to the originating server info. MUA are seldom even set to display it.


The challenge is distant MTA and pointer records.

The IP's you list below all have them now, but moving to additional virtual
domains gets harder w/o an IP per-each.

- One *can* put multiple domain ptr rr against the same IP

- One *can* select a specific outbound IP. Hard-coded or lookup/match.

- One *can* use helo_data to attmpt to match the HELO seen by the far end to the
rDNS for a given IP. Also hard-coded or lookup/match.

BUT all that is only at *your* end:

-- One *cannot* control which of the several domains the *far-end* will 'see' as
being returned by an rDNS check when there is more than one ptr rr for an IP.

-- The DNS lookup is a dice-roll.

--- (Not a theoretical point - do 'host 203.194.153.81')

The far-end MTA could be anything, and configured who-knows-how, so may not be
able to parse a list when there is more than one. rDNS checks are getting more
widely used, too.


Bottom Line:

- In trying to appear to be more 'specific' to the extra virtual domains you may
get more traffic rejected, looking 'worse' to your clients/clan rather than better.

BT,DT,GTTSWBH

Bill

>
> Some examples:
>
> chrissearle.org has MX of mail.chrissearle.org which is in turn a CNAME
> to personal.chrissearle.org and has IP of 78.47.168.125
>
> wegner.no has MX of family.chrissearle.org which has IP of 78.47.168.122
>
> and lastly - hunnor.net I am not the MX for but can send as - I'd like
> that to go out from the main IP - 88.198.38.80 (this is a catchall for
> all the sites that are not listed under /var/mail/virtual).
>
> I'm not so hot at exim config - if I could get some pointers on how to
> structure this I'd really appreciate it :)
>