I’ve registered several domains using Google Apps. Lately I’ve been fiddling with using Jabber with those domains, and I wanted to have a program be able to interact on IM using an account like tim@example.com. Furthermore, I wanted to have everything Just Work.
The place to start was with DNS. Google has a help page about how to setup your DNS so that your Google Apps accounts can be federated with other non-Google Jabber communities. The problem is that neither xmpp4r-simple nor iChat simply work if I use tim@example.com as my JID. Then I stumbled across this post that connected the dots for me.
Here’s a screenshot of how I setup my SRV records over at eNom:

After that, my simple chat listener worked:
im = Jabber::Simple.new(“tim@example.com“, “secret-password“)
puts im.connected?
im.accept_subscriptions = true
while true
sleep(5) unless im.received_messages?
im.received_messages {|msg| puts msg.body if msg.type == :chat }
end
My little “bot” silently accepted new buddy requests, and printed out recent messages every 5 seconds.
UPDATE: Something’s amiss here, I think. I’ll update when I have more details. Guess not. I tried this out on another domain, and thought that things didn’t work right. But I was mistaken. Everything looks good.


February 11th, 2008 at 09:58
Works for me… thanks for taking the time to write this as last time I tried to get Jabber::Bot up and running with Google Talk I was getting connection errors and didn’t dig deep enough to see that Google had omitted the _xmpp-client._tcp.$domain records from their Google Apps documentation. I’ll see about getting the offending article (http://www.google.com/support/a/bin/answer.py?answer=34143) updated!
February 17th, 2008 at 11:48
[...] talk services, you have to add some SRV records to your domain, and there’s a few very useful pages out there on sorting this out. To summarise them, at the moment my understanding is that the [...]