If the entry in question is "cn=example,ou=people,dc=sun,dc=com", and
that entry contains multiple "mail" attributes, then your filter might
be '(cn=example)' with a search base of
'cn=example,ou=people,dc=sun,dc=com' and a search scope of 'base',
returning the attribute 'mail'. If there is an entry that matches the
filter, all values of 'mail' will be returned to the LDAP client.
Note that a filter of '(mail=*)' would also work in this case, and
assuming that the 'mail' attribute was indexed for equality should be
just as fast.
Also note that this example assumes that the LDAP client knows the RDN
of the entry. If the LDAP client did not know the RDN of the entry,
then the client should increase the search scope depth, and widen the
search base to 'ou=people,dc=sun,dc=com', and change the filter to
'(mail=*)' or '(cn=*)', or something similar that will allow Directory
Server to locate the entry(s) desired.
On May 16, 2008, at 3:00 AM, Etienne Le Sueur wrote:
Hi,
I'm trying to do an ldapsearch with the following filter:
"[EMAIL PROTECTED]"
The entries may have more than one email address. this filter is only
matching on the first email address.
I would like it to match on any of the addresses the user has added.
Can anyone help with the correct filter? I have tried
"[EMAIL PROTECTED]" but that matches multiple entries sometimes.
---
You are currently subscribed to [EMAIL PROTECTED] as: [EMAIL PROTECTED]
]
To unsubscribe send email to [EMAIL PROTECTED] with the word
UNSUBSCRIBE as the SUBJECT of the message.
http://blogs.sun.com/terrygardner
"Sometime they'll give a war and nobody will come." - Carl Sandberg
---
You are currently subscribed to [EMAIL PROTECTED] as: [EMAIL PROTECTED]
To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the
SUBJECT of the message.