ClearOS Documentation



301 error for file:

User Tools

Site Tools

Zarafa on Clearos 5

Zarafa demo login

Zarafa is now available through the Marketplace. The Community Edition is available for a small one time fee, while the Professional and Small Business are available with standard Zarafa pricing. The following document is here for historical purposes only.

Before you start

Necessary and configured ClearOS modules:

  • LDAP
  • SMTP Server module
  • MySQL database server module (optional)
  • Web server module (optional)

Installing Packages

Please login to the console or via 'ssh root@[clearosIP]' as you will need root rights

The Zarafa Collaboration Platform (ZCP) combines the usability of Outlook with the stability and flexibility of a Linux server. It features a rich web-interface, the Zarafa WebAccess, and provides brilliant integration options with all sorts of clients including all most popular mobile platforms.

The following will install and configure the webmail so that it authenticates against ClearOS users defined in the webconfig. It will configure Postfix so that all mail is delivered to the Zarafa inbox. The contacts list and calendars will function and can be shared

Please note that Zarafa is intended as a full gateway solution, and therefore you can configure it to run all your POP / IMAP access via the Gateway service. However in this scenario email will only be delivered to Zarafa's Users Inbox, and not ClearOS Users mailbox. It also supports much more complicated mail hosting setups. Please refer to the documentation for guidance.

Setup the community repo:-

rpm --import
rpm -Uvh
yum --enablerepo=timb install app-zarafa 

And the following work around to fix the webaccess attachment upload

cd /usr/share/zarafa-webaccess/client/widgets/
tar zxvf swfupload-zarafa.tar.gz


yum --enablerepo=timb upgrade zarafa zarafa-webacess

Please note if you have installed the zarafa-licensed RPM from Zarafa you will need to remove it before upgrading. It can safely be installed again post install (see below)

Testing versions can be installed using

yum --enablerepo=timb-testing upgrade zarafa zarafa-webaccess

For 6.40.x to 7.0.x

Upgrading from 6.40.x requires manual intervention to update the database. Your MySQL database will grow by up to 20% during this process which is normal.

yum --enablerepo=timb-testing upgrade zarafa zarafa-webaccess
#important! to fix issues with libvmime upgrade please run:-
service zarafa-server start
# review server.log - zarafa-server will stop after initial restart stating that you need to run the upgrade script
tail -f /var/log/zarafa/server.log
yum install MySQL-python
# Dump your existing database as a backup!
# For system-mysql (find your system password in /etc/system/databases)
/usr/share/system-mysql/usr/bin/mysqldump -uroot -pPASSWORD -v --quick --single-transaction zarafa | \
gzip > /var/tmp/zarafa-mysql-dump.gz
# For Mysql
/usr/bin/mysqldump -uroot -pPASSWORD -v --quick --single-transaction zarafa | \
gzip > /var/tmp/zarafa-mysql-dump.gz
# run the upgrade script, note may take substantial time
python /usr/share/zarafa/zarafa7-upgrade

WAIT! don't end the script or you risk breaking your system, completed in 5-10 minutes for a small database. You should see something like:-

Converting database to Unicode: 4 / 4 (100%)
Update stores table usernames: 2 / 2 (100%)
Converting rules to Unicode: 2 / 2 (100%)
Converting search folders to Unicode: 7 / 7 (100%)
Converting properties for IO performance: 26872 / 26872 (100%)
Creating counters for IO performance: 16 / 16 (100%)
Creating common properties for IO performance: 4 / 4 (100%)
Creating message attachment properties for IO performance: 2 / 2 (100%)
Creating tproperties for IO performance: 26871 / 26871 (100%)
Converting hierarchy for IO performance: 26871 / 26871 (100%)
Creating deferred table for IO performance: 1 / 1 (100%)
Converting changes for IO performance: 55839 / 55839 (100%)
Converting names table to Unicode: 1 / 1 (100%)

Assuming everything went OK, restart the services and monitor the logs

service zarafa-server start
service webconfig restart


Go to the Webconfig|Server|Mail|Zarafa and finish the configuration.

If you are installing the first time, make sure you select your database type. You can use either the System-Mysql database (which is used by Horde and the webconfig) or the normal “user” Mysql instance. The former is preferred as it means you do not need to setup Mysql if you don't need it, and your data is less likely to be inadvertently removed.

For “user” mysql you will also need to enter your MYSQL root password, so that Zarafa can create the database for mail storage.

Now you will also need to add users or your domain to the Email delivery configuration. Here you can specify specific users mail to be delivered via the Zarafa mail system, in the format ''. This way other users email will still be accessible via Horde etc. Or you can specify the whole domain to be delivered to Zarafa by adding ''.

