Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Microsoft 365 Foundations v7.0.0 · 2.1.14

Inbound anti-spam policies should not contain allowed sender domains

  • E3 Level 1
  • Microsoft Defender
  • Automated check

This check reads your inbound anti-spam policies in Exchange Online and looks for domains in the allowed sender domains list. The safe setting is to leave that list empty, so no whole domain is trusted by default.

Why it matters

Each inbound anti-spam policy has an Allowed section where admins can add allowed senders and allowed domains (see Configure spam filter policies, Microsoft Learn). An allowed domain is a standing trust decision for every address at that domain, and it tends to outlive the reason it was added: a vendor that was replaced, a campaign that ended, a ticket nobody remembers.

A sender domain is also something an attacker can imitate or abuse through a compromised mailbox at that domain. The wider the allow entry, the more mail you ask the filter to treat kindly on the strength of a name alone. Keeping the list empty means each sender earns delivery through normal filtering, and the exceptions you really need can be narrower and reviewed.

How to check it yourself

Portal: in the Microsoft Defender portal go to Email & collaboration > Policies & rules > Threat policies > Anti-spam. Open each inbound policy, including the default one, and read the Allowed and blocked senders and domains section.

PowerShell (read-only, in Exchange Online PowerShell):

Get-HostedContentFilterPolicy | Format-List Name,AllowedSenders,AllowedSenderDomains

The safe setting is an empty AllowedSenderDomains on every policy. For each entry you find, note who asked for it and whether the sender still exists.

How to fix it

Portal: open the policy, edit the allowed domains in the Allowed section and remove the entries, then save.

PowerShell, which changes the tenant, so review the list from the check first (ConfigCobra only reports and suggests, it never changes your tenant). Replace the policy name and domain with your own values:

Set-HostedContentFilterPolicy -Identity "Default" -AllowedSenderDomains @{Remove="example.com"}

Repeat per entry and per policy, then run the check command again and confirm the list is empty. If a partner really must be trusted, prefer a narrower, documented exception that has an owner, and review it on a schedule.

What changes when you fix it

Mail from a removed domain is filtered like mail from any other sender. Most of it will keep arriving; messages the filter judges to be spam or phishing may now go to Junk or quarantine, where before they were let through.

  • Users who get mail from the removed domains may see some of it in Junk or quarantine.
  • Security and help desk teams may need to release a few quarantined messages in the first days.
  • Other policies are not affected; each anti-spam policy has its own list.

Before removing a long-standing entry, ask the business owner of that relationship, and look at recent mail from the domain in message trace so you know what normal looks like.

Included in

BenchmarkCIS IDProfile
CIS Microsoft 365 Foundations v7.0.02.1.14E3 Level 1

Check this on your Microsoft 365

ConfigCobra runs this check with every other control of the CIS Microsoft 365 Foundations Benchmark, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial