Category Archives: Zarafa

Home / NAS / Zarafa
5 Posts

A Zarafa user using Outlook 2010 complained that he suddenly was unable to reply to a message from a mailbox from another user he had access to. When he clicked ‘reply’ in Outlook the only vague message he gets was: The attempted operation failed. An object could not be found.


The message isn’t very informative; it doesn’t contain any clues. After some research it turned out that this was caused after installing Outlook update kb3114756. This update breaks some functionality of the Zarafa Outlook client. (More precise: the update changed functionality the Zarafa Outlook client can’t handle.) After uninstalling this update the user was able to reply to messages in other mailboxes again.

To ensure this update does not installs again the next update cycle, the update can be made hidden. A TechNet article describes in general how to hide an update. If you do this with the update mentioned before, you’ll be good for the next update cycles. Before you do this, make sure you read the article to decide if the fix doesn’t aply to you. If so, the user has to choose what functionality he prefers.

With the upcoming release of DSM 6 for Synology DiskStation it seems that you have to say goodbye to Zarafa on your Synology DiskStation. If you don’t own such a high-end DiskStation, you are screwed.

It’s a hard time to have Zarafa running on your DiskStation. It seems that the original developer (Julian Dohle) for the Zarafa packages has abandoned the project. There has been no development for over a year now and it is unlikely that there will be any development in the future. This will leave us with a Zarafa that is at least more than a year old and unmaintained. Despite the fact that Synology has offered you through the package center the installation of Zarafa, doesn’t mean they do the maintenance of it.

With the upcoming release of DSM 6 Zarafa has to be uninstalled from your DiskStation. (This is what the current beta releases shows at the moment.) There are several legitimate reasons for Synology to do so. It might have something to do with the fact that the project is abandoned and it might have something to do with the architecture of the new DiskStations. Synology introduces mailPLUS, mailPLUS server and mobile apps to offer a reliable e-mail solution.

The bad news is that mailPLUS server is (currently) only available for the following models:

  • 16-series: RS18016xs+, RS2416RP+, RS2416+
  • 15-series: RC18015xs+, DS3615xs, DS2415+, DS1815+, DS1515+, RS815RP+, RS815+, DS415+
  • 14-series: RS3614xs+, RS3614xs
  • 13-series: RS10613xs+, RS3413xs+,
  • 12-series: RS3412RPxs, RS3412xs, RS3612xs

That leaves all the other types with no alternative.

Another drawback is the fact that mailPLUS isn’t an Exchange replacement like Zarafa is. Zarafa also lets you manage your contacts and calendar and offers through Z-push an ActiveSync connector to connect all your mobile devices to that support Microsoft Exchange. (Synology offers dedicated apps for the functionality of mailPLUS.) For the calendar and the contacts, I haven’t found any alternative at Synologys website. For this you have to use another third party tool that only will synchronize these items. Last, but not least, you have to migrate your users to the new solution(s).

That brings us to the fact that it’s about time to make some decisions if you host Zarafa yourself. It’s clear that using Zarafa on your Synology DiskStation is a ‘no-go’. The software becomes vulnerable and the newest DSM doesn’t support it any longer. If you haven’t an alternative and rely on Zarafa you shouldn’t update DSM to version 6 until you have migrated your Zarafa users to a new solution. You can consider using Zarafa hosted by a hosting provider. You can even consider to use a hosted Exchange hosting provider, but it’s likely that the Zarafa hosting provider is cheaper. You also can use mailPLUS offered by Synology, but you probably can’t do an inplace upgrade to migrate the users’ mailboxes.

So, self-hosting Zarafa administrators on Synology, there is some work to do!


The out of office function seems not to work on Zarafa installations on Synology. I’ve read multiple posts on several forums from people complaining that this was a fact. Guess what, mine didn’t work too.There is a solution that requires some modifications on the file system and a slight modification in a Zarafa file. You’ll need something like Putty. This is how I did it:

Find out if you have the tr command is available.Type the following command on the console in Putty:

type tr

If you get the reply tr is /usr/bin/tr then the tr command is available. If it doesn’t you have to install the text tools trough ipkg in the console:

ipkg install textutils

Then create a symbolic link:

