DaviCal and Addressbook Sync

After exchanging my rusted Nokia N97 against an iPhone I was in need to setup calendar and addressbook syncing again. Addressbook syncing wasn’t possible with N97 anyways, or I haven’t found out how to do it. Previously I synced my N97 by using iSync, but iSync doesn’t sync anymore with iPhone, although iPhone now syncs with iTunes. Weird? Yes. But that’s how it works. The iPhone syncs now via WLAN instead of Bluetooth, which is an improvement, but I don’t really want to fire up iTunes everytime I want to sync my calendar or addressbook. And using iCloud is really not an option as well, because of privacy concerns. I’m a big fan of selfhosting and already have a running DaviCal instance running on my server. DaviCal is a great piece of software from Debian maintainer Andrew McMillan, who is doing a survey on Davical, so there’s, of course, a Debian package for it.

Anyway, one problem with OSX and addressbook sync via carddav is that it is not working out of the box with Addressbook.app on OSX, although the documentation in the DaviCal wiki is quite useful. When you try to enter a new account in Addressbook.app the sync will not work. The solution can be found on the private blog of Harald Nikolisin, which is in German. He writes (German, English translation follows)

Mac OS X Adressbuch anschliessen
Oh ja – wenn man mittels SSL drauzugreift, dann gibts Probleme.
Im der Applikation Adressbuch kann man zwar ein CardDAV Account anlegen bei dem man die Authorisierungsdaten und den kompletten Serverpfad (s.o.) eingeben kann, man läuft aber immer auf eine Fehlermeldung hinaus.
Die Lösung ist, zweimal “Create” anzuklicken um den fehlerhaften Account anzulegen.

Dann editiert man manuell folgende Datei:

~/Library/Application Support/AddressBook/Sources/UNIQUE-ID/Configuration.plist
Dort trägt man unter Server String die komplette URL ein.
Am besten modifiziert man noch das Feld HaveWriteAccess auf den Wert auf “1″

English translation: 

Connecting Mac OS X addressbook
Oh, yes - there are problems when accessing via SSL.
In Addressbook.app you can add a CardDAV account where you can define authentication and 
server path, but you'll always get an error message.
The solution is to click twice on "Create" in order to create the faulty entry.

Then you can edit the following file:

~/Library/Application Support/AddressBook/Sources/UNIQUE-ID/Configuration.plist

There you enter your complete URL under Server String.
It's best to modify the field HaveWriteAccess to the value "1"

After following this advice my Addressbook.app did successfully stored the contacts into DaviCals CardDAV from where I can sync with my iPhone. Maybe Andrew want to include this to the DaviCal wiki, maybe I’ll do this myself by registering in the Wiki for that purpose…

Oh, and I forgot: Using the Roundcube plugin from graviox is working nice as well with DaviCals CardDAV!


2 thoughts on “DaviCal and Addressbook Sync

  1. Thanks for this article but .
    Thanks for this article but ……. in the wiki of davical it is write that adressbook work out of the box you just have to specify the port like this

    And it works perfectly on lion with ssl davical

    1. Yes, Lion may work out of the
      Yes, Lion may work out of the box, but Snow Leopard is not. I’m still using Snow Leopard…

Comments are closed.