Contributed on 08.05.2006 by Todd Pytel based on an early 0.4 CVS snapshot.
The Horde framework includes a SyncML component compatible with SyncEvolution and other SyncML clients. This component is built in to the core framework and does not need to be separately installed. For synchronization to work, you need to do a few things....
- Use fresh Horde sources: Many SyncML changes are applied only to Horde's CVS HEAD branch. The stable branch does include some SyncML support, but it's not as complete as what's found in CVS HEAD. If you really don't want to use CVS HEAD sources entirely, you might be able to get away with updating just the files /horde/rpc.php and /horde/turba/lib/api.php. Try the versions from the stable CVS branch first before trying HEAD, and don't complain if they don't work correctly on top of a release installation. Much better to just use CVS HEAD altogether.
- Configure authentication: On the Horde server, the only thing that might require configuration is authentication. By default, SyncEvolution will use md5 authentication, which is nice when you're using HTTP rather than HTTPS. Support for md5 was very recently added to Horde, and will almost certainly have changed by the time you read this. At the moment, see the comments in SyncML/Backend.php around line 404 for details. Alternatively (and more easily), run SyncML over HTTPS and tell SyncEvolution to use basic, non-md5 authentication, by adding
to the ~/.sync4j/evolution/horde/spds/syncml/config.txt file (see below).
clientAuthType = syncml:auth-basic serverAuthType = syncml:auth-basic
- Configure SyncEvolution: Read the generic SyncEvolution docs, then come back here. Copy one of the prepackaged configuration directories (like etc/scheduleworld_1) to ~/.sync4j/evolution/horde as a starting point. It doesn't matter much which template directory you use. They're not very different, and there's not much to configure. You need to modify (or create) the following items. In ~/.sync4j/evolution/horde/spds/syncml/config.txt:
Adjust http/https appropriately and make sure the address matches the webroot configuration on the server.
syncURL = https://your.horde.site.com/horde/rpc.phpEach computer/username combo that syncs should have a different identifier, for example, using an identifier like "home-myusername" makes sense. The username and password lines should match your Horde username and password. Add the AuthType lines from #2, if you don't want md5 authentication. Next, decide which Evolution databases you want to synchronize. I use only the addressbook, but the others should be similar. In ~/.sync4j/evolution/horde/spds/sources/addressbook_1/config.txt set
deviceId = sc-api-nat-<identifier>That's it. The other components use "calendar" (Kronolith), "notes" (Mnemo), and "tasks" (Nag). If you don't want to synchronize a particular database, be sure to set "sync = none" in its config file.
uri = contacts
- Try it out:
If you get errors, check out the Horde Sync wiki for more information on debugging. The email@example.com mailing list is also very useful. Check the archives there, to see if there's any info about your problem.
Enhancement (Note: This may be unnecessary when Turba 3 is released.)
The default configuration for Turba (Horde's address book component) is less than ideal for SyncML, because the turba_objects database table is somewhat oversimplified (for example, all components of an address are combined in a single field). This leads to vcards that are missing some fields when they're synced between Horde and Evolution. Fortunately, Turba is very clever, when it comes to reading its database, and can automagically adjust to many nondefault configurations. If you're creating a fresh Turba installation, you can improve its SyncML capabilities greatly by using this custom sources.php file. If you do this, then you'll also need to make sure the appropriate fields are available in the turba_objects table in your database. Using this postgres script, instead of the one included with Horde, will create an appropriate turba_objects from scratch. For MySQL, there is no such script available, so make the changes manually. Nothing else needs to be done with Turba, apart from using the custom sources.php and creating an appropriate turba_objects table. The Turba code will automatically recognize the new fields and use them correctly in SyncML transactions. Thanks to Karsten Fourmont for providing this solution.