ln -s /usr/local/zarafa/bin/zarafa-autorespond /usr/bin/zarafa-autorespond

Now you have to set the correct access rights to the zarafa-autorespond file. Type in the console:

chown 755 /usr/local/zarafa/bin/zarafa-autorespond

The final thing to do is to edit the first line of the /usr/local/zarafa/bin/zarafa-autorespond with a text editor (Not Windows Notepad!). You can use WinSCP. It has a text editor on board.

Change #!/usr/bin/env bash in the first line into #!/bin/sh and save the file.

Now the Out of Office function on Zarafa will work.

This post assumes you have installed a valid SSL certificate on your web server. You can obtain a certificate from If you use this certificate provider, make sure you import their class 1 and class 3 root certificates in your Trusted Root Certification Authorities store.

You don’t want your users to access their Zarafa webmail over a plain HTTP connection. Instead of that you want to force them to use a HTTPS. You can accomplish this by altering the .htaccess file of /webapp/ and /webaccess/. Just add the following lines to .htacces:

SSLOptions +StrictRequire
ErrorDocument 403 "https://yourhost/webaccess/"

Make sure you alter ‘yourhost’ to your own domain and make sure you change webbaccess into webapp if you alter the .htaccess in the webapp folder.


Zarafa is a Groupware solution than can handle mail, calendars and contacts (among many other functions). It is a nice alternative for Microsoft Exchange. To use Zarafa with Microsoft Outlook, you have to install the Zarafa-client. This can be downloaded here. In the community-version three users are allowed to use Zarafa with Microsoft Outlook for free. On the other hand: the web client is sufficient for the most users an can be used by an unlimited amount of users.

There is no real plug-and-play package available to install Zarafa on a Synology NAS. There is a package in the Package Center and there is a newer package available on Synology’s download site but you still have to make some manual modifications. This post describes the things I had to do to make Zarafa work on my Syno. I mainly used the help published on Zarafa’s wiki-site.


I used the package from the download site of Synology and used version 0.3.3, witch contains Zarafa version 7.1.2 and Fetchmail 6.3.1. Besides that I intend to use Z-Push also to make it possible that my mobile device can sync with Zarafa. This can be downloaded from Zarafa Germany. Zarafa relies on a working Mail Server that can be installed through with the Package Center. I use BSMTP witch allows me more or less to have an unlimited amount of e-mail addresses without owning a domain. My Mail Station is already working with this. (Information about configuring other forms, ie. own domain or no domain at all can be found in the Mail Station documentation or elsewhere on the internet.) Please make sure not to enable IMAP/POP3 features of the Synology Mail Station when using Zarafa, to make sure that no conflicts occur in mail delivery. Zarafa stores it’s data (including users mailboxes!) in MySql. Make sure you have MySql up and running on your Synology NAS.
Last, but not least: Enable SSH access to your NAS.


The installation is a simple process. Just install Zarafa_0.3.3_x86.spk and Z-Push_2.0.6-0.spk with the install function of the Package Center. I don’t know if it matters, but I first installed Zarafa and then Z-Push. During the installation of Zarafa you’ll be asked for the root-password of your MySql. During installation you have no other option than using this account. This account also will be used during run time. It’s strongly advised to change the account, to avoid security issues. How this can be done is explained in the configuration section of this post.
The installation of Z-Push is straight forward. You might have to change the timezone in the config.php to your own timezone. This file can be found in the z-push folder in your www-root. Change it accordingly:

define('TIMEZONE', 'Europe/Amsterdam');


This section is explaining the actions I took to make Zarafa work. This is (unfortunately) done by changing several configuration files on the filesystem of your NAS. Make sure you make a backup of the file you are going to edit, before you actual edit it. This is the only way you have a smooth rollback that works without having to reinstall your complete NAS!

Create a user account on your NAS to let users deliver e-mail to Zarafa. In this post this user is named vmail and has administrator rights on the NAS.

Change MySql password

Create a new MySql account and assign this account all rights to the Zarafa database. This account will be used during run time of Zarafa. Open a SSH session to your NAS and open:

vi /etc/zarafa/server.cfg

Find the next section in server.cfg:

