Index: branches/ucs-4.1/ucs-4.1-1/mail/univention-mail-postfix/share/listfilter.py =================================================================== --- branches/ucs-4.1/ucs-4.1-1/mail/univention-mail-postfix/share/listfilter.py (Revision 68624) +++ branches/ucs-4.1/ucs-4.1-1/mail/univention-mail-postfix/share/listfilter.py (Arbeitskopie) @@ -98,7 +98,10 @@ # get dn and groups of sender if check_sasl_username: - ldap_filter = '(&(uid=%s)(objectclass=posixAccount))' % sender + if "@" in sender: + ldap_filter = '(&(mailPrimaryAddress=%s)(objectclass=posixAccount))' % sender + else: + ldap_filter = '(&(uid=%s)(objectclass=posixAccount))' % sender else: ldap_filter = '(&(|(mailPrimaryAddress=%s)(mailAlternativeAddress=%s)(mail=%s))(objectclass=posixAccount))' % (sender, sender, sender) user_result = ldap.search(base=options.ldap_base, filter=ldap_filter, attr=["dn"])