On Fri, 2010-04-16 at 11:00 +0100, [email protected] 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


-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to