I needed to be able to set the name of the smart host for a manualroute router in the Exim MTA(Mail Transport Agent) and came up with this:
LDAP_SMARTHOST = ldap:///ou=Config,BASEDN?dadConfigData?sub?(cn=exim-
smarthost)
with a router defined as
smart_route:
driver = manualroute
domains = !+local_domains
transport = remote_smtp
route_list = * "${extract{1}{/}{ ${lookup ldap{LDAP_SMARTHOST}} }}"
condition = ${lookup ldap{LDAP_SMARTHOST}}