NOTE: If you use Fetchmail for mail retrieval it will be directed to Therefore to have this passed to Zarafa also add

Disable the ClearOS IMAP/POP services before enabling the Zarafa-Gateway Service. Or change the ports to prevent clashes

Now start the 3 CORE services, Zarafa-Dagent, Zarafa-Spooler and Zarafa-Server.

Finally navigate to and login. If you have the web server running, you can also use

Z-Push ActiveSync

Z-push which offers ActiveSync support for remote devices is available as an rpm

yum --enablerepo=timb-testing install zarafa-z-push
service httpd restart
service webconfig restart
vi /etc/zarafa/z-push/searchldap.php
#change LDAP_BIND_USER,LDAP_BIND_PASSWORD and LDAP_SEARCH_BASE to values from the webconfig LDAP

There is also a forum thread for more info HERE

(Optional) Outlook MAPI Connectivity

NOT required for normal IMAP/POP3 or Webaccess

rpm -Uvh --nodeps zarafa-licensed-7.0.5-31880.i386.rpm
service zarafa-licensed restart
service zarafa-server restart

Note that the community edition has a limit of 3 Win32 MAPI users. If you review /var/log/zarafa/licensed.log you should now see the presence of the licensed module. If you have a license - save it to /etc/zarafa/license/

Mon 18 Jan 2010 12:34:20 PM GMT: Starting zarafa-licensed version 6,40,5,24860 (20653), pid 16640
Mon 18 Jan 2010 12:34:20 PM GMT: Serial in '/etc/zarafa/license' is invalid. Assuming default 3-user license
Mon 18 Jan 2010 12:34:20 PM GMT: License is for 3 Win32 MAPI users

Install the zarafa-client MSI installer to your client PC. This will enable “Zarafa 7” as a new outlook mail server type. Follow steps to create a new user Mail profile from Control Panel selecting 'Other type of account' then select Zarafa 6. You can download ZarafaClient or direct from


For more details read the user manual, which is very good. You can now use Outlook as if it was connected to Exchange, share contacts, folders, calendars, public folders etc. Zarafa Documentation The User Manual, describes how to use ZCP from a user's view point. It discusses:

  • Outlook integration by using the Zarafa Windows Client,
  • using the web-interface of the Zarafa WebAccess,
  • connectivity with CalDAV and iCal enabled clients, and
  • syncing with mobile platforms like: BlackBerry, Google Android, Windows Mobile and Apple iPhone.


You can find details for migrating outlook users here, and also using imapsync Zarafa Migration PDF

For example you can use the imapsync tool to copy files from one IMAP mailbox to another. Setup the zarafay-gateway service (in this case set IMAP to port 8143), and transfer from the existing ClearOS IMAP service on port 143. (Add the –dry option to trial options first). If you wish to delete the mail from the original IMAP add –expunge1 –delete)

imapsync \
--host1 --user1 yourusername --password1 yourpassword --prefix1 INBOX  --authmech1 LOGIN \
--host2 --user2 yourusername --password2 yourpassword --prefix2 INBOX --authmech2 LOGIN \
  --subscribe --sep2=/ --useheader 'Message-ID' --skipsize

IMAPS / POP3S Gateway Config

Copy the system certificates to the right place:-

cp /etc/postfix/key.pem /etc/zarafa/gateway/privkey.pem
cp /etc/postfix/cert.pem /etc/zarafa/gateway/cert.pem

Then navigate to the System|Certificate manager in the webconfig, click the , then click . You should then be prompted about accepting the security certificate on your local machine. This will install the ClearOS cert so that it can certify it's own certificates, otherwise you will get a warning on the client every time you connect about “no certficate authority”. Alterntively pay for a signed certficate from a recognised authority and upload it to your box.

Then enable IMAPS and POP3 in the Zarafa config, press

Now configure your client to use relevant port (eg 993 for IMAPS) and select SSL as the encryption (auto didn't work well for me). It should connect as per the IMAP or POP settings.

Spam Training / Bayesian Learning

The ClearOS Spam system can be trained to make it more efficient using mail from Zarafa Webaccess. See the Howto in the forum HERE

Known Issues

  • Mail archive will only work if the ClearOS IMAP service is left running
  • Zarafa-Gateway POP3/IMAP ports conflict with ClearOS POP3/IMAP so change the ports manually or disable the ClearOS mail services.

Problem Solving

If you have problems check the respective log files in /var/log/zarafa/ If zarafa-server fails to run on boot, try editing the “run_as_user” in /etc/zarafa/server.cfg to root and let us know (Thanks to Keil Gyozo for spotting this one)

content/en_us/kb_howtos_zarafa_-_legacy.txt · Last modified: 2014/12/23 17:35 by dloper