Fernwartungsmodul herunterladen

Zarafa auf Raspberry PI - Und es geht doch!

Building Zarafa for and on the Raspberry PI
by Sebastian Krajenski, sk -at- mars-solutions.de, 04.Aug.2012
-A Quick Tutorial-

Base OS: Raspbian from here http://www.raspberrypi.org/downloads/
(NOT the former Debian Squeeze based one, now: armhf)

- Have MySQL, Apache2 and PHP5 installed (If anyone has Webaccess working with nginx, leave me a note)

Grab a complete copy of:
- http://download.zarafa.com/community/final/7.0/7.0.8-35178/sourcecode/

Follow roughly the compiling entry in the wiki:

- installing the needed development dependencies for Debian
(grab the libboost stuff in a Version < 1.49, I used 1.46)
- patching libvmime
- patching libical
- compiling catdoc, libvmime and libical -> make install

Zarafa itself:
Now for the tricky part: If you managed to make "./configure" happy in ./zarafa-7.0.8/
you will stumble across some compiling errors. I was able to make a working build with
just patching two files.
("-" = remove those lines, and put the ones with the "+" in, the unmarked lines are just orientation)

First file to patch: ./zarafa-7.0.8/common/ECLogger.cpp

About line 166:
if (compress) {
- fnOpen = &gzopen;
- fnClose = &gzclose;
- fnPrintf = &gzprintf;
+ fnOpen = (open_func)(&gzopen);
+ fnClose = (close_func)(&gzclose);
+ fnPrintf = (printf_func)(&gzprintf);
fnFileno = NULL;

Second file to patch: ./zarafa-7.0.8/common/Trace.cpp

Between the lines 124-138:

len = pos + 3;

- if (format && va) {
+ if (format) {
va_copy(va_lentest, va);
len += _vsnprintf(NULL, 0, format, va_lentest);

memcpy(buffer, debug, pos);

- if (format && va)
+ if (format)
pos = _vsnprintf(buffer+pos, len-pos, format, va);

$ make -> make install

You did it! But wait, until it really runs, there are some other steps to do:

- Now for some manual linking orgy. Everything was put to /usr/local/*
But the daemons (e.g. zarafa-server) look for configs in the normal places like /etc/zarafa/*, /usr/lib/zarafa/*
So just link the ones you recognize to their normal paths you are aware of, from a typical installation

This is what I did:
root@raspberrypi:/etc/zarafa# ls -la

lrwxrwxrwx 1 root root 34 Aug 3 21:00 archiver.cfg -> /usr/local/etc/zarafa/archiver.cfg
lrwxrwxrwx 1 root root 33 Aug 3 21:00 autorespond -> /usr/local/etc/zarafa/autorespond

- mkdir /var/log/zarafa/ (!)

- run: zarafa-server -F
-> and repeat this step until the daemon is happy (see /var/log/zarafa/server.log)
-> Put some valid mysql credentials to /etc/zarafa/server.cfg
->The first thing you will stumble upon: /usr/lib/zarafa (see linking orgy above :)

- A hint on zarafa-spooler -> If you startup manually, do /usr/bin/zarafa-spooler, not "zarafa-spooler" on the shell,
otherwise you will get some "file not found" error when proudly trying to send your first email...


- Link /usr/src/zarafa-7.0.8/php-webclient-ajax/ to your wanted document path (or grab the zarafa-webaccess 'vhost-file' and put to sites-enabled)
- Don't forget to create a config.php there from the ".dist" one
-> config.php: one edit needed minimum: Line 54 -> Into "/usr/local/share/php/" [...]
- Global php.ini -> add 'extension=mapi.so'
- Just make the remaining red errors in your browser go away when visiting /webaccess/ (.../tmp folder notice and such)
- Maybe you find Apache error.log entries complaining about some conflicting compression techniques -> just disable them in the shown *.php files
-> You will find 2 or 3 apperances maximum of 'ob_start("ob_gzhandler");' in php-files -> Just comment them out
-> In my case otherwise the webaccess won't fully load. I haven't looked deep into, the above works just fine.

TODO/Wishes: Speed optimizations. Making it work with nginx! - Suggestions welcome.


Be prepared for a couple of hours of compiling - http://xkcd.com/303/

My installation is up and running: http://pi.mars-solutions.de/
Login: demo1 - Pass: demo1

Raspberry Pi Gehäuse