This is a rewrite of an old CDO 1.2 rule.dll script back from 2006 http://gsexdev.blogspot.com.au/2006/10/creating-domain-based-auto-response.html . Creating a Domain based auto response rule allows you to have a custom auto-responder for an email based on the sender's email domain of any newly received email messages. This is useful when you need to cater for a number of different scenarios and where you want to add a more personal touch to these auto responders. EWS allows you to create Inbox rules via the CreateRule Operation if your after the full spiel have a read of http://msdn.microsoft.com/en-us/library/exchange/hh298418%28v=exchg.140%29.aspx In this script it first uses a ContainsSenderStrings condition to filter on the domain you want the rule to apply to in my example yahoo.com $nrNewInboxRule.Conditions.ContainsSenderStrings.Add("@yahoo.com") Exceptions are created for any messages with subject prefixes of RE and FW to omit these message...
Pushing the Envelope in Messaging and Office 365 Development