LDAP not functional

Hi,

I have installed ERPNext on our own server as well as the Cloud System and I am trying to authenticate the users against openLDAP from iRedMail. The authentication with nextcloud works without any issues with the following LDAP query:

Users:
(&(objectclass=mailUser)(enabledService=nextcloud))

Log-In attributes:
(&(&(objectclass=mailUser)(enabledService=nextcloud))(|(mailPrimaryAddress=%uid)(mail=%uid)))

Groups:
(&(objectclass=mailList)(enabledService=group))

With a base user tree:
o=domains,dc=alephnet,dc=ai

Group member association:
member

I have tried all combinations, but I can’t get it to work. The login hangs in “Verifying” and nothing happens afterwards. I also tried to apply the gravatar fix on the own server (https://github.com/frappe/erpnext/issues/20571 ), but it also doesn’t help.

Could someone please tell me what I have to do, to get the authentication to work?

My current settings are: