vCard / CardDAV Server with sabre

  • hi there,
    i was looking for a CardDAV / vcard server for Kopano and just found an old sabre-zarafa implenentation, but with a few changes i got it to work:
    nice entrypoint here:
    clone it from here:

            // Zarafa server location
    //      define ('ZARAFA_SERVER', 'file:///var/run/zarafa');
            define ('ZARAFA_SERVER', 'file:///var/run/kopano/server.sock');

    mapi import path in server.php

    //set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/php/'); -> KOPANO 
    set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/kopano/php/');

    i even got it to work in Centos-6 rh-php56 envirements with suggested vhost.conf port 8843 running the normal apache config (php53) and php56 side by side.
    vhost conf examples are in

    good luck!

  • it even works from an diffrent host with

            define  ('ZARAFA_SERVER', '');

  • Hey guys,

    Tried it and unfortunately it does not work for me, yet.

    System is ubuntu server 16.04.2.
    I have set up a dedicated sub-domain for it and installed everything in the root directory.
    apache2 config for this virtual server looks as follows:

    DocumentRoot /home/hsa/domains/
    ErrorLog /var/log/virtualmin/sabre.domain.de_error_log
    CustomLog /var/log/virtualmin/sabre.domain.de_access_log combined
    ScriptAlias /cgi-bin/ /home/hsa/domains/
    DirectoryIndex server.php
    <Directory /home/hsa/domains/>
    allow from all
    DirectoryIndex server.php
    Require all granted
            RewriteEngine On
            RewriteBase /
            # If the request does not reference an actual plain file or
            # directory (such as server.php), interpret it as a "virtual path"
            # and pass it to server.php:
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^.*$ /server.php
            # If you're getting 412 Precondition Failed errors, try stripping the ETag headers:
            # RequestHeader unset If-None-Match
            # Header unset ETag
            # FileETag None
    RewriteEngine on
    SSLEngine on
    SSLCertificateFile /home/hsa/domains/
    SSLCertificateKeyFile /home/hsa/domains/
    SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
    SSLCACertificateFile /home/hsa/domains/

    define (‘CARDDAV_ROOT_URI’, ‘/’);

    define (‘ZARAFA_SERVER’, ‘http:localhost:236/kopano’);
    but also tried
    define (‘ZARAFA_SERVER’, ‘file:///var/run/kopano/server.sock’);

    in server.php I also set
    set_include_path(get_include_path() . PATH_SEPARATOR . ‘/usr/share/kopano/php/’);

    I do not get any error in apache log, but also not in access log.

    when I did not have the “Require all granted” in, I would have log entries like this:

    "PROPFIND /.well-known/carddav HTTP/1.1" 403 739 "-" "Mac OS X/10.12.6 (16G29) AddressBook/1756.20"
    "PROPFIND / HTTP/1.1" 403 567 "-" "Mac OS X/10.12.6 (16G29) AddressBook/1756.20"
    "PROPFIND /principals/ HTTP/1.1" 403 578 "-" "Mac OS X/10.12.6 (16G29) AddressBook/1756.20"

    At least I could see the requests coming in, getting denied with 403.

    Browser doesn’t work either, no login or similar.

    Any ideas?

  • hi,
    to me it looks like a vhost conf problem, perhaps try to disable ssl first for debugging and just running it on vcard standard prort 8843 …
    also we use centos and i dont know the paths for shared mapi library … for us: /usr/share/kopano/php/

Log in to reply