Office 365 – Using mailflow rules to bypass clutter

Introduction

It is sometimes required to white list certain emails from being processed by Outlook clutter feature. The below steps will give an introduction to do this using the Exchange Online mail flow rules feature.

For example in my environment I have rules in place to bypass clutter for automated emails that come out of some systems such as the HR system and Service Desk ticketing system.

GUI Method

In this example I will be bypass clutter for certain senders but the same steps could be used for any other criteria such as the subject contains certain words etc.

  • Log onto the Exchange admin center https://outlook.office365.com/ecp
  • Go to mail flow => rules
  • Click the plus icon to add a new rule and select “Modify messages”
bypass_clutter_mail_flow_01
  • Before we start defining our rule click “More options” in the new rule window to get a more useful view
  • Give the rule a name
  • In the “Apply this rule if” drop down select “The sender is this person” (or whatever your criteria is) and add what to match to the right
  • In the “Do the following” drop down select “Set the message header to this value” and to the right set the message header to X-MS-Exchange-Organization-BypassClutter and the value to true.
  • If required you can add more criteria or exceptions, but I would it keep it generic to start with and then once you know it is working narrow the criteria down as required.
  • Click Save
bypass_clutter_mail_flow_02

Powershell Method

New-TransportRule is well documented on Microsoft site and elsewhere https://technet.microsoft.com/en-us/library/bb125138(v=exchg.160).aspx

Connecting to Exchange Online

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

Bypass based on the sender

New-TransportRule -Name <name_of_the_rule> -From "<PersonAlias>" -SetHeaderName "X-MS-Exchange-Organization-BypassClutter" -SetHeaderValue "true"

Bypass based on a word in the subject

New-TransportRule -Name <name_of_the_rule> -SubjectContainsWords "<word or phrase>" -SetHeaderName "X-MS-Exchange-Organization-BypassClutter" -SetHeaderValue "true"

Validating it works

  • Send a test email that matches the criteria.
  • Open the received email in Outlook
  • Select File => Properties
  • Copy the contents of the “Internet headers” field to notepad and search for clutter
  • You should see the header line we added, if not check you criteria and rule
bypass_clutter_mail_flow_03

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.