Configuring instant messaging in Zarafa WebApp

From Zarafa wiki

(Difference between revisions)
Jump to: navigation, search
m
Line 23: Line 23:
Include in the /etc/apache2/sites-enabled/zarafa-webapp the following 2 lines:
Include in the /etc/apache2/sites-enabled/zarafa-webapp the following 2 lines:
-
  ProxyPass /http-bind http://jabber.example.com:7070/http-bind/
+
  ProxyPass /http-bind http://jabber.example.com:5280/http-bind/
-
  ProxyPassReverse /http-bind http://jabber.example.com:7070/http-bind/
+
  ProxyPassReverse /http-bind http://jabber.example.com:5280/http-bind/
The jabber server has to enabled with the http binding stuff.
The jabber server has to enabled with the http binding stuff.
Line 48: Line 48:
Download the authentication script from https://community.zarafa.com/pg/plugins/project/6450/developer/milo/zarafa-webapp-ejabberd-authentication-script and place it in /usr/local/bin/jabberauth.php. Make sure php-cli is installed and the script is executable from the commandline.
Download the authentication script from https://community.zarafa.com/pg/plugins/project/6450/developer/milo/zarafa-webapp-ejabberd-authentication-script 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
  chmod 775 /usr/local/bin/jabberauth.php
Now the jabber client should be logged in, when you login to the 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.
It's required that the webapp loginname is the same as the jabber loginname, otherwise it will fail.

Revision as of 18:18, 7 March 2012

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 http://www.ejabberd.im/tutorials.


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 http://jabber.example.com:5280/http-bind/
ProxyPassReverse /http-bind http://jabber.example.com:5280/http-bind/

The jabber server has to enabled with the http binding stuff.

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

/etc/apache2/mod-enabled/proxy.conf.


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 https://community.zarafa.com/pg/plugins/project/6450/developer/milo/zarafa-webapp-ejabberd-authentication-script 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

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