CardDAV Interface

From Zarafa wiki

(Difference between revisions)
Jump to: navigation, search
(Installation)
 
Line 37: Line 37:
  sudo pear install File_IMC
  sudo pear install File_IMC
  sudo pear install HTTP_WebDAV_Server
  sudo pear install HTTP_WebDAV_Server
 +
*On Ubuntu you need to do
 +
sudo apt-get install php-pear
 +
sudo pear install channel://pear.php.net/HTTP_WebDAV_Server-1.0.0RC7
 +
sudo pear install channel://pear.php.net/File_IMC-0.4.3
 +
*Install CardDAV PHP script into Zarafa webaccess (or any other location you like):  
*Install CardDAV PHP script into Zarafa webaccess (or any other location you like):  
  cd ~
  cd ~

Latest revision as of 10:49, 6 June 2012

A CardDAV interface for Zarafa

This article is a community contribution and may include unsupported configurations.

This was inspired by the CSV contact import script and contains code from the PHP PEAR HTTP_WebDAV_Fileserver example. There is a thread in the Zarafa Forum about this tool: Zarafa Community Forums - Access Contacts from Evolution via CardDAV.

Contents

Features/Limitations

  • Shares Zarafa contacts as .vcf files using the CardDAV/WebDAV protocol. Simple listing via Webbrowser
  • Access is currently read-only.
  • Only the default Contacts folder of the users own store will be shown.
  • Contacts in subfolders are not accessible.
  • Still incompatible with Apple Addressbook
  • Reporting of invalid sync token not honored by SOGo connector, thus only the first sync works.

Changelog

  • 0.1
    • Initial release.
    • Compatible with Evolution only
    • No actual 'CardDAV' commands supported.
  • 0.1.5
    • Simple listing of vcf files in web browser
    • Implemented CardDAV specific 'REPORT' method, but server will not keep sync states for clients and force full resync every time
    • Somewhat supporting SOGo connector, only initial sync will succeed (SOGo doesn't do full resync when reporting invalid sync token)

Prerequisites

A working installation of:

  • Zarafa Server
  • Apache/PHP 5.x and Zarafa PHP-MAPI modules

Installation

  • Setup required PEAR modules
sudo apt-get install php-pear
sudo pear install File_IMC
sudo pear install HTTP_WebDAV_Server
  • On Ubuntu you need to do
sudo apt-get install php-pear
sudo pear install channel://pear.php.net/HTTP_WebDAV_Server-1.0.0RC7
sudo pear install channel://pear.php.net/File_IMC-0.4.3
  • Install CardDAV PHP script into Zarafa webaccess (or any other location you like):
cd ~
wget https://raw.github.com/LevelbossMike/Zarafa_Carddav/master/zarafa_carddav.php
sudo mv zarafa_carddav.php /usr/share/zarafa-webaccess/community_carddav.php
  • Modify Apache configuration
    • Add the following line to your webserver configuration, e.g. /etc/apache2/sites-available/zarafa-webaccess
Alias /carddav /usr/share/zarafa-webaccess/community_carddav.php
    • Reload config file
sudo /etc/init.d/apache2 reload

Client configuration

General

  • URL (https is recommended, otherwise your password might be sent in clear text!)
https://hostname/carddav/
  • Login
zarafa_username:zarafa_password

When using a browser or mounting this as volume you'll see a lot of .vcf files with your contacts in the root folder.

Evolution

  • New Address Book
    • Type
WebDAV
    • Name
What ever you like
    • URL
https://hostname/carddav/
    • Username
zarafa_username

Attention: we had trouble getting Evolution to log in with username of the format user@server, therefore the % sign is replaced by @ on the serverside. So you might try user%server as login name.

Attention: Evolution seems to mix up some of the phone number entries of the VCard files, e.g. Home Phone numbers are not shown in the list view and shown as Business Phone in the detail dialog although they seem to be correct inside the .vcf file.

The implementation has been tested on Evolution 2.28.3 on Ubuntu 10.04.1 x86.

Personal tools