From Zarafa wiki
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.
- 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.
- Initial release.
- Compatible with Evolution only
- No actual 'CardDAV' commands supported.
- 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)
A working installation of:
- Zarafa Server
- Apache/PHP 5.x and Zarafa PHP-MAPI modules
- 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
- URL (https is recommended, otherwise your password might be sent in clear text!)
When using a browser or mounting this as volume you'll see a lot of .vcf files with your contacts in the root folder.
- New Address Book
What ever you like
Attention: we had trouble getting Evolution to log in with username of the format [email protected], 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.