[[toc]] + Horde_ActiveSync Add !ActiveSync support to Horde for allowing Horde to sync with mobile devices using the mobile device's support for Microsoft Exchange/!ActiveSync. Use Z-Push library (http://z-push.sourceforge.net) for handling !ActiveSync protocol communication. ++ Bugs ++ People [MichaelRubinsky Michael Rubinsky] [JanSchneider Jan Schneider] ++ Description Integrate the Z-Push library into Horde. Provide the ability for Horde to provide over the air synchronization of email, contacts, and calendar data to devices such as the iPhone/iPod Touch, Android and any other system supporting !ActiveSync. This implementation supports Microsoft !ActiveSync protocol versions up to 2.5 - the version implemented by Microsoft Exchange 2003. ++ Trying it out The !ActiveSync code has been merged into git master, but is not active by default. You should be aware that this code is still very experimental. While it mostly works for me in my tests, on my test devices, there are likely still many bugs. It may work, it might not, or it might make your iPod grow legs and run for higher ground. You have been warned. To activate the server, you need to enable it in Horde's configuration. You will see an !ActiveSync tab. Right now, the only thing configurable is the directory you would like to store the state files in. You will also need to configure your webserver to redirect the URL Microsoft-Server-ActiveSync to your horde/rpc.php file. How you do this depends on your webserver and it's configuration. For Apache, something like: <code> Alias /Microsoft-Server-ActiveSync /var/www/html/horde/rpc.php </code> or for lighttpd: <code> alias.url = ("/Microsoft-Server-ActiveSync" => "/var/www/html/horde/rpc.php"); </code> +++ What works Contacts and Calendar syncing is mostly working. The most notable issue is with recurring event exceptions. Exceptions created on the PIM work to a point, exceptions created in Kronolith, well, not so much. This code has been tested to some degree on the following devices: || Device || Version(s) || Notes || || Android SDK Emulator|| 2.0.1 and 2.1 ||Contacts only as the emulator does not have a native calendar application || || Motorola Droid || Android 2.0.1 || Contacts and Calendar data (Droid's Corporate Calendar has a buggy client implementation) || || !TouchDown For Droid || Version 5.1.0028 || Contacts and Calendar || || iPod Touch || 3.1.3 || Contacts and Calendar || +++ Setting up the device It's beyond the scope of this page to go into detail for each individual device. In general, you will need to create a new account on your device. The account type should be something like //Microsoft Exchange// or //!ActiveSync//. Some devices use //Corporate//. You will need to enter your normal Horde username and password in the appropriate fields. In the field for the server address, you should enter the **root** of the webserver or virtual host that hosts Horde. For example, if you host horde at http://host.example.com/horde then you should enter http://host.example.com. You can ignore any reference to a //domain// entry. A special note for the iPhone/iPod (and possibly others) - if you do not use a SSL enabled site you may receive errors about not being able to find the !ActiveSync server. If this happens, just continue, or save, or whatever your option is to continue. On the iPhone, after everything is completely set up, you must go back into the account settings and disable SSL. After the connection particulars are entered, you should choose to enable the folders that you want sync'd. Right now only Contacts and Calendar are supported. ++ Rough list of issues/todos/development notes in no particular order * Horde_History state driver. Currently, !ActiveSync support uses a file-based state driver to persist the PIM state so we know what changes. This is a refactored implementation of what the Z-Push library does. For Horde, this is inefficient, as we have the data needed to know what has changed and when. Once the majority of the feature set is working, a Horde_History driver should be written to replace the file based driver when syncing contacts, calendar, and todo data. We might still need it if/when push email is implemented. The backend drivers are able to specify a particular state storage to enable this functionality if it is needed. * Need to implement ghosted properties / SUPPORTED tag. Currently, each message that is sent from PIM -> Server is overwritten and replaced with only what the PIM sends. It's possible for some PIMS to ghost contact and calendar properties so that only the supplied tags are changed and missing, ghosted, properties are retained on the server. When a PIM supports this, it sends a SUPPORTED tag with children representing the NON-ghosted properties. The absence of the SUPPORTED tag would indicate that any property not transmitted should be handled as a ghosted property. * Configurable heartbeat interval range: The protocol allows for rejecting heartbeat intervals that fall outside a specific range, and send back a suggested heartbeat interval to the client. This should be implemented as a configuration value. * Basic support for provisioning is already implemented, but support for remote wipe still needs work.
The state storage needs to be able to support username/devid/policykey listing. The Z-Push file-based state storage did not support this, and actually never verified the policykey at all when using this state storage method. This should be easy to add by storing the state files under a username directory. The policykey storage was already added to the device's ping-state file so we can verify the key and enforce changes. Of course, a new history/sql state storage would make this easier (see first point).Version 12 and higher also support a "local wipe" which automatically wipes the device when certain policies are violated such as maximum password attempts (see task below regarding versions). * Todo syncing: Neither the iPod/iPhone or Android have a native Todo application. !TouchDown does provide one, but backend support still needs to be added. * Implement more recent protocol version support - version 12 or maybe 12.1 (Exchange 2007??) should be fairly non-disruptive. Version 12 would get us more atomic policy settings, local wipe rules, as well as the ability to send the policy settings to the client as the more compact wbxml. 14 (Exchange 2010?) would probably be lots more work as it does away with PING, using SYNC for waiting for changes instead. ++ Resources http://z-push.sourceforge.net https://zimbrabackend.svn.sourceforge.net/svnroot/zimbrabackend/zimbra.php Some discussion/issues/info on calendar sycing http://z-push.sourceforge.net/phpbb/viewtopic.php?f=4&t=119&start=10 Some discussion on remote wipe issues with various devices http://z-push.sourceforge.net/phpbb/viewtopic.php?f=4&t=802 Useful information/examples: http://wiki.openchange.org/index.php/ActiveSync_Protocol Another AS implementation in PHP - there is some good implementation information there for the taking. https://svn.tine20.org/svn/trunk/tine20/ActiveSync !TouchDown Client: http://www.nitrodesk.com/dk_touchdownFeatures.aspx Android SDK: http://developer.android.com/sdk/index.html ---- Back to the ((Projects|Project List))