0 XP

How a rule is built

Where rules live

Mail flow rules (transport rules) are in the new EAC under Mail flow > Rules, directly at admin.exchange.microsoft.com/#/transportrules. In Exchange Online PowerShell they are New-TransportRule, Set-TransportRule, Get-TransportRule, Remove-TransportRule, Enable-TransportRule and Disable-TransportRule.

The four parts

  • Conditions pick the messages the rule acts on.
  • Exceptions use the same predicates as conditions and override them.
  • Actions say what happens.
  • Properties say when and how the rule applies: priority, mode, active dates and the other settings in the next unit.

A rule with no conditions or exceptions acts on every message. In the EAC that is the Apply to all messages condition, which cannot be combined with other conditions.

How they combine

  • Several conditions: AND. All must match.
  • Several values inside one condition: OR. Any one matches.
  • Several exceptions: OR. Any one stops the rule.
  • Several actions: AND. All are taken.

So a rule with two conditions and two exceptions acts only when both conditions match and neither exception does. The trap is applying the OR logic for values to separate conditions.

Some actions end the story: Delete the message without notifying anyone stops later rules from applying, Deliver to hosted quarantine stops evaluation of the remaining rules, and Forward the message allows no other actions.

What rules never see

All messages except NDRs are evaluated. Rules do not process system-generated messages:

  • Exchange NDRs;
  • messages to the arbitration mailbox, such as approval requests;
  • journal reports.

For S/MIME-encrypted mail a rule sees only the envelope headers. Content protected with RMS or Purview Message Encryption can be inspected only when transport decryption is on (Set-IRMConfiguration -TransportDecryptionSetting Mandatory or Optional).

Knowledge check

4 questions on what you just read. Each answer shows the full explanation and its source.

Loading…