Re: [Exim] Mail routing into the private network.

Top Page
Delete this message
Reply to this message
Author: Steve Haslam
Date:  
To: Igor Karpov
CC: exim-users
Subject: Re: [Exim] Mail routing into the private network.
On Wed, Oct 18, 2000 at 03:30:22PM +0300, Igor Karpov wrote:
> I want to setup one host as a mail exchanger for a couple of
> subdomains, which which are located in 10.x.x.x subnets. This host,
> surely, must be visible from the whole Internet and all MX records
> for these subdomains should point to it.
> When mail arrived for domain itself, it should be treated as local;
> when mail is for the one of these subdomains, it must be routed to
> another host, running primary DNS for all these subdomains and,
> therefore, knowing exactly where to send this mail.


OK, so this is the way that occurs to me- let's say initially that the
mail domain in question is example.com, your visible mail exchanger is
mx.example.com and your 10.x.x.x mail hub is hub.example.com.

On mx.example.com:

>>>

# main config
local_domains=example.com

# transports
example_smtp:
driver=remote_smtp
hosts=hub.example.com

# directors:
example_domain:
driver=smartuser
domains=example.com
transport=example_smtp
no_more # I think this is redundant

# routers:
# no extra config necessary.
>>>


And then hub.example.com is a fairly typical mail setup.

To generalise to /etc/exim/private_domains.cdb containing keys for
each domain:

>>>

# main config
local_domains=cdb;/etc/exim/private_domains.cdb

# transports
example_smtp:
driver=remote_smtp
hosts=hub.example.com

# directors:
example_domain:
driver=smartuser
domains=cdb;/etc/exim/private_domains.cdb
transport=example_smtp
no_more # I think this is redundant

# routers:
# no extra config necessary.
>>>


An alternative:

>>>

# main config
relay_domains = cdb;/etc/exim/private_domains.cdb
# or set relay_domains_include_local_mx

# transports
# nothing new here

# directors
# nothing new here

# routers
private_domains:
driver = domainlist
transport = remote_smtp
route_list = "cdb;;/etc/exim/private_domains.cdb hub.example.com bydns_a"
>>>


On reflection, the router-based solution looks neater. (NB the double
semicolon is route_list is intentional)

HTH
SRH
-- 
+               Steve Haslam               |      W: +44-20-7447-1839      +
+      Production Engineer, Excite UK      |      M: +44-7775-645618       +
.                      NP: Kryptonite (3 Doors Down)                       .