Open-Xchange on Ubuntu 16.04 & Plesk Onyx

A client was in dire need of groupware for his growing company and settled for OX App Suite by Open-Xchange. The client would have been perfectly happy with paying for the full version of OX that includes support, but as it turns out, the commercial version is only offered to service providers — Bummer! This meant we had to make do with the Community Version, nonetheless a feature-rich and rock-solid solution.

The differences between OX App Suite and its Community Edition are outlined here.

These are my notes for installing OX 7.10 on Ubuntu 16.04 with Plesk Onyx 17.5.3.

Installing Open-Xchange

Although Ubuntu is not an officially supported distribution, installing Open-Xchange is indeed possible.

Because my target server was still on Ubuntu 16.04, I opted for the Open-Xchange Installation Guide for Debian 8.0.

This should run smoothly, if it weren’t for Plesk :)

Plesk Onyx 17.5.3 and mod_proxy

I triple checked the proxy configuration, enabled all debug logging, still couldn’t get it to work. I almost lost my mind before discovering that Plesk ships its own with package libapache2-mod-proxy-psa. Replacing with its original version from package apache2-bin did the trick.

mkdir /tmp/apache-bin ; cd /tmp/apache-bin
apt-get download apache2-bin
dpkg-deb -R apache2-bin*deb .
# checksum of currently installed mod_proxy
md5sum /usr/lib/apache2/modules/
# checksum of original mod_proxy
md5sum usr/lib/apache2/modules/

Note Plesk updates will most probably reinstate the modified

If anyone has the source code for Plesk’s mod_proxy, I’d love to see it! I’d really like to know what’s going on here.

Plesk & OX integration

Open-Xchange should work with any IMAP server. If you don’t have any preferences, I recommend installing dovecot through the Plesk installer/updater.

Open-Xchange APS

Installing the Open-Xchange APS package through Plesk’s application vault will enable basic integration with OX: Adding OX-enabled mail accounts in Plesk will automatically create OX accounts in the associated OX context through OX’s soap interface. Details are outlined here.

‘false’ is not my server

Just one little problem: The IMAP and SMTP URLs stored in the OX configuration always ended up as "imap://false:143" and "smtp://false:25", which is obviously broken. I have not yet dug into the issue, but it seems that some environment variables that are expected by the OX APS package are missing.

For a dirty fix you can monkey patch the OX APS package. First, find the offending file:

find /opt/psa/var/apspackages -name "configure-mbox.php"

In most cases, IMAP and SMTP will reside on localhost, so you can hardcode those:

--- configure-mbox.php
+++ configure-mbox.php-patched
@@ -188,8 +188,8 @@
 			'primaryEmail'	=> getUserEmail(),
 			'email1'		=> getUserEmail(),
 			'defaultSenderAddress' => getUserEmail(),
-			'smtpServer'	=> getenv('MAIL_account_SMTP_HOST'),
-			'imapServer'	=> getenv('MAIL_account_IMAP_HOST'),
+			'smtpServer'	=> 'smtp://localhost:25',
+			'imapServer'	=> 'imap://localhost:143',
 			'imapLogin'		=> getenv('MAIL_account_USER'),
 			# Hidden settings, to be configured by provider

Note Updating or reinstalling the OX APS package will reinstate the original version.

Dovecot supports several indexers to allow for fast full text searching. Dovecot recommends using Apache Solr through the Dovecot plugin fts_solr

On a usual Debian-based system, one would install this plugin through the package dovecot-solr and call it a day. But Plesk ships its own version of dovecot (plesk-dovecot) without Solr support, which conflicts with dovecot-solr.

One option is to build the fts_solr plugin manually.

mkdir /tmp/dovecot ; cd /tmp/dovecot
# check dovecot's version
apt-cache show plesk-dovecot | grep ^Version
# download dovecot's source for your version
tar xf dovecot-*tar.gz ; cd dovecot-*/
# install build dependencies
apt-get build-dep dovecot-core
# build dovecot with fts_solr
./configure --with-solr && make
# this is the needed plugin
ls -lh src/plugins/fts-solr/.libs/
# install
cp src/plugins/fts-solr/.libs/ \

Good luck & have fun!