Extracting part of a ldap attribute with an ldap query

Extracting part of a ldap attribute with an ldap query

Post by Bob » Fri, 07 Apr 2006 03:29:19


Hi,

I have a need to be able to extract only part of an attribute field
using a single ldap query.

For example, I need to return just the OPMAIL01 part from this string:
/o=Options/ou=First Administrative
Group/cn=Configuration/cn=Servers/cn=OPMAIL01

Is is even possible to do this with an ldap query?

Thanks.
 
 
 

Extracting part of a ldap attribute with an ldap query

Post by Andrew Swo » Fri, 07 Apr 2006 19:17:15

I would suggest looking into the topic of quering with WMI.

 
 
 

Extracting part of a ldap attribute with an ldap query

Post by Bob » Mon, 10 Apr 2006 02:01:49


Unfortunately, what I'm trying to do is configure an email appliance,
and its dumb web interface has a box for a single LDAP query, and
there's no configuration file to manually play with. So unless I can do
a string manipulation in this query somehow, I'm boned and will have to
hardcode a mail server for it to deliver to.
 
 
 

Extracting part of a ldap attribute with an ldap query

Post by Rich Mathe » Mon, 10 Apr 2006 23:53:04


[ snip ]


The LDAP query is just going to identify the objects, not what
attribute to return from the object(s) that satisfy the queries
criteria.

It sounds like what you're looking to do is set up message routing. If
you're sending all the mail from the appliance to just one of your
Exchange servers (which will handle the routing correctly) then your
query is either superflouous or it can be very specific. But what
attribute is the appliantce looking form once the query's been
completed? If you need the "cn" attribute then that should be a
parameter in the web interface. If it's not changable, then what
attribute of the object is the appliance looking for?

--
Rich Matheisen
MCSE+I, Exchange MVP
MS Exchange FAQ at http://www.yqcomputer.com/
Don't send mail to this address mailto: XXXX@XXXXX.COM
Or to these, either: mailto: XXXX@XXXXX.COM mailto: XXXX@XXXXX.COM mailto: XXXX@XXXXX.COM
 
 
 

Extracting part of a ldap attribute with an ldap query

Post by Bob » Wed, 12 Apr 2006 04:09:04


Yeah, it seems the better way to do this is just to hard code it to
deliver all messages from each of these appliances to the nearest
Exchange server and let Exchange do the routing.

Thanks for your help.
 
 
 

Extracting part of a ldap attribute with an ldap query

Post by jamestechm » Wed, 12 Apr 2006 05:14:39

Sounds like the email device is doing LDAP lookups to determine valid
users, similar to Exchange's "Filter recipients who are not in the
directory" Try looking at your appliances documention, they should give
you an example of what attribute to put in. Some devices only require
base bn, others I know have used, the Exchange nickname attribute also
known as the Exchange alias name.

James Chong