Skip to Content
EmailExchangeMail FlowTransport Rules

Transport Rules

Configure mail flow rules that process messages as they pass through Exchange Online. Transport rules can modify, redirect, block, or add disclaimers to email based on sender, recipient, content, or other conditions.

Note: Rules are processed in priority order (lowest number first). A message can match multiple rules unless “Stop processing more rules” is enabled on a rule.

Transport Rules List

ColumnDescription
PriorityProcessing order (0 = first)
NameRule display name
StateEnabled, Disabled, or Test mode
ModeEnforce or Audit only
ConditionsSummary of matching conditions
ActionsSummary of actions taken

Common Rule Scenarios

Email Disclaimer/Signature

Append legal disclaimer or company signature to outbound email.

  • Condition: Sent to outside the organization
  • Action: Append disclaimer HTML to message body
  • Fallback: Wrap if disclaimer can’t be applied

Block External Forwarding

Prevent users from auto-forwarding email to external addresses.

  • Condition: Message type is Auto-forward
  • Condition: Sent to outside the organization
  • Action: Reject with explanation

External Email Warning

Prepend warning banner to emails from external senders.

  • Condition: Sender is outside the organization
  • Action: Prepend disclaimer: “[EXTERNAL] This email…”

BCC Compliance Copy

Copy all external email to a compliance mailbox for archival.

Block Attachments by Type

Block emails containing dangerous attachment types.

  • Condition: Attachment extension includes exe, bat, cmd, ps1
  • Action: Reject message with explanation

Executive Protection

Flag emails claiming to be from executives when sent from external.

  • Condition: From header contains CEO’s name
  • Condition: Sender is outside organization
  • Action: Prepend “[IMPERSONATION WARNING]“

Route to Specific Connector

Send email to specific domains through a particular connector.

  • Condition: Recipient domain is partner.com
  • Action: Route through “Partner Connector”

Rule Conditions

Sender/Recipient

  • Sender is (specific user/group)
  • Sender is internal/external
  • Recipient is (specific user/group)
  • Recipient domain is
  • Sender/recipient is member of

Message Properties

  • Subject contains words
  • Body contains words
  • Subject or body contains patterns
  • Message size over/under
  • Message type (reply, forward, etc.)

Attachments

  • Has attachment
  • Attachment extension is
  • Attachment size over
  • Attachment content matches
  • Attachment is password protected

Headers

  • Header contains
  • Header matches pattern
  • From header contains
  • Message header is

Rule Actions

Modify Message

  • Prepend subject with text
  • Append disclaimer to body
  • Set header value
  • Remove header
  • Apply classification

Redirect/Copy

  • Redirect to user
  • BCC to user
  • Add recipient to To/Cc
  • Forward to manager
  • Route through connector

Block/Reject

  • Reject message with explanation
  • Delete message silently
  • Quarantine message
  • Send to hosted quarantine

Security

  • Require TLS encryption
  • Apply Office 365 Message Encryption
  • Apply rights protection template
  • Require approval from manager

Rule Modes

Enforce

Rule is active and applies all actions to matching messages.

Test with Policy Tips

Rule matches messages and shows policy tips but doesn’t enforce actions.

Test without Policy Tips

Rule matches and logs but doesn’t notify users or enforce.

Best Practices

  • Test before enforcing — Use test mode to verify rules match expected messages before enabling enforcement.
  • Use specific conditions — Narrow conditions to avoid unintended matches. Combine conditions when possible.
  • Mind the priority — Rules process in order. Put blocking rules before modifying rules.
  • Document rules — Use descriptive names and comments. Future admins need to understand intent.

API Reference

GET /api/exchange/transport-rules List all transport rules

POST /api/exchange/transport-rules Create transport rule

PUT /api/exchange/transport-rules/:id Update transport rule

PUT /api/exchange/transport-rules/:id/state Enable/disable rule

PUT /api/exchange/transport-rules/:id/priority Change rule priority

Last updated on