[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
lookups on multivalued field fails
I am experiencing a very strange problem. I am trying to do lookups from
my mail system directly into the LDAP server. After several unsuccessful
attempts, I decided to try the querries in other ways. The bottom line is
that I do not seem to have my OpenLDAP set up correctly. I am
experiencing not only lookup failures in Postfix, but also SaslAuthd and
the command line. So, my first order is to look at the command line, and
see if I can figure out what is wrong there. However this seems to be
quite puzzling. I can look up a record by the mail field, but not the
mailAlternateAddress fields:
[root@ruby root]# ldapsearch -x uid=kevin mail mailAlternateAddress
# extended LDIF
#
# LDAPv3
# base <> with scope sub
# filter: uid=kevin
# requesting: mail mailAlternateAddress
#
# Kevin Fries, People, example.com
dn: cn=Kevin Fries,ou=People,dc=example,dc=com
mail: Kevin.Fries@example.com
mailAlternateAddress: kfries@example.com
mailAlternateAddress: kgf@example.com
mailAlternateAddress: kevin@example.com
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
[root@ruby root]# ldapsearch -x mail=kevin.fries@example.com mail
mailAlternateAddress
# extended LDIF
#
# LDAPv3
# base <> with scope sub
# filter: mail=kevin.fries@example.com
# requesting: mail mailAlternateAddress
#
# Kevin Fries, People, example.com
dn: cn=Kevin Fries,ou=People,dc=example,dc=com
mail: Kevin.Fries@example.com
mailAlternateAddress: kfries@example.com
mailAlternateAddress: kgf@example.com
mailAlternateAddress: kevin@example.com
[root@ruby root]# ldapsearch -x mailAlternateAddress=kevin@example.com
mail mailAlternateAddress
# extended LDIF
#
# LDAPv3
# base <> with scope sub
# filter: mailAlternateAddress=kevin@example.com
# requesting: mail mailAlternateAddress
#
# search result
search: 2
result: 0 Success
# numResponses: 1
In slapd.conf I have both of these lines, so that searches are optomized:
index mailAlternateAddress eq
index mail sub,eq
So why can I find a person by primary email address, but not an alias
address? This seems strange to say the least.
I also thought that it could be the schema (i.e. can't search by fields
defined in the qmailuser schema), but I am able to search by
mailMessageStore and retrieve the correct record. So, that theory got
blown to heck in a hurry. So I am back to the multivalued field as the
most likely culprit.
TIA for any and all help.
Kevin Fries