Transport rule not working in Exchange Online Protection
Posted on 2013-11-18
I use Exchange Online Protection and I am trying to configure a transport rule that will route email through a specific outbound connector. I have a default outbound connector and it works fine. I used these commands to create a second outbound connector and a rule to route email through it:
New-OutboundConnector -Name AMER -ConnectorType OnPremises -IsTransportRuleScoped $true -UseMXRecord $false -SmartHosts "126.96.36.199"
New-TransportRule -Name "Route to AMER" -RecipientADAttributeContainsWords "Country:United States" -RouteMessageOutboundConnector "AMER"
Set-TransportRule "Route AMER" -PrependSubject "AMER ROUTE"
So basically, if the recipient's country field equals "United States", the email should be routed through the AMER outbound connector and the subject prepended with the text "AMER ROUTE"
It doesn't work. I double-checked the mailbox's country attribute and it is set to United States. The mail is delivered but it is not prepended with "AMER ROUTE", meaning it is routing via the default outbound connector instead.
What am I missing?