KB Article #151161

Detained messages after upgrade to 5.1

Problem

After upgrade to MG 5.1 messages are detained and tagged with "LDAP Lookup Failure". The errors in the Policy Engine log are:



---
Feb  4 13:47:30 dalt PolicyEngine[7437]: TID 3984079728, ERROR: LDAP error -7: Bad search filter; in file: CLdapSource.cpp; at line: 821
Feb  4 13:47:30 dalt PolicyEngine[7437]: TID 3984079728, ERROR: Querying LDAP source [CU] with base [DC=CU,DC=int] and filter [(&(objectClass=user)(memberof=CN=\#Test one,DC=CU,DC=int)(mail=test@CU.int))] requesting [cn] FAILED!; in file: CLdapSource.cpp;
---



MG has address groups in its setup that utilize custom LDAP queries for group filtering. Few of the groups have special characters in their name. For example:



(&(objectClass=user)(memberof=CN=\#Test one,DC=CU,DC=int)(mail=%s)



In this scenario, the query fails since Policy Engine does not properly parse the "#" special character.


Resolution

Modify the query to escape the special character "#":



(&(objectClass=user)(memberof=CN=\5c#Test one,DC=CU,DC=int)(mail=%s)