yes, there is.
you can script rules creation. only thing is, that you can not see the
script-created rules
in the rules wizard. for my belongings this was ok, so now my users receive
spam-rules via vbs.
see microsoft rules component reference for details. (rule.dll)
it will look like this: (dont use it, it will not work, because i cut and
pasted the interesting parts.)
Const ACTION_MOVE = 1
Const SUBSTRING = 1 ' Substring
Const IGNORECASE = &H00010000 ' Ignore case
Const CdoPR_SUBJECT = &H0037001E
Const CdoPR_TRANSPORT_MESSAGE_HEADERS = &H007D001E
....
....
' Create session object and logon to machine SERVER as TestUser
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "","",False,True,True,True,"SERVER" & vbLF & "TestUser"
Set objRules = CreateObject("MSExchange.Rules")
objRules.Folder = objSession.Inbox
Set objRule = CreateObject("MSExchange.Rule")
....
' Create action
Set objAction = CreateObject("MSExchange.Action")
objAction.ActionType = ACTION_MOVE
objAction.Arg = ActionFolder
....
' Create PropertyValue with "*"(string) in the Subject
Set objPropVal = CreateObject("MSExchange.PropertyValue")
'objPropVal.Tag = CdoPR_SUBJECT
objPropVal.Tag = CdoPR_TRANSPORT_MESSAGE_HEADERS
objPropVal.Value = strHeader
...
' Create ContentCondition
Set objContCond = CreateObject("MSExchange.ContentCondition")
'objContCond.PropertyType = CdoPR_SUBJECT
objContCond.PropertyType = CdoPR_TRANSPORT_MESSAGE_HEADERS
objContCond.Operator = SUBSTRING + IGNORECASE
objContCond.Value = objPropVal
...
' Create Rules object and add new Rule to Inbox rules
objRule.Name = "SPAM"
objRule.Condition = objContCond
objRule.Actions.Add ,objAction
...
' Create Rules object and add new Rule to Inbox rules
objRules.Add , objRule
...
' Update the rules
objRules.Update
....
objSession.Logoff