Way to add mobile sync schema

Achim J. Latz achim+automx at qustodium.net
Sun Sep 16 03:36:10 CEST 2012

Hello list:

Would it be possible to complete/add the ActiveSync/mobilesync schema in 

I know that distinction has to be made in view.py, and I (never having 
touched Python) figured out that we can change the <response> tag as 
follows (with correct indentation, of course ;-)

if self.__subschema == "mobile":
  NS_Response = ("http://schemas.microsoft.com/exchange/"

What we would need to support ActiveSync is a (simple) response like the 
following one with only two fields whose values we already have, namely:

[[[_auth_identity]]] (lets asume the email address for now)
[[[https://_server/Microsoft-Server-ActiveSync]]] (the http host)

The response should look like this, with the substitions in place:


I tried to hack something together myself in Automx 0.8, along the lines of:

if self.__subschema == "mobile":
   culture = etree.SubElement(response, "Culture")
   culture.text = "en:en"

   user = etree.SubElement(response, "User")

   displayname = etree.SubElement(user, "DisplayName")
   displayname.text = _auth_identity

   emailaddress = etree.SubElement(user, "EmailAddress")
   emailaddress.text = _auth_identity

   action = etree.SubElement(response, "Action")

   settings = etree.SubElement(action, "Settings")

   server = etree.SubElement(settings, "Server")

but did not get past the <User/> node showing up (empty) in the XML 
tree. The other nodes (e.g Settings etc) are not added...

This would be very helpful, and seems like a low-hanging fruit, 
especially when used in combination with PHP-Push [1] to actually 
implement functionality behind the "/Microsoft-Server-ActiveSync" URL.

Any help/code/diff would be greatly appreciated.

Thank you in advance, Achim

[1] <https://github.com/dupondje/PHP-Push-2>

More information about the automx-users mailing list