RE: [Exim] Redirect to different domain name

トップ ページ
このメッセージを削除
このメッセージに返信
著者: David Moon
日付:  
To: 'exim-users@exim.org'
題目: RE: [Exim] Redirect to different domain name
Hi Philip,

Sorry for the typo; I did mean mail FOR user@???. Despite the lack
of clarity, you pretty much captured the essence of what I want to
accomplish.

To restate the rule: mail from anywhere to xxx@??? -->
mailserver(s).int.mydomain.com (hopefully using DNS, but without rewriting
mail headers)

Looks like there are 3 main options in Exim 4:

1. manualroute router
2. dnslookup router with header rewrite
3. manualroute router with dnsdb lookup (no header rewrite)

Since I'm looking for the cleanest solution, I guess #1 is the way to go. #3
is actually the true solution I was after, but I don't want to add
complexity unecessarily!

Thanks very much Philip. Your comments are exactly the help I needed.

David

-----Original Message-----
From: Philip Hazel [mailto:ph10@cus.cam.ac.uk]
Sent: Tuesday, April 16, 2002 5:57 AM
To: David Moon
Cc: 'exim-users@???'
Subject: 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.



****************************************************************************
IMPORTANT NOTICES:
****************************************************************************
This message is intended only for the addressee. Please notify the sender
by email if you are not the intended recipient. If you are not the
intended recipient, you may not copy, disclose, or distribute this
message or its content to any other person and any such actions may be
unlawful. Electronic mail sent through the Internet is not secure.
WR Hambrecht + Co (WRH+Co) does not accept time sensitive, action-oriented
messages or transaction orders, including orders to purchase or sell
securities, via email.

WRH+Co reserves the right to monitor and review the content of all messages
sent to or from this email address. Messages sent to or from this email
address may be stored on the WRH+Co email system.
****************************************************************************