[JDEV] Jabber server redirection

Thomas Parslow (PatRat) tom at almostobsolete.net
Wed Feb 20 09:10:00 CST 2002

> I would like to be able to set up jabber in my company so that people can
> have a jabber ID of id at company.com, rather than id at jabber.sub.company.com
> when we run a server on jabber.sub.company.com.  Is there a way to do that,
> or a plan to be able to do that at some point?  It's conceivable that I'd
> be able to run a small redirection server on the machine called company.com,
> but it has to use very little resources because the primary purpose of that
> machine is web service.  In fact, I'm thinking I might want to set up
> the redirection server to lookup up IDs in a database and redirect people
> to different servers for load balancing.  Any suggestions?
> Thanks,
> - Dave Dykstra


How about using SRV record for the domain? The Jabber server should
recognize the SRV record (it's supported it since 1.2 afaik) and
connect to wherever it points to for S2S. You'd need to add something
like this to the DNS zone for company.com:

_jabber._tcp    IN SRV  30 30 5269 jabber.sub.company.com

The problem with this is getting the clients to connect to the correct
server, if you just set them to connect to "jabber.sub.company.com" then
they will send "jabber.sub.company.com" as the to attribute of the
opening <stream:stream> tag which makes the server look for
"jabber.sub.company.com" in the spool directory.

The only solution I can see to this is for clients to support
connecting to an address which is different from the server name. In
the client I am developing I allow the user to specify the name of the
server in the username field by entering it in the form:
user at server.com.

Does anyone have any other ideas on how to do this?

Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
Please leave quoted text in place when replying

More information about the JDev mailing list