[Exim] assigning variables from pieces of a lookup

Top Page
Delete this message
Reply to this message
Author: Colin Sampaleanu
Date:  
To: Exim-Users (E-mail)
Subject: [Exim] assigning variables from pieces of a lookup
After looking at the documentation for quite a while, I am confused as
to how I can assign some of the data returned from an ldap lookup to an
option for the router. So I have a router declaration:

ldap_user:
driver = redirect
hide data = ${lookup ldapm
{user="cn=mailldapquery,ou=people,dc=whatever,dc=com" pass=whatever
ldap://localhost:389/ou=mailaccounts,dc=whatever,dc=com?homeDirectory?sub?(uid=${local_part})}}

transport_home_directory=${data}
file_transport = local_delivery
unseen
cannot_route_message = Unknown user

Now my ldap lookup is working ok, and I am getting back the user home
directory from ldap. What is not working (not that I really expected it
to) is the assignment statement
transport_home_directory=${data}
where I am trying to set the home directory for the transport,
presumably since the assignment of the 'data' option doesn't actually
create a variable called 'data'.

So the question is, how can I assign a value to
transport_home_directory, short of doing another lookup?

Regards,
Colin