2009/11/17 Phil Pennock <[email protected]> > On 2009-11-16 at 22:30 +0300, George Sitov wrote: > > 2009/11/16 Phil Pennock <[email protected]> > > > 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})}} >
How i can get "mail" attribute, if my group has no it ? This is a query to get all attributes of group: ldapsearch -H ldap://127.0.0.1 -D "uid=addressbook,ou=People,dc=xxx,dc=org" -b ou=PostGroup,ou=People,dc=xxx,dc=org '(cn=all)' -W Enter LDAP Password: # extended LDIF # # LDAPv3 # base <ou=PostGroup,ou=People,dc=xxx,dc=org> with scope subtree # filter: (cn=all) # requesting: ALL # # all, PostGroup, People, xxx.org dn: cn=all,ou=PostGroup,ou=People,dc=xxx,dc=org cn: all gidNumber: 500 memberUid: george memberUid: testuser objectClass: posixGroup objectClass: top # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1 If i make this query: ldapsearch -H ldap://127.0.0.1 -D "uid=addressbook,ou=People,dc=xxx,dc=org" -b ou=PostGroup,ou=People,dc=xx,dc=org '(cn=all)' memberUid gidNumber mail -W i get: # extended LDIF # # LDAPv3 # base <ou=PostGroup,ou=People,dc=xxx,dc=org> with scope subtree # filter: (cn=all) # requesting: memberUid mail # # all, PostGroup, People, xxx.org dn: cn=all,ou=PostGroup,ou=People,dc=xxx,dc=org memberUid: georgiy.a.sitov memberUid: testuser # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1 But i can not get "mail" attribute directly. May be i can use "extract", but in "google" i can not find explain. Please, can you help me make query ? > > *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 > -- Best regards, George. -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
