mail: use of ldapUserControl.search instead of the raw ldap.search_s

ldapUserControl.search will convert the filter to utf-8.
Also it is more consistent to use the same method everywhere.

Closes #2210