Re: [Exim] keying off an ldap attribute and either failing..…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Chad Leigh -- Shire Net LLC
Fecha:  
A: Exim-users
Asunto: Re: [Exim] keying off an ldap attribute and either failing...
On Jan 26, 2004, at 6:53 PM, Edgar Lovecraft wrote:

>> From:        "Chad Leigh -- Shire.Net LLC" <chad+exim@???>

>>
>> Hi
>>
>> Thanks. The problem is, that this keys to a delivery transport.
>> There
>> are several routers that need to be run to determine actual mode of
>> delivery (local, forward, vacation, etc). This is just a
>> pre-qualifier.
>>
> --
>
> #Routers Section
> dapaccountactive:
>    driver    = redirect
>    domains   = ...domains to check...
>    ### do not }fail} this condition as it will not do what you want
>    ###    this needs to return {no}{yes}
>    ###    {no} means that shireNetAccountActive == Y
>    ###    {yes} means that shireNetAccountAcive != Y
>    condition = ${if eq{
>     ${lookup ldap{user="..." pass="..." \
>     ldap://..server..:389/shireNetAccountname=${quote_ldap:$local_part},\
>     shireNetDomain=${quote_ldap:$domain},dc=shire,\
>     dc=net?shireNetAccountActive?one?}}}{Y}{no}{yes}}
>    ### If this condition returns 'false' ({yes}) then :fail: the
> message
>    ###     with the 'data' as the return message.
>    data      = :fail: \
>         User Refused Message Delivery: \"$local_part@$domain\" \n\
>         Message refused as the user active is not active.
>    allow_fail
>    no_more
> .Other Routers go below this one....
> --

>


Cool, thanks, I will try this out... In the condition, if it matches
"Y" you return a {no} otherwise a {yes}... Looks good.

You learn something new everyday. When I first set up the system, I
learned a ton, but it has basically been working since so I forget how
this all works :-)

thanks
Chad