setting up google apps for chat with xmpp clients other than google talk

so let’s say you decide to host a domain on google apps. cool. i do. i like it. but you want to use the google chat feature. great, log into webmail and there’s a cute little one built in. but let’s say you want to use a free-standing client. okay, all you have to do is download the google talk client and go to town. except it’s only available for windows. what if you (or people you are giving accounts to) use linux or mac? (or you have a windows chat client you already prefer to use.) google chat is an xmpp-based server, and there are plenty of xmpp clients. but how do you get it to work with your domain?
unfortunately, the google apps help doesn’t tell you. the best it currently does is this. it tells you how to set up some srv records so other xmpp/jabber servers can communicate with users on your domain. but what about getting regular old xmpp clients connecting?
the answer is a different set of srv records. the two the google help page provides are srv records for xmpp-server and jabber entries — server info for xmpp/jabber servers that connect on port 5269. what you need are xmpp-client srv entries. xmpp clients connect on port 5222. (newer server/clients do unencrypted or tls over this same port. older server/clients do ssl over port 5223. not that it matters with the google xmpp servers, but i thought i’d throw that in.) anyway, you just need to follow the directions the google help page provided above as far as creating srv records, but change the records slightly:
_xmpp-client._tcp.YOURDOMAIN. IN SRV 5 0 5222 xmpp-server.l.google.com.
_xmpp-client._tcp.YOURDOMAIN. IN SRV 20 0 5222 xmpp-server1.l.google.com.
_xmpp-client._tcp.YOURDOMAIN. IN SRV 20 0 5222 xmpp-server2.l.google.com.
_xmpp-client._tcp.YOURDOMAIN. IN SRV 20 0 5222 xmpp-server3.l.google.com.
_xmpp-client._tcp.YOURDOMAIN. IN SRV 20 0 5222 xmpp-server4.l.google.com.
just replace “YOURDOMAIN” with…well…your domain (such as failure.net or diablostejanos.com — except those are mine) and once the dns records push out your xmpp client (such as pidgin, adium, ichat, whatever) should work by putting your domain in as the jabber/xmpp server and using your username (email account) and password. note that the only thing that changed from the ones in the google help doc is it’s “_xmpp-client” instead of “_xmpp-server” and “5222” instead of “5269”. basically, your xmpp client will look at the domain you entered and look up the srv records for your domain to get the info on where to connect. (if not, you might need to get a newer or classier client.)
no, i didn’t figure this out myself. i did some poking around and found a few sites mentioning this, as well as some threads in the google apps discussions. here’s one of the current top links based on the search i did:
http://victortrac.com/migrating-to-Google-Apps
but i figure i’ll go ahead and add my voice to the people mentioning this.

Leave a Reply

Your email address will not be published. Required fields are marked *