[Exim] hosts lookup in smtp transport

Top Page
Delete this message
Reply to this message
Author: Phil Chambers
Date:  
To: exim-users
Subject: [Exim] hosts lookup in smtp transport
I have the following transport:

local_smtp:
driver = smtp
gethostbyname
hosts = ${lookup${domain}cdb{/usr/local/exim/local-domains.db}{$value}fail}

where local-domains.db contains entries such as:
  key              value
 loc1.ex.ac.uk   route1.ex.ac.uk
 loc2.ex.ac.uk   route2.ex.ac.uk


and the director:

local_domains:
driver = smartuser
domains = loc1.ex.ac.uk:loc2.ex.ac.uk
transport = local_smtp

The idea is that I want to treat mail sent to loc1.ex.ac.uk and loc2.ex.ac.uk as
being local but relay it on to machines which can deal with it, but which have
different names. The above works fine when a message contains a single recipient
but when there is a recipient for loc1 and another for loc2 in the same message
then $domain is blank in the smtp transport and the lookup fails. How do I look up
the name of the host to use for each recipient?

Phil.
---------------------------------------
Phil Chambers (postmaster@???)
University of Exeter