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

Re: Search for mail attribute fails



I tried that, but I still have no luck. slapd log:

conn=20 op=1 SRCH base="dc=office-b,dc=jamba,dc=net" scope=2 filter="(mail=ja*)"
AND
DN SUBTREE
OR
EQUALITY
SUBSTRINGS
ber_flush: 14 bytes to sd 24
conn=20 op=1 SEARCH RESULT tag=101 err=0 text=
conn=20 op=2 UNBIND
conn=-1 fd=24 closed
conn=-1 fd=25 closed
daemon: conn=21 fd=24 connection from IP=10.100.1.43:34266 (IP=0.0.0.0:31746) accepted.
conn=21 op=0 BIND dn="" method=128
ber_flush: 14 bytes to sd 24
conn=21 op=0 RESULT tag=97 err=0 text=
begin get_filter
AND
begin get_filter_list
begin get_filter
EQUALITY
end get_filter 0
begin get_filter
EQUALITY
end get_filter 0
end get_filter_list
end get_filter 0



Jon Roberts wrote:
Andreas Heilwagen wrote:

But looking for mail addresses (simplified form of a Mozilla LDAP query) fails:

  ldapsearch -x -b "dc=office-b,dc=jamba,dc=net" "(mail=j*)"

The entry at the end of the mail should show up as answer to the mail query. The only reference to the mail attribute in my slapd.conf is

  index           mail eq

Any idea what precondition has to be fulfilled to get an answer to the query for a mail address (debian woody, openldap 2.0.23)?


This may not be your whole problem, but you are performing a substring search on an attribute that has only been indexed for equality. Try

index    mail eq,sub

Jon Roberts
www.mentata.com