These days more and more people are using google apps suite. Among other things, this way people get “google talk” (actually jabber) accounts with custom domain part (e.g. JID may be user@googledomain.com).
These custom-domain JIDs work well to chat from within google talk, but when using a custom jabber client connected to a custom jabber server, an issue raises: jabber server needs somehow to locate server to talk to. JID domain part is no longer points to server to connect.
This is actually similar to e-mail. To get SMTP server to connect, special DNS request (type MX) has to be performed. With XMPP servers solution is similar – DNS request of type SRV should be performed.
Problem is that it requires domain-owner-side configuration, such as described here. And domain owner may be unable or unwilling to set this up.
Fortunately, if you run your own jabber server, you may workaround this at your side. Just use DNAT on the host running server. For example, to redirect JIDs for @googledomain.com to google talk servers, try
iptables -t nat -A OUTPUT -p tcp -d googledomain.com --destination-port 5269 \
-j DNAT --to-destination $(getent hosts xmpp-server.l.google.com | awk '{print($1)}')
This is for case when googledomain.com resolves to particular IP address. In case it resolves to several (which may be the case if entire domain is served by google apps), you will need to add such a rule for each of these addresses.
English