How do you set up the advanced delivery policy for phishing simulations in Microsoft 365?
In the Microsoft Defender portal, open Advanced delivery under Threat policies. On the Phishing simulation tab, add your vendor's sending domain (MAIL FROM or DKIM domain) and sending IPs, plus simulation URLs only for non-email lures. Add security team mailboxes on the SecOps mailbox tab. Use it instead of allow lists or transport rules, which don't reliably deliver simulations.
On this page 8 sections
Third-party phishing simulations have a built-in problem in Microsoft 365: the better the test looks like phishing, the more likely Microsoft is to quarantine it. The fix isn't an allow list or a transport rule. It's the advanced delivery policy, which Microsoft built for exactly two jobs: delivering simulations and filling SecOps mailboxes.
This guide covers what the policy does, how to fill it in correctly, and the routing cases where it fails.
Why don't allow lists or transport rules work for simulations?
Microsoft 365 is "secure by default." Messages identified as malware or high confidence phishing are quarantined, and Microsoft says some organization overrides "aren't applied for malware or high confidence phishing" (Microsoft Learn). The overrides it lists are:
- Allowed sender or domain lists in anti-spam policies.
- Outlook Safe Senders.
- The IP Allow List in the connection filter policy.
- Exchange mail flow rules (transport rules).
A phishing simulation is designed to look like high confidence phishing. So a transport rule that sets SCL -1 for your vendor's domain might work for a gentle test and then fail on a convincing one. It also opens a hole: anyone who forges that domain gets the same bypass. Microsoft's allowlist guidance warns that rules matching only a sender domain "significantly" increase spoofing risk.
Microsoft's secure by default page lists the few cases where overrides make sense. Two of them, phishing simulations and security team mailboxes, are handled by the advanced delivery policy.
What does the advanced delivery policy do?
For simulation and SecOps messages, Microsoft says (Microsoft Learn):
- "Filters in Microsoft 365 take no action on these messages." Malware filtering is bypassed for SecOps mailboxes only.
- Zero-hour auto purge for spam and phishing takes no action. ZAP for malware is bypassed for SecOps mailboxes only.
- Safe Links doesn't block or detonate the specified URLs at time of click. "URLs are still wrapped, but they aren't blocked."
- Safe Attachments doesn't detonate attachments.
- Default system alerts aren't triggered, and automated investigation and response (AIR) ignores the messages.
For simulations specifically, a user who reports the message with Outlook's built-in Report button doesn't trigger an alert, investigation or incident, but the report still appears on the User reported tab of the Submissions page. That lets your simulation vendor and your reporting statistics line up.
Messages let through this way are marked with a Phishing simulation or SecOps mailbox system override. You can filter on that value in Threat Explorer, Real-time detections, the Email entity page, the Threat protection status report, Campaign Views and advanced hunting.
| Feature | Third-party phishing simulation | SecOps mailbox |
|---|---|---|
| Spam and phishing filtering | Skipped | Skipped |
| Malware filtering | Still applies | Skipped |
| ZAP for spam and phishing | Skipped | Skipped |
| ZAP for malware | Still applies | Skipped |
| Safe Links at click | Not blocked, still wrapped | Not blocked, still wrapped |
| Safe Attachments detonation | Skipped | Skipped |
| How matched | Sender domain plus sending IP | Recipient mailbox |
What do you need before you start?
- Permissions. Creating or changing entries needs the Security Administrator role group in Email & collaboration RBAC plus Organization Management in Exchange Online, or the matching Defender XDR unified RBAC permission. Security Reader and Global Reader give read-only access.
- A sample simulation message. Ask the vendor for a test send, or use one from a previous campaign, and copy its headers.
- The vendor's published details: sending IPs and the domains they use for the envelope sender or DKIM.
Read the sample's Authentication-Results header, for example with our Email Header Analyzer. Microsoft's example (Microsoft Learn):
Authentication-Results: spf=pass (sender IP is 172.17.17.7)
smtp.mailfrom=contoso.com; dkim=pass (signature was verified)
header.d=contoso-simulation.com; dmarc=pass action=none header.from=contoso-simulation.com;
Here the sending IP is 172.17.17.7, the MAIL FROM domain is contoso.com and the DKIM domain is contoso-simulation.com. Either domain, with that IP, would match.
How to add a third-party phishing simulation
- In the Microsoft Defender portal, go to Email & collaboration > Policies & rules > Threat policies > Advanced delivery in the Rules section, or open
https://security.microsoft.com/advanceddelivery. - Select the Phishing simulation tab, then Add (or Edit if entries exist).
- Under Domain, enter the 5321.MailFrom domain or the DKIM domain the vendor uses. Use Punycode for internationalized domains.
- Under Sending IP, enter the vendor's IPv4 addresses as single IPs, ranges or CIDR blocks.
- Under Simulation URLs to allow, add entries only for non-email lures, such as links in Teams messages or Office documents.
- Select Add, review the confirmation, and select Close.
Microsoft says a message must match "at least one Domain and one Sending IP, but no association between values is maintained." In other words, every listed domain is paired with every listed IP. Keep both lists tight.
Limits at the time of writing (October 2026)
| Entry type | Portal limit | Notes |
|---|---|---|
| Domain | 50 | MAIL FROM or DKIM domain, not just the visible From |
| Sending IP | 10 | IPv4 in the portal; IPv6 only via PowerShell |
| Simulation URLs | 30 | Not needed for email lures |
Don't add simulation URLs to the Do not rewrite the following URLs list in Safe Links policies. Microsoft warns this "might result in unwanted alerts for URL clicks," and simulation URLs in email are already allowed during mail flow and at time of click.
The same steps in PowerShell
The policy and rule are separate objects. In Exchange Online PowerShell:
New-PhishSimOverridePolicy -Name PhishSimOverridePolicy
New-ExoPhishSimOverrideRule -Policy PhishSimOverridePolicy -Domains fabrikam.com,wingtiptoys.com -SenderIpRanges 192.168.1.55
PowerShell is also how you add IPv6 ranges. To change entries later, pipe Get-ExoPhishSimOverrideRule to Set-ExoPhishSimOverrideRule with -AddSenderDomainIs, -RemoveSenderDomainIs, -AddSenderIpRanges or -RemoveSenderIpRanges.
How to add a SecOps mailbox
A SecOps mailbox receives everything unfiltered so your security team can analyze it. A common use is the mailbox that receives user-reported messages. Microsoft's user reported settings guidance tells you to configure that reporting mailbox as a SecOps mailbox, and our guide to the Report button covers the rest of that setup.
- On the Advanced delivery page, stay on the SecOps mailbox tab and select Add (or Edit).
- Select an existing Exchange Online mailbox. Distribution groups aren't allowed.
- Select Add, then Close.
In PowerShell, it's a policy plus a rule:
New-SecOpsOverridePolicy -Name SecOpsOverridePolicy -SentTo secops@contoso.com
New-ExoSecOpsOverrideRule -Name SecOpsOverrideRule -Policy SecOpsOverridePolicy
Treat SecOps mailboxes as hazardous. Malware isn't filtered on the way in, so only trained staff should open them, ideally from an isolated device, and nobody should use them for normal mail.
When does the advanced delivery policy fail?
Most failures come from routing, not from the entries.
Your MX points somewhere other than Microsoft 365
If mail passes through a gateway first, Microsoft 365 sees the gateway as the sender. Microsoft says the IP address in the Authentication-Results header must match the IP address in the policy, and if they don't, you "might need to configure Enhanced Filtering for Connectors so the correct IP address is detected" (Microsoft Learn). Enhanced Filtering for Connectors lets Microsoft 365 skip your gateway's IPs and find the real source. Our Enhanced Filtering guide explains the setup.
Don't fix a mismatch by adding your gateway's IPs to the simulation entry. Microsoft gives this warning for the in-and-out routing case below, and the logic is the same: doing so "effectively bypasses spam filtering for any internet sender who impersonates the domain specified in the non-Microsoft phishing simulation."
Remember that the gateway filters the simulation too. It needs its own narrow exception for the vendor's sending IPs, set for the campaign window. A gateway allow entry that requires sender verification, like iBlockSpam's approved sender lists, keeps that exception from becoming a spoofing route.
In-and-out routing through another service
Enhanced Filtering for Connectors doesn't work for simulations when mail goes Internet > Microsoft 365 > on-premises or non-Microsoft service > back to Microsoft 365. Microsoft 365 can't find the true source IP in that path.
Internal simulations and direct injection
The policy doesn't currently support simulations within the same organization (DIR:INT), especially through an Exchange Server hybrid gateway. Microsoft's workarounds are a dedicated Receive connector that doesn't authenticate the simulation as internal, or routing the simulation straight to your Microsoft 365 MX endpoint. The policy needs messages to pass through the transport pipeline, so Microsoft says it doesn't apply to direct injection emails, which bypass transport.
Safe Links on older Outlook clients
If you use the Built-in protection preset policy, or custom Safe Links policies with Do not rewrite URLs, do checks via SafeLinks API only, Microsoft lists minimum Outlook versions for simulation links to be treated correctly at click time. On older clients, consider turning that setting off in custom Safe Links policies.
How to run simulations safely
- Use the advanced delivery policy, not SCL -1 rules or allowed domains.
- Enter the vendor's envelope or DKIM domains, not common public domains.
- Enter only the vendor's documented sending IPs.
- Remove entries for vendors you no longer use.
- Confirm the gateway exception (if any) is narrow and time-limited.
- Check after each campaign that messages show the Phishing simulation override in Threat Explorer or the Email entity page.
- Keep SecOps mailboxes to dedicated security mailboxes.
Simulations are only one part of training. Our guide to security awareness training covers where they help and where they backfire. If you have Defender for Office 365 Plan 2, Microsoft's own attack simulation training is an alternative; see Plan 1 vs Plan 2.
Next steps
- Open
https://security.microsoft.com/advanceddeliveryand review both tabs for stale entries. - Search your mail flow rules for any SCL -1 rule created for a simulation vendor, and replace it with an advanced delivery entry.
- Send one test simulation and confirm the IP in
Authentication-Resultsmatches your entry. - If your MX points to a gateway, confirm Enhanced Filtering for Connectors is on with an MX Lookup and a header check.
See all spam filter setup guides.
Frequently asked questions
Why do phishing simulation emails get quarantined in Microsoft 365?
A good simulation looks like phishing, so Microsoft 365 often flags it as phishing or high confidence phishing. Under secure by default, allow lists and mail flow rules don't override high confidence phishing or malware. The advanced delivery policy is the supported way to tell Microsoft 365 the messages are a simulation.
How many domains and IPs can the advanced delivery policy hold?
In the Defender portal, the Phishing simulation tab accepts up to 50 domain entries, 10 sending IP entries and 30 simulation URL entries. IP entries can be single addresses, ranges or CIDR blocks. Microsoft notes that IPv6 addresses can currently be added only with PowerShell.
Which domain do I enter for a phishing simulation vendor?
Enter the domain from the envelope sender (the 5321.MailFrom, shown as smtp.mailfrom in Authentication-Results) or the DKIM signing domain (header.d), not just the visible From domain. A message must match at least one listed domain and at least one sending IP to be treated as a simulation.
Do I need simulation URLs for email-based phishing tests?
No. Microsoft says simulation URLs aren't required for links in email phishing simulations, because those links are allowed automatically during mail flow and at time of click. Use the URL list only for lures delivered another way, such as links in Teams messages or Office documents.
What is a SecOps mailbox in Microsoft 365?
It's a mailbox your security team uses to receive messages unfiltered, good and bad, for analysis. Messages to it skip Microsoft 365 filtering, including malware filtering and ZAP for malware. Add only dedicated security mailboxes; distribution groups aren't allowed, and nobody should use these mailboxes for everyday mail.
Sources
- Microsoft Learn: Configure the advanced delivery policy for non-Microsoft phishing simulations and email delivery to SecOps mailboxes
- Microsoft Learn: Secure by default in cloud organizations
- Microsoft Learn: Create allowlists
- Microsoft Learn: Configure user reported message settings
- Microsoft Learn: Enhanced Filtering for Connectors in Exchange Online
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
How to use an external spam filter with Microsoft 365 and Enhanced Filtering for Connectors
How to run an MX-level spam filter in front of Exchange Online: Partner connector, Enhanced Filtering for Connectors, why not SCL -1, headers and rollback.
10 min read Choosing a filterDefender for Office 365 Plan 1 vs Plan 2: which do you need?
What Exchange Online Protection includes, what Defender for Office 365 Plan 1 and Plan 2 add, which Microsoft 365 plans include each, and list prices.
9 min read Setup guidesHow do Exchange Server's built-in anti-spam agents work, and are they enough?
Exchange Server's built-in anti-spam agents: what each does, Mailbox vs Edge, installing with Install-AntiSpamAgents.ps1, their limits, and adding a hosted gateway.
10 min read