views:

63

answers:

3

So I have to make a windows service that scans incoming mails in a mailbox on an exchange server for specific words and then deletes the mail. The mailbox I will be scanning currently holds more than 70000 mails. I've tried using the exchange WebDAV protocol, but it usually times out before responding. Are there any alternatives to WebDAV?

A: 

If you are using Exchange 2007 SP1 or later, you should be able to use Exchange Web Services. Don't be surprised if it isn't particularly fast - I couldn't get it to go faster than around 100 email retrievals per minute. The API was usable fairly quickly, though.

Vinay Sajip
Thanks, I'll take a look at it.
JohannesH
A: 

you can try to access the mailbox via imap or pop3.

Also microsoft provide someway to hook the SMTP server. check this link for details.

But I think the solution for you would be a place a gateway server before your exchange infrastructure and use the hook posibilities of postfix or other SMTP.

RageZ
A: 

It turned out that the WebDAV protocol contains several meths for bulk operations as well as list response limitation constructs. The two really useful contructs I found were the Range Header and the BDELETE Method.

JohannesH