[Date Prev][Date Next]
Re: basic ldapsearch problem
> Thanks for reply.
> I think there's something wrong with my english, beacuse it's not quite
> the thing I asked for :-)
> My Sendmail also works. I mean it routes e-mail everywhere I want it to.
> That's not problem, and I don't have to switch to Exim for now I think
> So what's the problem ?
> let's say that each entry looks like this:
> dn: uid=randomuid,dc=domain,dc=pl
> objectClass: inetLocalMailRecipient
> mailLocalAddress: firstname.lastname@example.org
> mailLocalAddress: email@example.com
> mailHost: destination.mailhost.pl
> And I have 1000 of these entries in my directory.
> Now let's say I want to find if there's alredy an entry with
> uid=sampleuid1. Or I want to find all accounts (users) with name set to
> Notice that these entries are not inetOrgPerson entries (or similar), so
> I don't have separate cn,sn, givenName attributes.
> Can I make such search ?
> If not, why can't I ? What are the limits in specifying a filter for
> ldapsearch command ?
> Why can't I set search filter to mailLocalAddres=John* ?
Because mailLocalAddress (and mailRoutingAddress as well)
do not support substring filtering, as it is specified
in their definition (attributeType in the .schema file)
which does not have any SUBSTR matching rule).
Moreover, inetLocalMailRecipient is not a structural
objectclass; since each entry must have one and only one
structural objectclass you should add a person, or
inetOrgPerson, to your entries, with cn, sn, mail and so
that in turn support substrings matching. This rule about
structural objectclasses is strictly enforced in 2.1 so
in case you upgrade you'll likely be in trouble and you
must be prepared to fix all your data.
> I hope everything is clear now.
> I have one more question.
> What do You use for administration of LDAP directory ?
> Some web-tool, or maybe a stand-alone application ?
Command-line scripts; I think Tony can better answer
this question, though.