ext ([EMAIL PROTECTED]) wrote: > > $email => the email address the incoming message is sent to (IE > [EMAIL PROTECTED]) and the filter looks for an LDAP field called "mail" > which contains the value in $email. > > If that fails, we need instead to look for the email address in the LDAP > field "proxyAddresses", which is not a SINGLE field but instead has > contents which look like this: > proxyAddresses: SMTP:[EMAIL PROTECTED]; > smtp:[EMAIL PROTECTED]; smtp:[EMAIL PROTECTED]; X400:c=US;a= > ;p=FLA;o=DOH;s=scancardrequest;; RFAX:MQA Scancard Requests@; > > The trick is how to construct the query so it will look for the value of > the $email string within the "proxyAddresses" LDAP field. >
Hi, If you want to do substring searching, then you need to create a substring index for that particular attribute (proxyAddress). IMO, this problem that you are encountering is a prime example of why data structures should not be stored as values of a single attribute. However, the solution to your problem (also relevant to OpenLDAP): From Netscape Directory Server Administrators Guide, http://enterprise.netscape.com/docs/directory/62/ag/index1.htm ------------------------------------------------------------------------- # Substring index (sub)The substring index is a costly index to # maintain, but it allows efficient searching against substrings within # entries. Note that substring indexes are limited to a minimum of three # characters for each entry. For example, searches of the form cn=*derson would match the common names containing strings such as Bill Anderson Jill Anderson Steve Sanderson Similarly, the search for telephonenumber= *555* would return all the entries in your directory with telephone numbers that contain 555. ------------------------------------------------------------------------- BR, Mike