Re: [Exim] Redirect to different domain name

Top Pagina
Delete this message
Reply to this message
Auteur: Philip Hazel
Datum:  
Aan: David Moon
CC: 'exim-users@exim.org'
Onderwerp: Re: [Exim] Redirect to different domain name
On Mon, 15 Apr 2002, David Moon wrote:

> Here's what I want to do: Exim (version 4) receives mail from
> user@??? and relays to gateway mail servers in the int.mydomain.com
> domain.


Not clear exactly what you are describing. Do you mean mail from a
particular set of hosts, or mail from anywhere? Or do you mean "mail FOR
user@???"?

> The Exim relay server itself is also in the int.mydomain.com domain.
>
> Here's how I think it can be done manually:
>
> hubbed_hosts:
>                driver = domainlist
>                transport = remote_smtp
>                route_list = mydomain.com mx1.int.mydomain.com:mx2.int.mydomain.com


For Exim 4, that should be "manualroute" instead of "domainlist".

> What I'm not sure about, though, is how to configure Exim to use DNS/MX
> lookup to find the proper gateway server, but will still always query the
> int.mydomain.com namespace rather than the mydomain.com namespace.


Again, I'm not clear what you are asking here. What that router says is
"if you have an address xxx@???, send it to one of these two
servers".

> I know that I can use the manualroute router to manually assign a gateway
> (or gateways) to a domain. Instead of having a static route which direct all
> mail to a specific gateway, I'd like to preserve the resiliency offered by
> DNS.


If you want to use DNS to route mail, then use the dnslookup router.

Hmm... Thinks... Are you perhaps wanting to implement this rule:
"Route mail for mydomain.com as if it were int.mydomain.com"?

This is trickier if you want to do it without any kind of rewriting. The
obvious way is

rr:
driver = redirect
domains = mydomain.com
data = ${quote:$local_part}@???

but that does rewrite the envelope recipient address.

If you really want to, you could use the dnsdb lookup in a manualroute
router to look up MX records in the DNS, and then use string
manipulation facilities to turn the result into a list of hosts
(removing the preference values and turning the newlines into colons).
Messy, but I think it could be done.



--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.