Ejabberd configuration issue

What I want to achieve is:

  • I want to run XMPP service on separate subdomain like xmpp.domain.com
  • But at the same time, to use usernames like john@domain.com (neither than john@xmpp.domain.com)
  • to auto detect xmpp service's url xmpp.domain.com on jabber clients while using username like john@domain.com
  • to correctly use ssl for domain.com

Of course it might be, the way I think is not correct. If you have suggestion about it please comment me.

What I've done is:

Created Debian 8 server

Executed

    apt-get update && apt-get dist-upgrade
    apt-get -y install ejabberd
    dpkg-reconfigure ejabberd

- A hostname - xmpp.domain.com.
- An administrative user - admin and two times password

Placed ssl pem key for domain.com in /etc/ejabberd/ejabberd.pem

Added all DNS records like

http://i.stack.imgur.com/0NkYB.jpg

Then service ejabberd restart

Now when I try to register a new user like

ejabberdctl register admin domain.com 12345

It gives me an error message like, it's not allowed to register such username. But it allows when I enter

ejabberdctl register admin xmpp.domain.com 12345

The problem is...

So basically I can't use username admin@domain.com while using server xmpp.domain.com. What am I missing? any suggestions?

Also I'm a bit confused about SSL config and pem file. My SSL certificate currently supports www.domain.com and domain.com. Do I have to buy ssl cert for xmpp.domain.com also?

Syndicate content