Changing XMPP domain

842 views
Skip to first unread message

Lukas H

unread,
Jun 28, 2014, 5:45:26 PM6/28/14
to prosod...@googlegroups.com
Hi,

I set up prosody some time ago using talk.example.com (mimicking Google
 ) and have many people on my list. However, I am still the one user
on my server, most of the others are Google Chat users.

Now I would like to change the name to xmpp.example.com. What are the
implications for that and what is the best procedure to do that?

Just change a.) prosody.conf.lua, b.) change SSL cert, c.) rename
/var/lib/prosody/talk.example.com d.) change SRV DNS records, e.)
restart prosody ?

In the worst case, I would accept to re-add all my contacts. However, it
is important that other people would not need to re-add me; and also,
authorization states should kept as they are (i.e., no
re-authorizsations necessary).

Is this possible?

Thanks
Luke

Matthew Wild

unread,
Jun 28, 2014, 6:51:06 PM6/28/14
to Prosody IM Users Group
Hi Luke,

On 28 June 2014 22:45, Lukas H <stefanl...@nobaq.net> wrote:
> Hi,
>
> I set up prosody some time ago using talk.example.com (mimicking Google
> ) and have many people on my list. However, I am still the one user
> on my server, most of the others are Google Chat users.
>
> Now I would like to change the name to xmpp.example.com. What are the
> implications for that and what is the best procedure to do that?

There are two different levels of "hostname" in XMPP that you might be
talking about - it's important not to get the two confused.

First there is the XMPP host, since you mentioned them in your
example, for Google this is "gmail.com", "google.com", or any Google
Apps-enabled domain with Chat enabled. In Prosody it is whatever you
specify as a 'VirtualHost' directive in the config file. The XMPP host
forms part of user addresses, so you would have addresses such as:
us...@example.com, us...@gmail.com, etc. It is important to note that
"talk.google.com" is not an XMPP host - us...@talk.google.com is not an
address that would be accepted by Google's servers.

talk.google.com is however the network hostname of the actual machine
that is hosting Google's XMPP service, that is the one running their
XMPP server software (in reality Google have lots of servers behind
this address, but we can ignore that detail for now).

In the same way that users have email addresses like us...@example.com
and not us...@mail.example.com, it is preferred to have XMPP addresses
as us...@example.com rather than us...@xmpp.example.com. In both email
and XMPP, you can use DNS records to "redirect" to another network
hostname if you need to. For example you could have DNS records for
"example.com" that indicate that the email server runs at
"mail.example.com", and others to say that the XMPP server runs at
"xmpp.example.com".

