I solved my first problem: MIcosoft was returning a 403 error to the Sync
command because there was no X-MS-PolicyKey. When I changed to code to always
add "X-MS-PolicyKey: 0" if there was no policy_key already set, the server was
happy (it triggered provisioning, of course, so a non-zero policy key was used
for later commands). I thought that a missing X-MS-PolicyKey should be the
sme as X-MS-PolicyKey: 0 but that does not seem to be the case, at least with
this server.
That then leads me on to the next problem... The initial Sync command
activesyncd sends is being rejected with an error:
Mailbox folders are not synchronized, need FolderSync first
Am I supposed to configure folder information in syncevolution manually? Or
should activesyncd be doing a FolderSync?
This
http://msdn.microsoft.com/en-
us/library/exchange/jj572420%28v=exchg.140%29.aspx Microsoft article seems to
suggest that a full sync should start by synchronising folders.