Re: [exim] Different target hosts and types for a Exim gatew…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: exim.ml@riotm.co.uk
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Different target hosts and types for a Exim gateway
On Sun, 2010-04-18 at 09:22 +1000, Ted Cooper wrote:
> On Fri, 2010-04-16 at 11:00 +0100, exim.ml@??? wrote:
> > Where I'm stumped is how and where I extract the destination host
> type
> > and have Exim resolve it (host/mx) if necessary and populate a
> > variable/data field to feed to the transport. It's probably really
> > simple, but I'm confusing myself and having some trouble getting
> this
> > 'clear' as a logical problem in my head.
>
> Use SQL to seperate the domains into categories for each type? ie
> split
> your mysql_localbox into mysql_forward_mx etc and then use the
> "domains=" line with an SQL query to target the right router.
>
> To avoid mail loops, add a header flag with a hashed value to can
> re-do
> later and check for that.
>
> eg
> LOOKUP_FWDDOMAIN=SELECT domainname FROM client_domains WHERE
> domainname
> = '${mysql_quote:$domain}' AND dtype = 'forward'
> forwardomains:
> driver = manualroute
> domains = ${lookup mysql{LOOKUP_FWDDOMAIN}{$value}}
> local_parts = ${lookup mysql{LOOKUP_ALL_USERS}{$value}}
> route_data = ${lookup mysql{LOOKUP_ROUTEDATA}{$value}}
> transport = remote_smtp


Thank you Ted, that's the pointer I need and gives me something to go
on. Appreciated.