How do I create a Safe Links exception for PoliteMail?

Creating Safe Links Exceptions

Safe Links is a feature in Microsoft Defender for Microsoft 365 which scans links in email messages, Teams, and other 365 applications during mail flow.  This security feature is in addition to any other anti-spam or malware protection.

This means, however, that an exception will need to be made in order for PoliteMail to function properly.   To do this, you will need to create a mail flow rule (also known as a transport rule) in the Exchange Admin Center.

Find out more about Microsoft Safe Links here.

Creating the Mail Flow Rule

  1. Log into the Microsoft Exchange Admin Center.  You will need to sign in with M365 Admin credentials.
  2. Go to Mail Flow > Rules.  A list of all current rules will be displayed in the main pane.

A screenshot of a computerDescription automatically generated

  1. Click ‘+ Add a rule’.  A drop-down menu will appear showing commonly used rules, or you can create your own.
    • Select ‘Create a new rule’.

Set Rule Conditions

The New transport rule window appears.  Use the table below to enter the information in the relevant fields:




Give the rule a relevant name.  We suggest something like “PoliteMail Safe Links Exception’.

Apply this rule if

Select ‘The sender’.  The ‘Select one’ field to the right will activate.

Select one #1

Select ‘IP address is in any of these ranges or exactly matches.’

  • A side pane will appear for you to enter an IP address.  Enter the PoliteMail IP address provided to you by the PoliteMail Support team.

Do the following

Select ‘Modify the message properties’.  The ‘Select one’ field to the right will activate.

Select one #2

Select ‘set a message header’.

  • A sentence appears under the fields saying ‘Set the message header  Enter text  to the value  Enter text.

Enter text #1

Enter the header name: ‘X-MS-Exchange-Organization-SkipSafeLinksProcessing’.

Enter text #2

Enter the header value, which in this case is ‘1’.

Except if


  • When finished, click Next.
  • Click Next on the following screen as well to begin enforcement right away.
  • Click Finish.  After a while the rule will be saved and you can click ‘Done’ to return to the Rules list.

Testing the New Rule

You should now see the rule among the list of rules in the Exchange Admin Center.  

A close-up of a signDescription automatically generatedNOTE: Look at the Status column, which is usually the first column.  If your rule has a status of Disabled, click on the rule and click on the toggle to activate it.

All you need to do now is send a test message!  A message sent from PoliteMail will use the IP address you entered in the rule.  The rule will then set a custom header that tells Exchange to skip Safe Links for this message.  Be sure to test thoroughly to make sure it works as expected!