[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldapsearch not accurate



I'm experiencing what I think to be a logic error, but I'm not sure if
it is slapd's logic or mine.  I'm using the qmail schema in addition to
the default set.  Debian slapd 2.1.22-1.

When I search by mailAlternateAddress I get a result if mail==uid, but
otherwise not.  Can someone explain this to me please?  Please obvserve
my simple successful and unsuccessful queries.

Thanks,
Cory

emails mangled, comments and some other things snipped.

cory@cory1:/var/local/ldap$ ldapsearch -x -b 'ou=people,dc=petersen-arne,dc=com' '(mailAlternateAddress=corypATpetersen-arneDTcom)'

dn: uid=cory,ou=People,dc=petersen-arne,dc=com
objectClass: person
objectClass: qmailUser
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
cn: Cory Petkovsek
givenName: Cory
sn: Petkovsek
[posix/shadow stuff snipped]
uid: cory
accountStatus: active
mail: coryATpetersen-arneDTcom
mailAlternateAddress: coryATadaptableitDTcom
mailAlternateAddress: corypATpetersen-arneDTcom
mailAlternateAddress: postmasterATadaptableitDTcom
mailAlternateAddress: supportATadaptableitDTcom

cory@cory1:/var/local/ldap$ ldapsearch -x -b 'ou=people,dc=petersen-arne,dc=com' '(mailAlternateAddress=craigcATpetersen-arneDTcom)'

# craig, People, petersen-arneDTcom
dn: uid=craig,ou=People,dc=petersen-arne,dc=com
objectClass: person
objectClass: qmailUser
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
cn: Craig Curtis
givenName: Craig
sn: Curtis
uid: craig
seeAlso: cn=Public,ou=Shared Folders,dc=petersen-arne,dc=com
accountStatus: active
mail: craigATpetersen-arneDTcom
mailAlternateAddress: craigcATpetersen-arneDTcom

cory@cory1:/var/local/ldap$ ldapsearch -x -b 'ou=people,dc=petersen-arne,dc=com' '(mailAlternateAddress=jenniferATpetersen-arneDTcom)'
#
# LDAPv3
# base <ou=people,dc=petersen-arne,dc=com> with scope sub
# filter: (mailAlternateAddress=jenniferATpetersen-arneDTcom)
# requesting: ALL
#

# search result
search: 2
result: 0 Success

# numResponses: 1

cory@cory1:/var/local/ldap$ ldapsearch -x -b 'ou=people,dc=petersen-arne,       dc=com' '(mail=jennifermATpetersen-arneDTcom)'

dn: uid=jennifer,ou=People,dc=petersen-arne,dc=com
objectClass: person
objectClass: qmailUser
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
cn: Jennifer Muskopf
givenName: Jennifer
sn: Muskopf
uid: jennifer
accountStatus: active
mail: jennifermATpetersen-arneDTcom
mailAlternateAddress: jenniferATpetersen-arneDTcom

-- 
Cory Petkovsek                                       Adapting Information
Adaptable IT Consulting                                Technology to your   
(541) 914-8417                                                   business
cory@AdaptableIT.com                                  www.AdaptableIT.com