Google
Search WWW Search msexchangetips.blogspot.com

Tuesday, April 21, 2009

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

9 Comments:

Anonymous Exchange email hosting said...

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!

1:08 AM  
Blogger Unknown said...

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.

11:06 PM  
Blogger Unknown said...

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.

6:50 PM  
Blogger oakleyses said...

converse shoes outlet, salvatore ferragamo, timberland boots, softball bats, herve leger, ray ban, hollister, louboutin, gucci, nike roshe run, iphone cases, beats by dre, mcm handbags, oakley, p90x workout, insanity workout, wedding dresses, abercrombie and fitch, abercrombie, nike air max, mac cosmetics, babyliss pro, valentino shoes, bottega veneta, mont blanc, converse, jimmy choo outlet, hollister clothing, nike air max, north face outlet, new balance shoes, north face outlet, instyler ionic styler, soccer shoes, lululemon outlet, asics running shoes, ghd hair, giuseppe zanotti, soccer jerseys, nfl jerseys, longchamp uk, reebok outlet, nike air huarache, chi flat iron, hermes handbags, vans outlet, polo ralph lauren, celine handbags, nike trainers uk, vans scarpe

6:45 PM  
Blogger xumeiqing said...

151210meiqing
prada outlet
abercrombie & fitch
ugg boots on sale
uggs outlet
ugg outlet
canada goose outlet
michaek kors handbags
cheap uggs
canada goose outlet
vans shoes
louis vuitton
coach factory outlet
uggs boots
michael kors outlet online
marc jacobs
nike roshe run
toms
ray ban sunglasses outlet
ugg boots
cheap ugg boots
gucci handbags
north face uk
pandora jewelry
coach outlet online
mont blanc pens
lebron james shoes 2015
coach outlet
uggs on sale
ralph lauren outlet
canada goose jackets
swarovski jewelry
nike trainers
giuseppe zanotti sneakers
uggs outlet
christian louboutin outlet
polo ralph lauren
chanel handbags
uggs on sale
oakley sunglasses
louis vuitton outlet

6:15 PM  
Anonymous Anonymous said...

jordan retro
ray ban uk,cheap ray ban sunglasses
michael kors outlet online
Michael Kors Outlet Store
chrome hearts online
toms outlet store
michael kors handbags
cheap oakleys
mlb jerseys authentic
jordans for cheap
tiffany and co jewellery
discount sunglasses
http://www.chromehearts.com.co
michael kors handbags
michael kors factory outlet
tiffany online
retro jordans
http://www.uggoutlet.uk
kobe byrant shoes
michael kors outlet
Cheap Jordans For Sale

7:33 PM  
Anonymous obat gabagen said...

lemonaru
obat benjolan di payudara
obat ginjal bengkak
obat tbc kelenjar
obat tbc paru tradisional
obat jantung bengkak
obat benjolan di kepala

6:52 PM  
Anonymous obat kencing manis said...

It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing.
obat gabagen
obat ginjal bengkak
obat keloid
obat limpa bengkak
obat thalasemia
obat kencing tidak tuntas
obat tbc tulang

1:00 AM  
Blogger kobar said...

Thanks please share this information if you are face any problem in Toshiba laptop. We will help you for more detail visit here
Cara Menghilangkan Benjolan di Payudara
Cara Menghilangkan Benjolan di Kepala
Cara Menyembuhkan Thalasemia
Penyebab Gabagen & Obat Gabagen Paling Mujarab
obat nyeri testis

11:51 PM  

Post a Comment

<< Home

xml:lang="en" lang="en"> MS Exchange Tips: Exchange 2007: The sequence of predicates is invalid