Re: [exim] LDAP-DN-Lookups for authenticators

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Tony Finch
日付:  
To: Dennis Ploeger
CC: exim-users
題目: Re: [exim] LDAP-DN-Lookups for authenticators
On Wed, 28 Jun 2006, Dennis Ploeger wrote:
>
> login:
>    driver = plaintext
>    public_name= LOGIN
>    server_prompts = "Username:: : Password::"
>    server_condition = ${if ldapauth \
>       {user= ${lookup ldapdn \


Your problem is the space after user=

>                { \
>                user="cn=epicforge reader, cn=readers, dc=epicforge, dc=com" \
>                pass="xxxxxxx" \
>                ldap://127.0.0.1:389/dc=epicforge,dc=com?dn?sub?(mail=${quote_ldap:$1}) \
>                } \
>               } \
>        pass=$2 \
>       ldap://127.0.0.1:389/dc=epicforge,dc=com?uid?sub?(uid=$1)}{yes}{no}}
>    server_set_id=$1


I'd suggest using a different form of nesting, which is probably simpler:

  server_condition = \
    ${lookup ldapdn{ \
               user="cn=epicforge reader, cn=readers, dc=epicforge, dc=com" \
               pass="xxxxxxx" \
               ldap://127.0.0.1:389/dc=epicforge,dc=com?dn?sub?(mail=${quote_ldap:$1}) \
             } \
       {${if ldapauth{ \
               user="${quote_ldap_dn:$value}" \
               pass=$2 \
               ldap://127.0.0.1:389/dc=epicforge,dc=com?uid?sub?(uid=$1) \
             } \
             {yes} {no} }} \
       {no} }


Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}