Re: [exim] openldap + exim, how to make mailing group ?

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: George Sitov
CC: exim-users
Subject: Re: [exim] openldap + exim, how to make mailing group ?
On 2009-11-16 at 22:30 +0300, George Sitov wrote:
> 2009/11/16 Phil Pennock <exim-users@???>
> > Change ?memberUid? to ?memberUid,mail?
> >
> > You can use ${extract{mail}{the_lookup}} to get the mail part from the
> > results.
> >
> > -Phil
> >
>
> It seems like:
>
> data = ${lookup ldapm{LDAP_AUTH \
> ${extract{mail}{ldap:///ou=People,dc=xxx,dc=
> org?memberUid?sub?(cn=${quote_ldap:$local_part})}}}
>
> ?


No. See the bit between the first question-mark ("?") and the second
question-mark? That's where you specify which attributes you want from
LDAP.

You are currently asking for just memberUid, so you're getting just
that. You need to *ask* for the data you want. This is why I wrote:

> Change ?memberUid? to ?memberUid,mail?



After you ask LDAP for different data, if you're asking for more than
one attribute per user, you'll need to figure out how to get just the
data you want. The ${extract{}{}} then goes *around* the entire LDAP
lookup.

I recommend only asking for one attribute per user when using ldapm,
it's *much* easier. So you'd use ?mail? *instead-of* ?memberUid?.

So:
data = ${lookup ldapm{LDAP_AUTH ldap:///ou=People,dc=xxx,dc=org?mail?sub?(cn=${quote_ldap:$local_part})}}


*IF* you need more data, which is what was suggested to me by the fact
that you were asking for memberUid, then it gets more complicated. I
pointed to ${extract}, I should also have pointed to ${map}. It's easy
to construct, but it's apparently not what you want.

-Phil