Skip to content
iBlockSpam
Setup guides

How do you configure anti-spam policies in Microsoft 365?

By iBlockSpam Team How we check our guides Updated 10 min read 6 sources
Short answer

Microsoft 365 has three anti-spam policy types: inbound anti-spam policies (bulk threshold, verdict actions, ZAP, quarantine policies), the outbound spam policy (sending limits, auto-forwarding) and the connection filter policy (IP Allow and Block Lists). Most tenants should use the Standard or Strict preset values, leave the allow lists empty and set outbound limits explicitly.

Every Microsoft 365 tenant with cloud mailboxes runs three kinds of anti-spam policy, and most are left at defaults nobody chose. This guide walks through each setting in the inbound, outbound and connection filter policies, gives Microsoft's Standard and Strict values side by side, and flags the settings that quietly weaken filtering.

If you're chasing a specific problem rather than reviewing settings, start with why spam gets through Microsoft 365 or why good mail goes to Junk.

Which anti-spam policies does Microsoft 365 have?

All three live on one page in the Microsoft Defender portal: Email & collaboration > Policies & rules > Threat policies > Anti-spam in the Policies section, or https://security.microsoft.com/antispam (Microsoft Learn).

Policy What it controls Default you can't delete
Inbound anti-spam policy Bulk threshold, actions per verdict, ZAP, quarantine policies, allow and block lists Anti-spam inbound policy (Default)
Outbound spam policy Per-user sending limits, what happens when they're hit, automatic external forwarding The default outbound policy
Connection filter policy IP Allow List, IP Block List, safe list Connection filter policy (Default)

You need the Organization Management or Security Administrator role group, or the Entra Security Administrator role, to change them.

The default inbound policy applies to everyone and always runs last. Custom policies run in priority order before it. But if a recipient is covered by the Standard or Strict preset security policy, Microsoft says settings in the default or custom anti-spam policies "are ignored" for that person. See preset security policies in Microsoft 365 for how that precedence works.

What does each inbound anti-spam setting do?

The inbound policy wizard has three pages that matter: Bulk email threshold & spam properties, Actions, and Allow & block list.

Bulk email threshold

Microsoft scores mail from bulk senders with a bulk complaint level (BCL) from 0 to 9. The slider sets the BCL at which the Bulk compliant level (BCL) met or exceeded verdict fires. A higher value means more bulk mail reaches the inbox.

One PowerShell-only setting changes everything here: MarkAsSpamBulkMail. It's On by default. If someone set it to Off, Microsoft says messages are stamped with the BCL but "no action is taken", which makes the threshold irrelevant (Microsoft Learn).

Spam properties

