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

Re: basic ldapsearch problem



Kuba Leszewski wrote:
Hi,

I have OpenLDAP doing mail routing with Sendmail.
I wanted to write some command line tools, that ease the administration of accounts.


And I can't get ldapsearch to work, the way i want it to:

Sample entry looks like this:
dn: uid=randomuid,dc=domain,dc=pl
objectClass: inetLocalMailRecipient
mailLocalAddress: name.surname@domain.pl
mailLocalAddress: name.surname@domain.com.pl
mailHost: destination.mailhost.pl

And let's say I want to find  everyone with a given name or surname ?
Or check if given uid already exists.

ldapsearch -x -w password -D "rootdn" -b "base" -LLL "(uid=givenuid)"
Doesn't find anything.

The only case when ldapsearch works is when I enter
"(mailLocalAddres=full.email.addres@domain.pl)"

But when I enter just mailLocalAddres=full*)"
Then it fails.



Please Anyone has any idea ?

Maybe somethign is wrong  with my indexes ?
I only have index objectClass eq.

Maybe I should define  more of them ?

Or maybe it's impossible to search by part of e-mail address ?

Maybe I should have records of type inetOrgPerson, to make such search ?
But Sendmail requires inetLocalMailRecipient type, so I have no choice.



Kuba