Exchange 2007: The sequence of predicates is invalid
Summary: When creating a transport rule I got the following error: "The sequence of predicates is invalid" In this case it appears that the order or predicate rules mattered.
In this example, I was creating a rule to silently drop all messsages coming in from an external address to an internal address.
$Condition = Get-TransportRulePredicate FromAddressContains
$Condition1 = Get-TransportRulePredicate SentTo
$Condition.words = @("externaluser1@gmail.com","externaluser2@gmail.com")
$Condition1.addresses = @(get-mailbox user1)
$Action = Get-TransportRuleAction DeleteMessage
New-TransportRule -Name "Deny Senders to Cellulardeals" -Condition @($Condition,$condition1) -Actions @($Action)
This would yield "The sequence of predicates is invalid" However after swapping the condition to put SentTo before FromAddressContains it works fine.
$Condition = Get-TransportRulePredicate SentTo
$Condition.addresses = @(get-mailbox user1)
$Condition1 = Get-TransportRulePredicate FromAddressContains
$Condition1.words = @("externaluser1@gmail.com","externaluser2@gmail.com")
$Action = Get-TransportRuleAction DeleteMessage
New-TransportRule -Name "Deny Senders to Cellulardeals" -Condition @($Condition,$condition1) -Actions @($Action)
James Chong (MVP)
MCITP | EMA; MCSE | M+, S+
Security+, Project+, ITIL
msexchangetips.blogspot.com
In this example, I was creating a rule to silently drop all messsages coming in from an external address to an internal address.
$Condition = Get-TransportRulePredicate FromAddressContains
$Condition1 = Get-TransportRulePredicate SentTo
$Condition.words = @("externaluser1@gmail.com","externaluser2@gmail.com")
$Condition1.addresses = @(get-mailbox user1)
$Action = Get-TransportRuleAction DeleteMessage
New-TransportRule -Name "Deny Senders to Cellulardeals" -Condition @($Condition,$condition1) -Actions @($Action)
This would yield "The sequence of predicates is invalid" However after swapping the condition to put SentTo before FromAddressContains it works fine.
$Condition = Get-TransportRulePredicate SentTo
$Condition.addresses = @(get-mailbox user1)
$Condition1 = Get-TransportRulePredicate FromAddressContains
$Condition1.words = @("externaluser1@gmail.com","externaluser2@gmail.com")
$Action = Get-TransportRuleAction DeleteMessage
New-TransportRule -Name "Deny Senders to Cellulardeals" -Condition @($Condition,$condition1) -Actions @($Action)
James Chong (MVP)
MCITP | EMA; MCSE | M+, S+
Security+, Project+, ITIL
msexchangetips.blogspot.com

4 Comments:
One of our systems guys got this error and it took him quite a while to sort it out. It's scary, but this blog really helps!
its excellent
Really i like this blog.
Its highly informative I would invite you to take tour on my website which also related Exchange Hosted.For more information about Web Hosting please visit on http://www.prestigetechnologies.com
I hope you like it most.
The replica handbags design debuted in 1888. replica handbags uk design was launched in an effort to counteract the replicas his competitors were marketing. replica bags was made of an intersection of the initials LV, finished with a curved beige diamond and 4 point star intes.
Burberry Outlet Store Online
Handbags Outlet Store Online
www.burberry-outlets.org
www.prada-outlet.org
Post a Comment
<< Home