Increase spam score, Mark as spam and Test mode are the Advanced Spam Filter (ASF) options. All are off by default and in both presets, and Microsoft recommends leaving them off. Contains specific languages and From these countries (listed as From these regions in Microsoft's recommended settings table) mark mail as spam by language or source country. Microsoft has no recommendation for either.

Verdict actions

Each spam filtering verdict gets an action. Available actions are Move message to Junk Email folder, Add X-header, Prepend subject line with text, Redirect message to email address, Delete message, Quarantine message and, for bulk only, No action.

For High confidence phishing, Microsoft says the Junk action is "effectively deprecated". Those messages are always quarantined, and users can only request release.

Quarantine policies

When a verdict's action is Quarantine message, you pick a quarantine policy. It decides whether users can release the message and whether they get notifications. A blank box means the default policy for that verdict. AdminOnlyAccessPolicy gives users no release rights. DefaultFullAccessPolicy allows release but sends no notifications. DefaultFullAccessWithNotificationPolicy allows release and notifies. Our guide to releasing quarantined email in Microsoft 365 covers the permission groups.

Retain spam in quarantine for this many days accepts 1 to 30 days, with 15 as the default. Microsoft notes it also controls retention for messages quarantined by anti-phishing policies.

Other settings on the Actions page

  • Intra-Organizational messages to take action on: whether verdict actions apply to internal mail. Default is the same as High confidence phishing messages.
  • Enable spam safety tips: on by default.
  • Bulk moves enabled (in preview at the time of writing, October 2026): tags bulk mail and moves mail below the threshold to a Promotions folder in supported Outlook versions.
  • Zero-hour auto purge (ZAP): acts on messages already delivered when a later verdict says they're spam or phishing. Both Enable ZAP for phishing messages and Enable ZAP for spam messages are on by default, and Microsoft recommends leaving them on.

These come from Microsoft's recommended settings table, checked at the time of writing (October 2026).

Setting Default policy Standard Strict
Bulk email threshold 7 6 5
Spam action Junk Email Junk Email Quarantine
High confidence spam action Junk Email Quarantine Quarantine
Phishing action Junk Email Quarantine Quarantine
High confidence phishing action Quarantine Quarantine Quarantine
Bulk action Junk Email Junk Email Quarantine
Quarantine policy, high confidence spam and phishing DefaultFullAccessPolicy DefaultFullAccessWithNotificationPolicy DefaultFullAccessWithNotificationPolicy
Quarantine policy, high confidence phishing AdminOnlyAccessPolicy AdminOnlyAccessPolicy AdminOnlyAccessPolicy
Retain spam in quarantine 15 days 30 days 30 days
ZAP for spam and phishing On On On
Allowed senders and domains None None None

Two details are easy to miss. The phishing action defaults to Junk Email in the default policy and in new policies created in PowerShell, but to Quarantine in new policies created in the Defender portal. And in Strict, spam and bulk use DefaultFullAccessWithNotificationPolicy, so users are told about what was held.

Microsoft's own tip is to put users in the Standard or Strict preset rather than maintain custom anti-spam policies. Use a custom policy when you need something the presets can't do, such as a different bulk threshold for one team.

Why does Microsoft discourage allow lists?

The Allow & block list page holds four lists: allowed senders, allowed domains, blocked senders and blocked domains. They hold about 1,000 entries each, but the portal accepts only 30, so larger lists need PowerShell. You can't configure them in the Standard or Strict presets at all.

Microsoft's warning about the allow lists is blunt (Microsoft Learn):

  • Allowed entries "bypass most email protection (except malware and high confidence phishing)" and skip SPF, DKIM and DMARC.
  • They "create a high risk of attackers successfully delivering email to the Inbox that would otherwise be filtered."
  • They're "best used for temporary testing only."
  • "Never add common domains (for example, microsoft.com or office.com)", because attackers can spoof them.

Microsoft adds one safeguard: since September 2022, allowed entries that are in your own accepted domains must pass email authentication to skip filtering. Microsoft describes that check only for your own domains, so don't count on it for external ones: an allow entry for a big SaaS brand could let in mail that forges it.

Use these instead:

  1. Report the message as clean on the Submissions page and choose Allow this message. That creates a Tenant Allow/Block List entry that, by default, is removed 45 days after it was last used.
  2. Allow a spoofed sender pair in the Tenant Allow/Block List when a real sender fails authentication.
  3. Use the blocked lists only when you want to stop inbound mail but still let staff write to that domain. Tenant Allow/Block List blocks also stop outbound mail. Our guide to blocking senders in Microsoft 365 compares the options.

If you inherited a tenant, open each inbound policy now and check this page. An old allowed domain is one of the most common reasons spam skips filtering, and the header shows it as SFV:SKA.

How should you set outbound spam limits?

The outbound policy limits how many recipients one user can send to. It doesn't filter content; every outbound message is scanned for spam anyway, and mail judged as spam leaves through Microsoft's separate high-risk delivery pool (Microsoft Learn).

The default policy uses 0 for each limit, which Microsoft says "means use the service defaults". Microsoft publishes recommended values:

Setting Default Recommended Standard Recommended Strict
External message limit (recipients per hour) 0 500 400
Internal message limit (recipients per hour) 0 1,000 800
Daily message limit 0 1,000 800
Restriction when a limit is reached Restrict sending until the following day Restrict the user from sending mail Restrict the user from sending mail
Automatic forwarding rules Automatic - System-controlled Off - Forwarding is disabled Off - Forwarding is disabled

Outbound spam policies aren't part of the Standard or Strict presets, so nothing applies these values for you. Set them on the default outbound policy, and create a custom policy with higher limits for any mailbox that legitimately sends more.

Turning automatic external forwarding Off matters most. Attackers who take over a mailbox often add a forwarding rule; see malicious inbox rules and auto-forwarding. If a user hits a limit, the default alert policy User restricted from sending email notifies global admins. Our guide to unblocking a user restricted from sending covers recovery.

What does the connection filter policy do?

There's only one connection filter policy, Connection filter policy (Default). It has three parts (Microsoft Learn):

  • IP Allow List: skips spam filtering for listed source IPs. Malware and high confidence phishing are still scanned.
  • IP Block List: rejects all mail from listed IPs, with no further filtering. Blocked messages don't appear in message trace.
  • Turn on safe list: a Microsoft-maintained list of trusted senders, built from third-party lists you can't see or edit, whose mail also skips spam filtering.

Each list holds up to 1,273 entries. CIDR entries must be /24 to /32, IPv6 isn't supported, and the IP Allow List wins if an address is on both lists.

Two cautions. First, the bypass isn't absolute: Microsoft says the IP Allow List is "an input, not a final decision" under secure by default, so some mail from listed IPs can still be filtered. Second, never put a shared or consumer service's ranges here.

Don't use the IP Allow List for a filtering gateway

If your MX points to a filtering service in front of Microsoft 365, adding its IPs to the IP Allow List tells Microsoft to skip spam checks for every message the service relays, including spoofed ones. Microsoft's supported approach is an inbound connector with Enhanced Filtering for Connectors, which lets Microsoft see the original sender and keep filtering. Then lock down direct delivery so nobody can skip the gateway.

Anti-spam policy review checklist

  1. Put users in the Standard or Strict preset, or match their values in your custom policies.
  2. Confirm MarkAsSpamBulkMail is On: Get-HostedContentFilterPolicy | Format-Table Name,MarkAsSpamBulkMail,BulkThreshold.
  3. Empty the allowed senders and domains lists in every inbound policy.
  4. Check that quarantined verdicts use a quarantine policy with notifications, except high confidence phishing and malware.
  5. Leave ZAP for spam and phishing on.
  6. Set explicit outbound limits and turn automatic external forwarding off.
  7. Review the IP Allow List and remove anything you can't explain.
  8. Test with a GTUBE message, which Microsoft documents for checking that spam actions apply.

Next steps

Browse all spam filter setup guides.

Frequently asked questions

What is the default bulk email threshold in Microsoft 365?

The default anti-spam policy uses a bulk email threshold of 7, so messages with a bulk complaint level (BCL) of 7 or higher get the bulk action. Microsoft's Standard recommendation is 6 and Strict is 5. Lower numbers catch more newsletters and marketing mail, including some that users may want.

Can I turn off spam filtering in Microsoft 365?

No. Microsoft says you can't completely turn off spam filtering. A mail flow rule can bypass most spam filtering, for example for mail from a filtering gateway, but high confidence phishing is still filtered and malware scanning always runs. For a gateway, Microsoft recommends Enhanced Filtering for Connectors instead of a bypass rule.

Why does Microsoft discourage the allowed senders list in anti-spam policies?

Microsoft says entries in the allowed senders and allowed domains lists bypass most email protection, except malware and high confidence phishing, and skip SPF, DKIM and DMARC checks. That creates a high risk that attackers who forge an allowed domain reach the inbox. Microsoft calls these lists best for temporary testing only.

Are outbound spam policies part of the Standard and Strict presets?

No. Microsoft states that outbound spam policies aren't part of preset security policies. The default outbound spam policy protects everyone, including preset members. The Standard and Strict values Microsoft publishes for outbound limits are recommendations you apply yourself to the default or a custom outbound policy.

How many entries can the IP Allow List hold?

The IP Allow List and IP Block List in the default connection filter policy each support up to 1,273 entries. An entry can be a single IPv4 address, a range, or a CIDR block from /24 to /32. IPv6 ranges aren't supported there; use the Tenant Allow/Block List for IPv6 instead.

Sources

  1. Microsoft Learn: Configure spam filter policies
  2. Microsoft Learn: Recommended email and collaboration threat policy settings
  3. Microsoft Learn: Anti-spam protection in cloud organizations
  4. Microsoft Learn: Configure the default connection filter policy
  5. Microsoft Learn: Outbound spam protection
  6. Microsoft Learn: Preset security policies

See how your domain measures up

Run a free Email Health Check: MX, SPF, DKIM, DMARC and transport security in one scan, with the raw records shown. No sign-up.

Keep reading