Re: [Exim] address routing with ldap

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Thomas Poepl
日付:  
To: Tony Earnshaw
CC: exim-users@exim.org
題目: Re: [Exim] address routing with ldap
This is a multi-part message in MIME format.
--
Tony Earnshaw wrote:

> tir, 08.04.2003 kl. 11.43 skrev Thomas Poepl:
>
> > no these mailboxes are not related to system accounts,
>
> Aliases and forwarding stuff sometimes isn't :) Normal mail forwarding
> addresses can simply be entered directly into the user's mail attribute;
>
> > I'm using the Cyrus IMAPD.
>
> This has nothing to do with what follows and is included in my setup -
> though I use IMAP too, for other things;
>
> > And Yes I need aliases and mail groups.
>
> This has;
>
> > I've set up an LDAP schema so far.
>
> What follows below (cut 'n paste, apart from passwords) is based on
> Openldap 2.1 schemas, including NIS and MISC - but needs no extra
> non-standard schemas;
>
> > But the router configuration seems confusing to me. I'm using exim 4.12
> > with LDAP support build in.
>
> Same here, but 4.14 and Openldap 2.1.17. And the routers go on and on
> and on for different groups, aliases etc. etc. I even do LDAP-based AUTH
> in more or less the same way.
>
> exim is a privileged LDAP user, who may read all relevant users'
> passwords.
>
> Best,
>
> Tony
>
> --
>
> mail_redirect:
>   driver = redirect
>   allow_fail
>   allow_defer
>   data   = ${lookup ldapm \
>     {user="cn=exim,ou=services,ou=groups,dc=billy,dc=demon,dc=nl"
> pass=password \
>     ldaps://localhost/\
>     dc=billy,dc=demon,dc=nl?mailRoutingAddress?sub?\
>     (&(objectClass=inetlocalMailRecipient)(uid=$local_part))\
>     }\
>     {$value} fail }
> # user = exim
>   file_transport = address_file
>   pipe_transport = address_pipe

>
> system_aliases:
>   driver = redirect
>   allow_fail
>   allow_defer
>   data   = ${lookup ldapm \
>     {user="cn=exim,ou=services,ou=groups,dc=billy,dc=demon,dc=nl"
> pass=password \
>     ldaps://localhost/\
>     ou=groups,dc=billy,dc=demon,dc=nl?mailRoutingAddress?sub?\

>
> (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=${quote_ldap:$local_part@$domain}))\
>     }\
>     {$value} fail }
> # user   = exim
>   file_transport = address_file
>   pipe_transport = address_pipe

>
> group_aliases:
>   driver = redirect
>   allow_fail
>   allow_defer
>   data    = ${lookup ldapm \
>     {user="cn=exim,ou=services,ou=groups,dc=billy,dc=demon,dc=nl"
> pass=password \
>     ldaps://localhost/\
>     dc=billy,dc=demon,dc=nl?rfc822MailMember?sub?\
>     (&(objectClass=nisMailAlias)(cn=${quote_ldap:$local_part@$domain}))\
>     }\
>     {$value} fail }
> # user = exim
>   file_transport = address_file
>   pipe_transport = address_pipe

>
> --
>
> Tony Earnshaw
>
> e-post:         tonni@???
> www:            http://www.billy.demon.nl

>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##


Thanks to Tony for his help,

now I figured out how the ldap routing works with exim4. But I noticed a strange behavior with my
installation. If I setup my ldap router with the following:
 data = ${lookup ldapm \
                {user="uid=exim,ou=exim,dc=capcom,dc=de" pass=exim \
                ldap:///dc=$domain,ou=exim,dc=capcom,dc=de\
                ?mailRoutingAddress?sub?(&(objectClass=inetLocalMailRecipient)\
                (mailLocalAddress=$local_part@$domain))}{$value} fail }


The fail at the end of the statement will not work, instead if I put something like this:

  data = ${lookup ldapm \
                {user="uid=exim,ou=exim,dc=capcom,dc=de" pass=exim \
                ldap:///dc=$domain,ou=exim,dc=capcom,dc=de\
                ?mailRoutingAddress?sub?(&(objectClass=inetLocalMailRecipient)\
                (mailLocalAddress=$local_part@$domain))}{$value} {:fail:} }


The router works and bounces "user unkown" if no user with mailLocalAddress=$local_part@$domain exists. Does
anybody had a similar problem with exim4 ?

Kind Regards
Thomas
--
Content-Description: Card for Thomas Poepl

[ thomas.poepl.vcf of type text/x-vcard deleted ]
--