How to read X-Forefront-Antispam-Report and Microsoft 365 anti-spam headers
By Hari PatelPublished Updated
X-Forefront-Antispam-Report is the header Exchange Online Protection adds to each message it filters. Its semicolon-separated fields record the connecting IP and country, the spam verdict (SFV), the spam confidence level (SCL), the protection that applied (CAT) and any allow entry or rule that skipped filtering, which explains why a phish reached the inbox.
Every message that passes through Exchange Online carries the filter's reasoning in two headers. Reading them tells you whether a phish was missed by the filter, let through by a rule, or allowed by a user.
- Headers:
- X-Forefront-Antispam-Report, X-Microsoft-Antispam
- Answers:
- Why it reached the inbox
- Watch for:
- SFV:SKA, SKN, SFE and SCL:-1
- ATT&CK:
- T1566
Paste your X-Forefront-Antispam-Report or the full headers and every field is decoded in your browser.
Decode your headersOn this page
How Exchange Online stamps SFV, SCL and CAT
- ConnectionThe sending IP (CIP) is checked against your connection filter lists and Microsoft's IP reputation. IPV:CAL records an allow-list hit.
- Mail flow rulesA rule that sets SCL to -1 or bypasses spam filtering is stamped SFV:SKN.
- AuthenticationSPF, DKIM, DMARC and composite authentication run. compauth goes to Authentication-Results, and spoofing can set CAT:SPOOF.
- FilteringSpam, bulk, phishing and impersonation filters set SCL, BCL and the SFV verdict, or a skip value for allowed and safe senders.
- PrecedenceWhen several protections fire, the highest-priority one becomes CAT, for example malware over phishing over spam.
- StampThe fields are written to X-Forefront-Antispam-Report and X-Microsoft-Antispam, and the policy action picks inbox, Junk or quarantine.
What is X-Forefront-Antispam-Report?
It is the header where Exchange Online Protection records its filtering verdict. X-Forefront-Antispam-Report holds the filter's fields as semicolon-separated pairs, such as CIP:203.0.113.45;CTRY:NL;SFV:NSPM;SCL:1;CAT:NONE. X-Microsoft-Antispam holds the bulk complaint level (BCL). Authentication is in Authentication-Results, including compauth, whose reason codes are explained in how to read SPF, DKIM and DMARC. Read the copies stamped by your own tenant.
The fields that matter
| Field | What it tells you |
|---|---|
| CIP | The connecting IP address that handed the message to Microsoft |
| CTRY, LANG | Country of that IP and the detected language of the message |
| H, PTR | The HELO name the sender used and the reverse DNS of the IP |
| IPV | CAL: the IP is on your connection filter allow list. NLI: not on any reputation list |
| SFV | The spam filtering verdict, or why filtering was skipped. See the SFV reference |
| CAT | The protection policy that applied: PHSH, HPHSH, SPOOF, UIMP, DIMP, MALW and more. See the CAT reference |
| SCL | Spam confidence: -1 skipped, 0 to 1 not spam, 5 to 6 spam, 8 to 9 high confidence. See the SCL reference |
| SFTY | Safety tip applied, such as 9.19 for domain impersonation and 9.20 for user impersonation |
| BCL | Bulk complaint level, 0 to 9, in X-Microsoft-Antispam. Higher means more complaints about the sender |
Why did a phish reach the inbox?
- SFV:NSPM with CAT:NONE: the filter judged it clean. Submit it to Microsoft as a false negative after triage.
- SFV:SKA: an allowed sender or domain in an anti-spam policy let it in. Allowing your own domain or a whole vendor domain is the usual gap.
- SFV:SKN or SCL:-1: a mail flow rule bypassed filtering. Find the rule; broad partner-domain rules are routinely abused.
- SFV:SFE: the recipient's own safe senders list. Attackers who compromise a trusted contact benefit from this.
- SFV:SKQ: someone released it from quarantine. Find out who and why.
- IPV:CAL: your connection filter allow list skipped the IP checks.
When several protections flag the same message, CAT shows the one with the highest priority, so a message detected as both phishing and spam shows CAT:PHSH. Microsoft documents the full order in its email protection precedence list.
The email header analyzer decodes each field and points out overrides.
How each role works it
- SOC analyst
- Answers why the message reached the inbox: a filter miss to submit, or an allow entry or rule that let it through and needs fixing.
- Incident responder
- Uses the verdict and policy fields to find every message the same allow rule let through, and closes the gap so the next wave is filtered.
- DFIR
- Records the headers as delivered. Later reclassification and quarantine release change the mailbox state, but not these fields.
- Malware analyst
- Uses CIP, PTR and HELO to tie samples to sending infrastructure and to other campaigns from the same servers.
What the workbench checks
Drop the reported email into the free workbench and these are checked in your browser before you read a line. Nothing is uploaded.
- Decodes every X-Forefront-Antispam-Report and X-Microsoft-Antispam field
- Explains SFV, CAT, SCL, SFTY and BCL values
- Flags allow lists, rule overrides and quarantine releases
- Shows compauth with its reason code
Hunting queries
KQL to scope the campaign and look for impact. The workbench writes these with the real sender, subject, domains and hashes filled in.
EmailEvents
| where Timestamp > ago(30d)
| where ThreatTypes has "Phish" and DeliveryLocation == "Inbox/folder"
| summarize Messages = count(), Recipients = dcount(RecipientEmailAddress)
by OrgLevelPolicy, OrgLevelAction, UserLevelPolicy, UserLevelAction, SenderFromDomain
| sort by Messages descQuestions
What does SFV:SKN mean?
A mail flow rule marked the message as not spam before spam filtering ran, usually by setting SCL to -1. If a phish arrived with SKN, find the rule that matched it.
What does SCL -1 mean?
The message skipped spam filtering because of a safe sender, an allow list, a mail flow rule or because it was internal. On an external phish it means something exempted it. Check SFV to see which.
Why does a phish show SFV:NSPM?
The filter judged it not spam. That is a genuine miss: triage it, purge it, and submit it to Microsoft so the filters learn.
References
- Microsoft: Anti-spam message headers
- Microsoft: Spam confidence level
- Microsoft: Bulk complaint level
- Microsoft: Order and precedence of email protection
Related on WETNav