Re: [exim] set exim variable from perl script

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Hans Klose
Date:  
À: exim-users
Sujet: Re: [exim] set exim variable from perl script
Hi Kjetil,

can you explain this a little bit more. I is not realy clear
for me how to do this.

I need somethin like this

ldap_lookup:
debug_print = "R: LDAP Lookup Router"
driver = manualroute
set $variable_x= ${${perl{ldap_check_rcpt}{router}}
if ${$variable_x} = defer {
host_find_failed = defer
}
elso if ${$variable_x} = true {
route_list = 192.168.0.10
transport = remote_smtp
}

next_router ................


Regards,
Hans

>>On Wed, 2008-11-05 at 11:17 +0100, Hans Klose wrote:
>> is it possible to set exim variables from a perl script?
>> I want to write a perl script which return true, false, defer
>> or something else so I can write conditions in exim to test these value.
>>
>> Is that possible?


>you can set $address_data (in a router) or an ACL variable with the
>expansion from the perl code, then use extract to get at the bits. it's
>easiest if the Perl script output is on the form "key1=value1
>key2=value" and so on, then you can use ${extract{key1}{$address_data}}



--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger