Security Policy Errors

Troubleshoot Sender ID Filtering and SPF PermError in Exchange Online Protection

Camila MilosovichCamila Milosovich Nov 25, 2026 868 views

Question details

Determine why Sender ID filtering does not appear to apply to messages with SPF errors in Exchange Online Protection.

Troubleshoot Sender ID Filtering and SPF PermError in Exchange Online Protection
Product
Microsoft 365 Exchange Online Protection
Device & OS
not provided
Scenario
An administrator is investigating messages with SPF errors and no DKIM or DMARC policy.
Observed behavior
Sender ID filtering does not appear to be applied to the affected messages.
Before you start

Sign in with an account that can view Microsoft 365 security policies, and obtain the full headers of an affected message. Note the recipient, receiving time, and sending domain so you can identify the applicable policy and SPF record.

Solution 1Recommended

Review the Anti-Spam Policy and Advanced Spam Filtering Settings

Use this approach to check whether the relevant filtering option is enabled and whether the policy applies to the recipient.

1
Open anti-spam policies

In the Microsoft Defender portal, go to Email & collaboration > Policies & rules > Threat policies > Anti-spam policies.

2
Check the applicable policy

Open the inbound anti-spam policies and review their recipients, exclusions, and priority to determine which policy applies to the affected recipient.

3
Review advanced filtering

Open the applicable policy's advanced spam filtering settings and check the Sender ID or SPF-related options available in your tenant. Record whether each relevant option is enabled and its configured action.

4
Compare the message headers

Open the affected message's full headers and look for X-CustomSpam, Authentication-Results, and X-Forefront-Antispam-Report. An X-CustomSpam value can identify a matched Advanced Spam Filtering option; for example, it may name an option such as image links to remote sites.

Review the Anti-Spam Policy and Advanced Spam Filtering Settings
A PermError is not a hard fail: SPF PermError indicates a permanent evaluation error, not an SPF hard-fail result. Do not assume that a setting for hard-fail results will apply to PermError messages.
Free Microsoft Office alternative

Document Your Email Security Investigation With WPS Office

WPS Office is a free, lightweight, easy-to-use Office alternative for documenting policy settings and organizing troubleshooting notes. Its familiar interface and Microsoft Office format compatibility make it easy to move existing documents into your workflow. It does not replace or configure Exchange Online Protection.

Document SPF results and anti-spam policy findings in Writer or SpreadsheetsOpen and edit Microsoft Office formats, including DOCX, XLSX, and PPTXUse a familiar interface for a smoother transition from Microsoft OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Does SPF PermError mean the sender failed SPF?

No. PermError means SPF evaluation encountered a permanent error, such as invalid record syntax or too many DNS lookups. It is distinct from an SPF hard-fail result.

Where can I find the Advanced Spam Filtering settings?

In the Microsoft Defender portal, go to Email & collaboration > Policies & rules > Threat policies > Anti-spam policies, then open the applicable inbound policy and review its advanced filtering settings.

What does the X-CustomSpam header tell me?

X-CustomSpam can identify an Advanced Spam Filtering option that a message matched. Compare its value with the enabled options in the policy that applies to the recipient.

Does the absence of DKIM or DMARC explain the Sender ID filtering result?

Not by itself. Review the message's Authentication-Results header, the applicable anti-spam policy, and the specific advanced filtering setting before drawing a conclusion.

What should I share for further diagnosis?

Share the relevant anti-spam policy configuration or a screenshot of its advanced filtering settings, along with the affected message headers. Remove sensitive information before sharing.