LDAP search filter is useful in Apache LDAP authentication and Ironport.
Under Ironport, I use the below filter to search for valid user with his aliase :
(|(uid={u})(cn={u}))
I use the below to search if an user/alias is in a specific posix group :
(&(cn={g})(memberUid={u}))
Under OpenLDAP, to search a user :
ldapsearch -x -b […]