Now, to get onto your question... what do you want to change? The XMPP
host or the network host? The XMPP host (this is the one you specified
with a VirtualHost in your Prosody config file) is practically
impossible to change, because even if you changed it, you would have a
totally new XMPP address... there is no way for other servers (such as
Google's) to know that you are the same person - in fact they will
treat you as a completely different person, and you will need to
re-add your contacts and (unfortunately) they will need to
re-authorise you.

If you are just changing your network hostname however, this is much
easier. All you have to do is change your DNS records (say from
'talk.example.com' to 'xmpp.example.com'). This is completely
transparent to Prosody, your XMPP address won't change, you don't need
to change your config, and you won't need to re-add any of your
contacts. More info on DNS records for XMPP is available at
https://prosody.im/doc/dns

Also you mentioned certificates. They should match your XMPP host, not
your network host. You can test their correctness using
https://xmpp.net/ - and docs are available at
https://prosody.im/doc/certificates

Hopefully you find this info helpful, and not too much (I'm quite
sleepy as I write this, so I hope it makes sense). If you have any
other questions or problems, let us know.

Regards,
Matthew

Lukas H

unread,
Jun 30, 2014, 4:28:25 PM6/30/14
to prosod...@googlegroups.com
Matthew,

Thanks ...

On 2014-06-28 15:50, Matthew Wild wrote:
Hi Luke,

On 28 June 2014 22:45, Lukas H <stefanleinweber-R9L...@public.gmane.org> wrote:
Hi,

I set up prosody some time ago using talk.example.com (mimicking Google
 ) and have many people on my list. However, I am still the one user
on my server, most of the others are Google Chat users.

Now I would like to change the name to xmpp.example.com. What are the
implications for that and what is the best procedure to do that?
There are two different levels of "hostname" in XMPP that you might be
talking about - it's important not to get the two confused.
Of course, sorry I was not clear about that.
[...]

[...] It is important to note that
"talk.google.com" is not an XMPP host - user-CNS3W4et...@public.gmane.org is not an
address that would be accepted by Google's servers.
talk.google.com is however the network hostname of the actual machine
that is hosting Google's XMPP service, that is the one running their
XMPP server software (in reality Google have lots of servers behind
this address, but we can ignore that detail for now).
Ok, did not know that regarding google.

My current setup is:

Actual Server (FQDN): server.example.com
XMPP host: talk.example.com

And therefore DNS entries:

$ORIGIN example.com.
_xmpp-client._tcp.talk  IN SRV 0 5 5222 server.example.com.
_xmpp-server._tcp.talk  IN SRV 0 5 5269 server.example.com.

[...]
Now, to get onto your question... what do you want to change? The XMPP
host or the network host? The XMPP host (this is the one you specified
with a VirtualHost in your Prosody config file) is practically
impossible to change, because even if you changed it, you would have a
totally new XMPP address... there is no way for other servers (such as
Google's) to know that you are the same person - in fact they will
treat you as a completely different person, and you will need to
re-add your contacts and (unfortunately) they will need to
re-authorise you.
Ok, that's really sad. As you can bee above, this is the scenario.

Is it possible to have two identical XMPP address spaces mapped
together? So that I could create a new "xmpp.example.com" and leave
"talk.example.com" as an alias so that current user don't experience any
problems but I can still give lu...@xmpp.example.com to new users?

In that regard: Is there any "best practice" how XMPP hosts should be
organized? For example, for SMTP it is de-facto standard and best
practice to map it to the domain rather than a server or usually a
subdomain. E.g. you will find us...@example.com rather than
us...@smtpserver.example.com or us...@mail.example.com.

I ask myself if I should map my XMPP users just under example.com or if
I should use a dedicated XMPP "domain" as I currently have like
talk.example.com or xmpp.example.com.

(I know that's an open question but I would be interested what admins
usually pick).



Thanks
Luke



Matthew Wild

unread,
Jun 30, 2014, 5:29:48 PM6/30/14
to Prosody IM Users Group
On 30 June 2014 21:28, Lukas H <stefanl...@nobaq.net> wrote:
> My current setup is:
>
> Actual Server (FQDN): server.example.com
> XMPP host: talk.example.com
>
> And therefore DNS entries:
>
> $ORIGIN example.com.
> _xmpp-client._tcp.talk IN SRV 0 5 5222 server.example.com.
> _xmpp-server._tcp.talk IN SRV 0 5 5269 server.example.com.

> Is it possible to have two identical XMPP address spaces mapped
> together? So that I could create a new "xmpp.example.com" and leave
> "talk.example.com" as an alias so that current user don't experience any
> problems but I can still give lu...@xmpp.example.com to new users?

Unfortunately not. Ok, it *is* technically possible, but with lots of
compromises and weird behaviours - it's nothing like domain aliasing
in the email world. Prosody would have to maintain multiple contact
lists for you, figure out which one to use and when, and merge them
into a single contact list for your client.

It ends up much easier to have two domains configured, and use a
client that supports multiple accounts (which most do). Maybe you can
gradually phase out the second account over time.

> In that regard: Is there any "best practice" how XMPP hosts should be
> organized? For example, for SMTP it is de-facto standard and best
> practice to map it to the domain rather than a server or usually a
> subdomain. E.g. you will find us...@example.com rather than
> us...@smtpserver.example.com or us...@mail.example.com.
>
> I ask myself if I should map my XMPP users just under example.com or if
> I should use a dedicated XMPP "domain" as I currently have like
> talk.example.com or xmpp.example.com.
>
> (I know that's an open question but I would be interested what admins
> usually pick).

The general preference is to have it on the bare domain. The subdomain
is unnecessary, an extra thing to remember, and just makes the address
longer. Most services I know that have a subdomain regret it, but it's
now too hard to change. Because of this we have already added a check
in the next Prosody version - it will warn you if you do use a
subdomain like "xmpp", "chat", etc. - just because it's something that
is hard to change if you realise you don't want it later on.

Regards,
Matthew
Reply all
Reply to author
Forward
0 new messages