Subdomains, Components and other such fun
mart at degeneration.co.uk
Wed Nov 15 20:19:53 UTC 2006
I really should have looked at this months ago, but a couple of people
were having trouble getting their external components working, reporting
that whenever they tried to add them various things seemed to stop working.
As it turns out, this is an accidental side-effect of how subdomains are
By default, DJabberd does only local (intra-vhost) delivery. If you just
have an empty VHost with no delivery plugins defined, local delivery is
what you get. However, as soon as you declare any delivery plugins the
local delivery plugin is no longer implicitly added.
As I noted previously, subdomains are just a shorthand for vhosts with
is roughly equivalent to:
Since there is now a delivery plugin defined, you must explicitly
declare the local delivery plugin, like this:
<Plugin DJabberd::Delivery::Local />
If you do the above, everything should work happily. Without that
explicit local delivery, the packets get from example.com users to the
subdomain and back, but then example.com doesn't know how to deliver the
packets to the right user so it looks from the outside like nothing is
I just tested this on the latest trunk using pyMSNt both in a subdomain
and a separate vhost with manual configuration. If there is any more
quirky behavior please let me know and I'll investigate some more!
My external component config looks like this:
This behavior with subdomains is of course non-obvious, but we can't
just assume that a domain with subdomains will have local delivery. I'm
not really sure what the right fix is here. If we make a subdomain still
imply local delivery, we need a way to explicitly disable local delivery.
More information about the Djabberd