Zarafa

Zarafa is an open source Microsoft Exchange solution. It comes with a community version that allows for up to 3 users with Outlook connectors. The Outlook connector allows Microsoft Outlook users to use most of the features of Exchange but with Zarafa.

Geos One Zarafa User overlay
You can get it throught the Zarafa overlay with Layman:

Getting the ebuilds
Currently the Zarafa ebuilds are not in portage but can be found in a bug report at http://bugs.gentoo.org/239514.

So this means we have to create our own portage overlay by editing

Now make sure the directory is created.

Now we have to create the directory structure for use with the ebuilds.

Fetch the Zarafa Source Package 6.20 from the site http://zarafa.com/?q=en/download-community and save it in. You can usually do that with links2 also.

And then populate the ebuild directories with the files from the bug and make the manifests (destiny!).

Editing the ebuild
To get this to install on ~amd64 you have to insert the architecture "~amd64" at line 20 in. So KEYWORDS="~x86" Became KEYWORDS="~x86 ~amd64"

This won't be the case if you have a x86 install.

If you edit the file make sure you re-make the manifest.

Emerging the package
Now you should be able to emerge the package normally.

Required settings
Of course for this to work PHP and APACHE2 need to be installed. Please check your correponding use flags as this might be a bit to much but will work: dev-lang/php-5.2.6-r7 USE="apache2 bcmath berkdb bzip2 calendar cli crypt ctype curl exif ftp gd gdbm hash iconv imap ldap mysql mysqli ncurses nls odbc pcre pdo posix readline reflection session simplexml snmp sockets spell spl ssl tokenizer truetype unicode xml xmlreader xmlrpc xmlwriter zip zlib (-adabas) (-birdstep) -cdb -cgi -cjk -concurrentmodphp -curlwrappers -db2 -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -fastbuild (-fdftk) -filter (-firebird) -flatfile -force-cgi-redirect (-frontbase) -gd-external -gmp -inifile -interbase -iodbc -ipv6 (-java-external) -json -kerberos -kolab -ldap-sasl -libedit -mcve -mhash -msql -mssql -oci8 -oci8-instant-client -pcntl -pic -postgres -qdbm -recode -sapdb -sharedext -sharedmem -soap (-solid) -sqlite -suhosin (-sybase) (-sybase-ct) -sysvipc -threads -tidy -wddx -xpm -xsl -yaz -zip-external"

Next, in make sure magic_quotes_gpc = Off

Fetching the web package
Unfortunately there is currently no package associated with just the web scripts. So you have to grab it from a binary package. So go back to http://zarafa.com/?q=en/download-community and grab the Suse 10.2 (preferred).

Make sure you have rpm2targz installed. You need that to get it open. If you plan on getting the licensed binary out also (for using more than 3 Outlook users, see below) then it matters which version you get. Otherwise pick either the i586 or x86_64 version.

Once you get it untared/gzipped, go into the directory and you see see the file zarafa-webaccess-6.20-*.noarch.rpm.

...should create a zarafa-webaccess-6.20-*.noarch.tar.

...should extract it for you. This will create the directories etc and srv in the working directory you are currently in. So you need to and then  or where ever else you are going to put it. Just to be on the safe side you can the webaccess directory just in case.

Note: if you get an error about MAPI, restart apache2.

Installing the licensed server
If you want to use Zarafa with more than 3 Outlook servers, you'll have to purchase a license. This license requires a license server. The license server is not included in the open source package. So this means you'll have to fetch it from a binary package. So fetch the SuSe 10.2 package (see the webmail install). The licensed binary from the SuSe 10.2 package is currently all that works on Gentoo because of the glibc version.

This creates two folders: etc and usr. The required files to move are:

That should do it...

Setup after install
You'll need a Zarafa database in mysql. Zarafa uses mysql to exclusively store data. So we'll have to create a mysql database and user.

You'll then need to modify the to see that database.

Qmail
Since the mail delivery agent for zarafa (zarafa-dagent) requires that you pass it a user name to it. So in each user directory that you are delivering mail for you have to create a .qmail file and put in it.
 * /usr/bin/zarafa-dagent -q [user name]

or if you use procmail to filter out SPAM with the X-Spam-Status header
 * /usr/bin/procmail -a "[user name]"

And in the /etc/procmailrc USER=$1 SHELL=/bin/sh


 * 0w

EXITCODE=$?
 * ^X-Spam-Status: Yes
 * /usr/bin/zarafa-dagent -q -j $USER


 * 0w

EXITCODE=$?
 * /usr/bin/zarafa-dagent -q $USER