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

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Ted Cooper
Datum:  
To: exim-users
Betreff: Re: [exim] Different target hosts and types for a Exim gateway
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


--
The Exim manual - http://docs.exim.org