tags:

views:

238

answers:

3

Hi, I'm looking for a way to check if a server is support xmpp protocol, i.e. xmpp-server is running on this domain.

Maybe special DNS check or something like that?

A: 

You can try IMtrends: http://www.process-one.net/en/imtrends/

Adam Goode
Wow, thanks for your very fast reply :)I forgot to mention that I'm looking for an automatic way.This check will be regularly performed in my app.
Anton Mironov
+2  A: 

Most XMPP servers should support at least one of these DNS SRV records:

  • _xmpp-server._tcp.example.com
  • _xmpp-client._tcp.example.com

Some servers may not have these records published, but most of those will not want to talk to the outside world. As an example, you can use "dig" on the command line to check a domain, like this:

% dig +short -t SRV _xmpp-server._tcp.gmail.com.
20 0 5269 xmpp-server2.l.google.com.
20 0 5269 xmpp-server3.l.google.com.
20 0 5269 xmpp-server4.l.google.com.
5 0 5269 xmpp-server.l.google.com.
20 0 5269 xmpp-server1.l.google.com.

"+short" gets rid of a lot of DNS details, "-t SRV" says we want SRV records, and the dot at the end says to ignore your local domain name settings.

Joe Hildebrand
+1  A: 

Following Joe's explanation, I personally would check SRV records and fall back to a quick (short timeout) connect check on port 5269. Then cache the result.