XMPP integration (with ejabberd and converse)
hede
kolab983 at der-he.de
Mon Feb 24 09:34:23 CET 2014
Hi list.
This is some kind of an experience report, successful in the end.
Last sunday I played a bit with converse and ejabberd. Ejabberd was quickly
integrated and usable via pidgin, cribbing from [1]. I use "alias" instead
of "mail" for ldap_uids, so my users can use their aliases as jabber
accounts [6].
But using converse was a little tricky, even there's some help from [2].
First, there's an additional parameter. I had to activate [3] in the modules
section in /etc/ejabberd/ejabberd.cfg.
After that I was able to connect to ejabberd via BOSH and pidgin, but converse
inside roundcube was always "disconnecting" (in red) right after logging in.
I must have dismissed the part where someone points out the difference
between 'converse_xmpp_bosh_prebind_url' and 'converse_xmpp_bosh_url' in
the converse config.
The former one is the url where the server side scripts (converse php scripts)
will connect to and the later one is used by the javascript part of converse
to find the relative path to communicate to the ejabberd daemon.
I thought converse*js would talk to the jabber server via its server-part.
But instead it tried to connect to https://mydomain.com:443/http-bind,
because roundcube sits on an apache listening on port 443 and "/http-bind"
is relative to this. The Javascript part of converse want's to directly
connect to the jabber server. A fact you have to know...
So I simply added a file [4] to apache with [5] as its content.
It took me hours to spot my fallacy.
Now I have instant messaging inside of roundcube. :-)
And because the kolab_uid is one of the mail aliases, it's simply working
for one of the users aliases.
Thanks.
hede
[1] http://permalink.gmane.org/gmane.comp.kde.kolab.devel/12146
[2] http://kolab.org/blog/grote/2014/01/29/chat-coming-kolab-jabber-xmpp-integration
[3]
{modules,
[...]
{mod_http_bind, []}
[...]
]}.
[4] /etc/apache2/sites-enabled/ejabberd
[5] ProxyPass /http-bind http://localhost:5280/http-bind/
[6] Either use {ldap_uids, [{"alias", "%u <at> domain.com"}]} or
{ldap_uids, [{"uid", "%u"}]} with ejabberd. The recommended
{ldap_uids, [{"mail", "%u <at> domain.com"}]} won't work with
'kolab_uid' for 'converse_xmpp_username' in the converse config.
More information about the users
mailing list