Re: [exim] Trapping string expansion failures

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Phil Pennock
日付:  
To: Ben Allen
CC: exim-users
題目: Re: [exim] Trapping string expansion failures
On 2010-09-21 at 19:48 +0100, Ben Allen wrote:
> #Okay, must  be destined for us. First try live AD lookup
> AD_rewrite:
>   driver = redirect
>   domains = +exchange_domains      
>   address_data = ${lookup ldap{LDAP_SEARCHSPEC}{$value}fail}
>   data = ${filter{$address_data}} #Does a couple of regexes and maps

>
>
> #If the above rewrite failed, check against a 'virtusertable' file
> static_rewrite:
> driver = redirect
> domains = +exchange_domains
> data = ${lookup in static table}


On the first Router, add a "condition = ..." line which does the same
LDAP lookup. Note that this will still only do one LDAP lookup because
of lookup caching. By then saving the result in address_data, the value
is preserved across the process boundaries (which the caches are not).

 AD_rewrite:
   driver = redirect
   domains = +exchange_domains      
   condition = ${lookup ldap{LDAP_SEARCHSPEC}{yes}{no}}
   address_data = ${lookup ldap{LDAP_SEARCHSPEC}{$value}fail}
   data = ${filter{$address_data}} #Does a couple of regexes and maps


Regards,
-Phil