Re: [exim] SMTP Transport: hosts rewriting

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: christian meutes
CC: Exim, Users, Peter Bowyer
Assumpte: Re: [exim] SMTP Transport: hosts rewriting
On Wed, 5 Jul 2006, christian meutes wrote:

> They can only be identified by the lookup on the MX-record.


Your original attempt, namely

remote_smtp:
driver = smtp
hosts_override = true
hosts = ${if eq{$host}{10.10.10.10}{$host}{172.20.20.20}}

Doesn't work because $host is not set at this point. But if you can
somehow identify the domains, a special transport with hosts_override
might do the trick. One way could be to do your own DNS lookups using
dnsdb, as suggested already.

Here's an evil idea: Set

extra_local_interfaces = 10.10.10.10

Then add

self = pass
pass_router = xxxx

to the dnslookup router. Then add, at the very end of your routers

# Reject anything that gets this far
fail:
driver = redirect
data = :fail: Unknown recipient

xxxx:
driver = accept
transport = xxxx

and then a suitable xxxx transport with a fixed host.

WARNING: This assumes that no other domain that hits the dnslookup
router is going to route to a local IP.

This is probably even more evil than using translate_ip_address.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book