# The user under which we connect with MySQL
mysql_user = root
# The password for the user (leave empty for no password)
mysql_password =

Change the ‘mysql_user’ and ‘mysql_password’ values into the username and password you created in MySql for this purpose.
Stop and start the Zarafa package in the Package Center to make the changes effective.

MySQL adjustments

Zarafa complained in the log-file about a lack of max_allowed_packet in the MySQL configuration. It turned out this setting is being set as startup argument of MySQL. Therefor I made a modification and opened:

vi /usr/syno/etc/rc.d/

and change the folowing line as stated:


Save the file and restart your MySql server with:

/usr/syno/etc/rc.d/ stop
/usr/syno/etc/rc.d/ start

MAPI include files not found! problem

After that I tried to start the webaccess interface of Zarafa, but the only thing it showed was a message: MAPI include files not found!
It took a while Googling before I figured out I could work around this issue by creating a symbilic link to the web/webaccess/include/mapi/ folder in web/webaccess/ named ‘mapi’. This gives you the required web/webaccess/mapi folder in the right place. (The web/ folder is the rootfolder of your Web Station of your NAS. Depending on your disk configuration this folder can have different locations on the filesystem. ie. /Volume1/web/, /Volume2/web/) This solved the problem for me.

Mail handling by Zarafa

To enable Zarafa handling the mail from the Mail Server there are two files to be changed. (Please backup the originals before editing!) first open in the SSH console:

vi /var/packages/MailServer/target/etc/template/main.template

Comment the line:

home_mailbox = .Maildir/

and add these lines:

mailbox_transport = zarafa:
local_recipient_maps =
zarafa_destination_recipient_limit = 1

Save this file and open in the SSH console:

vi /var/packages/MailServer/target/etc/template/master.template

and add the Zarafa part:

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
zarafa    unix  -       n       n       -       10      pipe
 flags= user=vmail argv=/usr/local/zarafa/bin/zarafa-dagent $(user)
#submission inet n       -       n       -       -       smtpd

(Note: before ‘flags’ is a space!)

In order to get the changes in the mail server package template files affected, please stop and start the mail server package in the DSM package center. The above (from the start of this paragraph) also must be done when you update the MailServer of your DiskStation. This erases the main template and the master template.

There has to be added an admin user that can connect to any store to deliver e-mail. In the previous part of this post we created a user named vmail for this purpose. Open in the SSH console:

vi /etc/zarafa/server.cfg

Find the line containing local_admin_users and add vmail:

# local admin users who can connect to any store (use this for the zarafa-dagent)
# field is SPACE separated
# eg: local_admin_users = root vmail
local_admin_users       = root vmail

Restart the Zarafa package by running the following command in the SSH console:

/var/packages/Zarafa/scripts/start-stop-status restart


There is a logfile missing in the installation that stores the messages from the mailagent. This can simply being solved by creating the following file:


make sure that the access rights are xx2. (ie. write access for anyone.)


By default Zarafa stores attachements in the database. It is however possible to store them on the filesystem. You have to modify something in the server.cfg:

vi /etc/zarafa/server.cfg

Find the following part:

# Where to place attachments. Value can be 'database' or 'files'
attachment_storage = database
# When attachment_storage is 'files', use this path to store the files
attachment_path  = /var/lib/zarafa
# Compression level for attachments when attachment_storage is 'files'.
# Set compression level for attachments disabled=0, max=9
attachment_compression    = 6

Change the property attachment_storage into files and change the attachment_path to a location you please. (Make sure the vmail account has writeaccess to it!) You also might have to set the attachement_compression to 0 (disabled). There are some reports that Zarafa crashes when attachement_compression is set to a value not being 0.

The next thing to tells Zarafa to use the newly set values for the storage of attachments by executing the following command once in the SSH console:

zarafa-server -c /etc/zarafa/server.cfg --ignore-attachment-storage-conflict

This tells Zarafa to use the newly set values for the storage of attachments.

Restart the Zarafa package by running the following command in the SSH console:

/var/packages/Zarafa/scripts/start-stop-status restart

I’m now able to send an receive e-mail using Zarafa on my Synology by using webacces. (http://your_host_name/webaccess)
You can do some limited administration with the Administration tool found on your NAS.