Configuring instant messaging in Zarafa WebApp

From Zarafa wiki

Jump to: navigation, search

The Zarafa WebApp includes a instant messaging plugin from revision 31187. The instant messaging plugin allow you to see the presence of your colleagues and start a chat conversation with them.

The instant messaging has to be integrated with an existing XMPP/Jabber server.

This howto describes how the instant messaging plugin can be integrated with an ejabberd server. This article will not describe the installation and configuration steps of ejabberd. For more information about these steps, please check

WebApp configuration

The instant messaging (xmpp) plugin is by default available in the WebApp plugins directory. To configure the xmpp plugin insert the jabber domain in the option PLUGIN_XMPP_CONNECT_DOMAIN in the config.php in the xmpp plugin directory.

There is at the moment no way of authenticating the user from the jabber client itself, this has to be done at the webapp login session.

Apache configuration

The jabber webapp client is using the http-bind method for realtime notifications. To support this, the Apache configuration has proxy some http-bind urls.

Include in the /etc/apache2/sites-enabled/zarafa-webapp the following 2 lines:

ProxyPass /http-bind
ProxyPassReverse /http-bind

The jabber server has to enabled with the http binding stuff. To use the http bind, the following has be available in the module section of the ejabber.cfg file.

{mod_http_bind, []},

Restart apache to make the changes active.

To verify if the changes are active, please go to http://servername/http-bind. This should redirect you to the ejabberd http-bind page. If this doesn't happen, please check if proxy passing is enabled in


ejabberd configuration

For the ejabberd setup the authentication method has to be extended with a custom script. Please add to the ejabber.cfg this lines:

{auth_method, \[ldap, external\]}
{extauth_program, "/usr/local/bin/jabberauth.php"}

The default authentication can still be ldap, but an extra authentication will done over the external script jabberauth.php.

Download the authentication script from and place it in /usr/local/bin/jabberauth.php. Make sure php-cli is installed and the script is executable from the commandline.

mv ejabberd-extauth.php /usr/local/bin/jabberauth.php
chmod 775 /usr/local/bin/jabberauth.php

When running the WebApp on a different server than the ejabberd, change the webapp url in the following line in the auth script:

$auth->zarafa_urls = array("http://<ip-address>/webapp");

Now the jabber client should be logged in, when you login to the webapp. It's required that the webapp loginname is the same as the jabber loginname, otherwise it will fail.

Personal tools