Univention Bugzilla – Attachment 8220 Details for Bug 37584
use the 'matched' attribute of python-ldap exceptions