Avoid invalid characters in your spam filter rules and spam filter policy

Previously, Office 365 administrators set up and configured spam filter rules and the spam filter policy by using the Exchange admin center (EAC). Now, you use the Security & Compliance Center to manage the your anti-spam configuration. The following characters were supported in the EAC but are not supported for use in the Security & Compliance Center.

Invalid characters:

\ % & * + / = ? { } | < > ( ) ; : , [ ] "

If your spam filter rules or your spam filter policy contains any of the invalid characters, you might encounter any or all of these issues:

  • You might be unable to find the policy or rules in the Security & Compliance Center.
  • You might receive errors when trying to get the rules or policy by using Windows PowerShell.
  • You might find that the policy or settings do not run or perform as expected.

Remove the invalid characters from the spam filter policy and rules

Once you have identified the policy and rules that contain invalid characters, you can change the names by using the Windows PowerShell cmdlets.

  1. Connect to Exchange Online Using Remote PowerShell.

  2. To change the name of the spam filter policy, run the Set-HostedContentFilterPolicy cmdlet as follows:

    Set-HostedContentFilterPolicy -Identity "Old policy name" -Name "New policy name"
  3. To change the name of a spam filter rule, run the Set-HostedContentFilterRule cmdlet as follows:

    Set-HostedContentFilterRule -Identity "Old rule name" -Name "New rule name"

For more information

Threat management in the Security & Compliance Center