[exim] Question about use of route_data as a condition to tr…

Top Page
Delete this message
Reply to this message
Author: Hubertus von Fuerstenberg
Date:  
To: exim-users
Subject: [exim] Question about use of route_data as a condition to transport option
Hi,

I have a router that looks up the mailhost for a user and I would like
to then select a transport according to the result of the lookup.

(Background: one mailhost speaks lmtp only, the other smtp and I am too
lazy/not brave enough to change their config)

My first approach was this:
final_destination:
     driver = manualroute
     route_data = ${lookup ldap {LDAP_OPTIONS
ldap:///LDAP_MAILHOST_QUERY} {$value} {DEFAULT_MAILHOST}}
     transport = ${if eq {$route_data}{imap.ise.fraunhofer.de} \
                 {remote_message_store_lmtp}{remote_message_store_smtp}}
     local_parts = ${lookup ldap{LDAP_OPTIONS ldap:///LDAP_UID_QUERY} 
{$value} fail}


The ldap query for route_data looks up the mailhost and yields either
"imap.ise.fraunhofer.de" or "notesmail.ise.fraunhofer.de", so I thought
of using route_data in the selection of transport but I always get the
error that "route_data" is an unknown variable which is true since it is
an option rather than a variable. So my question is: How can I extract
the value of route_data an use it in a condition for my ${if} decision?

Thanks,
Hubertus

--
Hubertus von Fuerstenberg
Information Technology
Fraunhofer-Institut fuer Solare Energiesysteme ISE
Heidenhofstrasse 2, 79110 Freiburg, Germany
Phone: +49 (0) 7 61 / 45 88-0 Fax: +49 (0) 7 61 / 45 88-90 00
hubertus.fuerstenberg@???
http://www.ise.fraunhofer.de