Generating ActiveSync sync/fetch commands load on an Exchange server
I'm developing an Exchange plugin that may effect ActiveSync operations. I am now looking for a quick way to generate a high load of sync/fetch operations that will simulate multiple ISO/Android devices which are tring to sync and fetch emails from multiple mailboxes.
It was able to load 10,000 mailbox to my Exchange 2010 SP1 server, but it seems I can not sync any of those mailbox when sending a request with SyncKey: 1 and Class: Email. It always fails with an object not found status code, even when the mailbox is filled with messages.
For some reason, as soon as I configured a real IOS/Android Exchange client with a specific mailbox, suddenly It is possible to sync this mailbox.
Is there an easy way to configure this initial state on all of those 10,000 mailboxes, so 开发者_高级运维I would be able to sync them all later with a simple Sync command (SyncKey: 1 and Class: Email) ? Or do you have any other idea how to generate this kind of load?
Here is the response I'm getting, when sending a Sync command with SyncKey = 0:
<?xml version="1.0"?>
<Sync xmlns="http://synce.org/formats/airsync_wm5/airsync">
<Status xmlns="http://synce.org/formats/airsync_wm5/airsync">8</Status>
</Sync>
I'm afraid there is no easy way to do this; clients basically must go through the following:
- Run
FolderSync
w.SyncKey=0
to get the overall folder structure. - Run
Sync
w.SyncKey=0
on each of those folders to get it's contents.
Specifically, you always have to return the previous SyncKey
for any operation on a given folder, thus forcing you to do things sequentially. Basically, [MS-ASCMD] is the place to look.
(You might also have to send a Provision
-command to the server to get started. Check out [MS-ASPROV] for the details.)
So basically, I think you'd be better off using an existing client that either implements a simpler API or proxies to something more workable. You could look at DAVMail, which is a IMAP→EAS proxy - thus you'd "only" have to implement something in IMAP...
Are you sure the sync key is 1? When I have worked with Exchange servers and active sync the first real sync key is always something like 000000000{388899F6-C5A1-4903-B638-1F5021C556BE}0
Get the synckey by running sync command with synckey = 0
精彩评论