Move Blocked Domains from Exchange Transport Rules to Microsoft 365 Spam Filters
Question details
An Exchange administrator wants to move blocked domains from transport rules to a Microsoft 365 anti-spam policy to simplify management.

- Product
- Exchange Online and Microsoft 365 Defender
- Device & OS
- not provided
- Scenario
- The administrator has working transport rules containing blocked domains and wants to reduce the number of rules.
- Observed behavior
- The transport rules work, but the administrator wants to manage the blocked domains in the spam filter instead.
Confirm that you have permission to manage Exchange mail flow rules and Microsoft 365 anti-spam policies. Review each rule’s conditions, exceptions, and actions, because an anti-spam blocked list may not reproduce its behavior.
Add the domains to an inbound anti-spam policy
Use this approach to manage blocked domains in an anti-spam policy instead of maintaining equivalent transport rules.
Microsoft 365 does not automatically migrate blocked domains from transport rules to an anti-spam policy. Messages matching the blocked list are treated as high-confidence spam; the policy’s configured action determines how they are handled.
In the Exchange admin center, go to Mail flow > Rules and open each relevant rule. Record its blocked domains, conditions, exceptions, and actions.
Go to the Microsoft Defender portal at security.microsoft.com, then select Email & collaboration > Policies & rules > Threat policies > Anti-spam.
Open the inbound anti-spam policy that applies to the intended recipients. Find and edit its allowed and blocked senders and domains settings.
Add the domains to the blocked domains list and save the policy. Add blocked email addresses to the corresponding blocked senders list if needed.
Review the policy’s high-confidence spam action and test with the intended recipients. Once the results are acceptable, disable redundant rules in Mail flow > Rules and monitor mail handling before deleting them.

Export a domain inventory for manual review
Use Exchange Online PowerShell to help inventory domains stored in the SenderDomainIs condition before updating the spam filter.
Review Your Blocked-Domain Inventory in WPS Spreadsheets
WPS Office is a free, lightweight Microsoft Office alternative with a familiar interface. Open a CSV inventory in WPS Spreadsheets to review domains, then save a compatible workbook for easy sharing and migration.

Frequently Asked Questions
Can Microsoft 365 automatically move domains from transport rules to the spam filter?
No. Review the domains in Exchange admin center > Mail flow > Rules and add the applicable entries to the inbound anti-spam policy’s blocked list.
Will a blocked domain behave exactly like an Exchange transport rule?
Not necessarily. The anti-spam policy treats matching messages as high-confidence spam and applies its configured action. A transport rule can have different conditions, exceptions, and actions.
Where do I find the blocked domains list?
In the Microsoft Defender portal, go to Email & collaboration > Policies & rules > Threat policies > Anti-spam. Open the applicable inbound policy and edit its allowed and blocked senders and domains settings.
Can I export the domains before entering them?
Yes. Exchange Online PowerShell can export domains from the SenderDomainIs rule condition to CSV. Review the original rules as well, because domains may be specified through other conditions.
When should I remove the old transport rules?
After confirming that the anti-spam policy applies to the intended recipients and handles test messages as expected, disable redundant rules under Mail flow > Rules and monitor the results before deleting them.




