Re: [Exim] Forwarding unknown users to another host

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Tabor J. Wells
Datum:  
To: Bryce Newall
CC: exim-users
Betreff: Re: [Exim] Forwarding unknown users to another host
On Fri, Feb 13, 2004 at 04:01:46PM -0800,
Bryce Newall <data@???> is thought to have said:

> I have a FreeBSD machine acting as an internet gateway/firewall and mail
> server. Behind it, on the internal network, is a Windows 2000 server
> running Exchange 2000. I want the FreeBSD box to handle mail for all of
> its local accounts and virtually-hosted domains, but to forward mail for
> any address that it doesn't recognize to the Exchange server. From FAQ
> Q0403, I added the following router to the end of the Routers section in
> the configure file:

[snip]

Rather than do this why not just lookup the addresses in Exchange via LDAP
lookups against Active Directory after handling the local accounts and
virtual domains?

This is what I do. My last two routers look like:

exchangeProxyAddressesLookup:
driver = redirect
data = ${lookup ldap {ldap:///CN=Users,DC=EXAMPLE,DC=com?mail?sub?(proxyAddresses=SMTP:${quote_ldap:$local_part}@${quote_ldap:$domain})}}
domains = dbm;/etc/exim/db/localdomains.db
verify_recipient
self = pass
pass_router = exchangeRoute
no_more

exchangeRoute:
driver = manualroute
transport = remote_smtp
route_data = ${lookup{$domain}dbm{/etc/exim/db/localdomains.db}}

where localdomains.db contains key/value pairs for the domain/ip address of
the exchange server it is routed to.

This also has the benefit of allowing me to reject bad addresses at SMTP
time rather than let exchange accept it and then try and relay a bounce
message back through the exim servers.

Tabor

--
--------------------------------------------------------------------
Tabor J. Wells                                     twells@???
Fsck It!                 Just another victim of the ambient morality