I’ve just been setting up jabber.

I followed the advice from System Monitoring on setting up ejabberd [1]. I had previously tried the default jabber server but couldn’t get it working. The ejabberd is written in Erlang [2] which has it’s own daemon that it launches. It seems that Erlang is designed for concurrent and distributed programming so it has an Erlang Port Mapper Daemon (epmd) to manage communications between nodes. I’ve written SE Linux policy for epmd and for ejabberd, but I’m not sure how well it will work when there are multiple Erlang programs running in different security contexts. It seems that I might be the first person to try running a serious Jabber server on SE Linux. The policy was written a while ago and didn’t support connecting to TCP port 5269 – the standard port for Jabber inter-server communication and the port used by the Gmail jabber server.

The ejabberd has a default configuration file that only requires minor changes for any reasonable configuration and a command-line utility for managing it (adding users, changing passwords, etc). It’s so easy to set up that I got it working and wrote the SE Linux policy for ejabberd in less time than I spent unsuccessfully trying to get jabber to work!

It seems that Jabber clients default to using the domain part of the address to determine which server to talk to (it is possible to change this). So I setup an A record for pointing to my Jabber server, I’ll have the same machine run a web server to redirect to

For Jabber inter-server communication you need a SRV record [3] in your zone. I used the following line in my BIND configuration:

_xmpp-server._tcp IN SRV 0 5 5269

Also for conferencing the default is to use the hostname “conference” in the domain of your Jabber server. So I’ve created to point to my server. This name is used both in Jabber clients and in sample directives in the ejabberd configuration file, so it seemed too difficult to try something different (and there’s nothing wrong with conference as an A record).

I tried using the cabber client (a simple text-mode client), but found two nasty bugs within minutes (SEGV when a field is missing from the config file – Debian bug #503424 and not resetting the terminal mode on exit – Debian bug #503422). So I gave up on cabber as a bad idea.

I am now testing kopete (the KDE IM client) and GAIM aka Pidgin. One annoying bug in Kopete is that it won’t let me paste in a password (see Debian bug #50318). My wife is using Pidgin (formerly known as GAIM) on CentOS 5.2 and finding it to work just as well as GAIM has always worked for her. One significant advantage of Pidgin is that it seems impossible to create a conference in Kopete. Kopete uses one window for each chat and by default Pidgin/GAIM uses a single window with a tab for each chat (with an option to change it). I haven’t seen an option in Kopete to change this, so if you want to have a single window for all your chats and conferences with tabs then you might want to use Pidgin/GAIM.

Another annoying thing about Kopete is that it strictly has a wizard based initial install. I found it difficult to talk my mother through installing it because I couldn’t get my machine to see the same dialogs that were displayed on her machine. In retrospect I probably should have run “ssh -X test@localhost” to run it under a different account.

7 comments to Jabber

  • Try PSI as a Jabber client. I’ve been using it for some time and it’s quite good. For me the major advantage is that it’s the same UI between Windows and Linux, as I have to use the inferior OS for work. Even if you’re just using Linux, it’s got a very clean, simple UI.

  • Anonymous

    I recently set up a Jabber server myself, and I found jabberd2 far easier to set up and use than either jabberd or ejabberd.

  • Where did you find useable docs about ejabberd? The ejabberd web site seems to lack beginner-level docs and only documents a few side aspects of ejabberd.


  • moi1392

    “Kopete uses one window for each chat and by default Pidgin/GAIM uses a single window with a tab for each chat (with an option to change it). I haven’t seen an option in Kopete to change this”

    there is an option to change this in kopete (both, 3.5 and 4.0)

    settings -> configure… -> comportement -> chat -> chat window grouping policy -> you can select here the behavor you want.

  • Reasonably up-to-date XMPP clients will use _xmpp-client._tcp SRV records to find their server (for instance, see `host -t any`). Older clients can probably be forced to connect to a particular server.

    The client address only affects users of your particular server, so the criterion for whether you can get away with using a SRV record is just “all my users have up-to-date clients” rather than “everyone I talk to has an up-to-date client).

  • etbe

    Simon: PSI doesn’t seem to be included in Debian/Lenny. Being in Debian is very important to me (maintaining packages outside of Debian is just a pain).

    Marc: The ejabberd site returned (via google) the information I needed from it (the settings for MUC). Everything else worked after I tweaked the commented settings in the configuration file. Given a choice between a project with good documentation and a project that just works (as ejabberd did for me) I’ll choose the one that just works.

    moi1392: Thanks for that.

    SMcV: That’s good to know.