SSL, LDAP auth, HostName and XMPP.DomainName

I have following setup:

AD domain, named, domain controller named and OpenFire host named User authentication is going through LDAP, base DN is pointing to

Now to the point:

1st case:

XMPP.DomainName = (for some unknown reason for me server name is the same), so SSL certificate host is pointing to not the needed! User authentication is ok, as it is adding xmpp.domainname to the user (e.g. admin is

SSL certificate host is wrong! it must point to, not the entire domain!

2nd case:

XMPP.DomainName (aka host) =, SSL certificate is now ok as it points to the correct host, but user lookup is wrong - now it tries and this is totally wrong! I have LDAP authentication, why it’s adding xmpp domain not the ldap base dn?

User lookup is wrong!

So in either case something is going wrong. And the question is - what to do? I need certificate for correct host (e.g. and user lookup through AD domain**

I have the same problem. Did you find a solution?