Email Security Deployment, Disposition Routing, and Inbound Policies
How to choose MX, API, or BCC deployment, route dispositions to quarantine or junk, and configure allow policies and auto-moves.
This page summarizes Cloudflare documentation on Email security: how mail is inspected, which deployment path fits your provider, how dispositions drive junk and quarantine behavior (especially with Microsoft 365 as MX), and which inbound policies reduce false positives without widening risk.
Deployment paths: pre-delivery MX versus post-delivery API and BCC
Section titled “Deployment paths: pre-delivery MX versus post-delivery API and BCC”Email security supports two families of deployment. Post-delivery covers scanning after mail lands in the mailbox (API and BCC/Journaling). Pre-delivery (MX/Inline) scans before delivery, with MX records pointing to Cloudflare.
When you choose post-delivery deployment, Cloudflare scans emails after they reach a users’ inbox.
— Cloudflare, Before you begin
When you choose pre-delivery deployment, Cloudflare scans emails before they reach a users’ inbox. The MX record points to Cloudflare.
— Cloudflare, Before you begin
| Feature | Microsoft 365 | Google Workspace | Others |
|---|---|---|---|
| Deployment type | API and MX | BCC and MX | MX only |
| API integration | Microsoft Graph API | BCC only | None |
| BCC/Journaling | Journal rule (Purview) | BCC rules | Journaling |
| Inline/MX | MX to Cloudflare | MX to Cloudflare | MX to Cloudflare |
| Message remediation (typical) | Auto-moves via API; inline can block/quarantine/modify | Same pattern | Inline: block, quarantine, modify |
Common conclusion: MX/Inline offers the strongest pre-inbox control (headers, link actions, text add-ons). API and BCC/Journaling avoid MX changes but introduce dwell time—threats may sit in the inbox until auto-move runs. Cloudflare’s reference architecture typically recommends MX when Email security is the primary phishing control; API is the quickest start for complex Microsoft 365 environments without mail-flow changes. See Understanding Email Security Deployments and Deployment models.
MX/Inline deployment: what you gain and what you must plan
Section titled “MX/Inline deployment: what you gain and what you must plan”With pre-delivery deployment, also known as Inline deployment, Email security evaluates email messages before they reach a user’s inbox.
— Cloudflare, MX/Inline deployment
Benefits include blocking before the mailbox, subject/body mark-ups, and the X-CFEmailSecurity-Disposition header for downstream rules. Plan TTL reduction before MX cutover, egress IPs on the allowlist, and provider-specific prerequisites (Microsoft 365 as MX Record, Google Workspace as MX Record, Egress IPs).
API and BCC/Journaling: post-delivery trade-offs
Section titled “API and BCC/Journaling: post-delivery trade-offs”When you choose an API deployment, email messages only reach Email security after they have already reached a user’s inbox. Then, through an integration with your email provider, Email security can auto-move messages based on your organization’s policies.
— Cloudflare, API deployment
API limitations matter for expectations:
Messages cannot be modified or quarantined.
— Cloudflare, API deployment
BCC/Journaling sends a copy via SMTP after delivery; Gmail uses Add BCC rules, Microsoft 365 uses Microsoft 365 journaling setup. Auto-move for BCC/Journaling generally requires an associated integration (Before you begin, Enable auto-moves).
Dispositions and the X-CFEmailSecurity-Disposition header
Section titled “Dispositions and the X-CFEmailSecurity-Disposition header”After inline scanning, Cloudflare assigns a disposition (for example MALICIOUS, UCE for spam, BULK, SPOOF, SUSPICIOUS, Clean) and can add X-CFEmailSecurity-Disposition so the downstream mail system applies junk folder, quarantine, or hosted quarantine actions.
Google Workspace can route by header—for example X-CFEmailSecurity-Disposition: MALICIOUS into an admin quarantine (Google Workspace as MX Record). Microsoft 365 typically combines anti-spam policies, quarantine policies, and Exchange transport rules keyed on the same header and egress IPs.
Microsoft 365 disposition routing: junk folder versus user versus admin quarantine
Section titled “Microsoft 365 disposition routing: junk folder versus user versus admin quarantine”When Email security is MX and Microsoft 365 is the next hop, administrators choose how each disposition maps to Junk Email, user-managed quarantine, or administrative quarantine. Cloudflare documents five patterns in Use cases.
| Pattern | Bulk / junk | Spam / spoof / malicious handling |
|---|---|---|
| 1 - Junk and Admin Quarantine | Junk folder | High-confidence spam, phishing → admin release quarantine |
| 2 - Junk and user managed quarantine | Junk for BULK |
UCE/SPOOF → user quarantine (SCL 9) |
| 3 - Junk and administrative quarantine | Junk for BULK |
MALICIOUS/UCE/SPOOF → admin path |
| 4 - User and admin quarantine | — | Spam/spoof user; malicious admin |
| 5 - Junk and administrative quarantine | Junk for BULK |
Hosted quarantine for MALICIOUS/UCE/SPOOF |
Shared Microsoft 365 building blocks across these tutorials:
Quarantine policies: who can release mail?
Section titled “Quarantine policies: who can release mail?”Custom policies such as UserNotifyUserRelease let recipients release mail; UserNotifyAdminRelease lets them request release. Enable Quarantine notification and set frequency under Quarantine policies → Global settings (1 - Junk email and Email security Admin Quarantine). Retain quarantined spam 15–30 days per Email security guidance.
Anti-spam inbound policy actions
Section titled “Anti-spam inbound policy actions”Default inbound anti-spam actions pair Spam (often junk folder) with High confidence spam / phishing → Quarantine and a named quarantine policy. Pattern 5 uses AdminOnlyAccessPolicy for all quarantine tiers (5 - Junk email folder and administrative quarantine).
Transport rules: header disposition plus egress IP and SCL
Section titled “Transport rules: header disposition plus egress IP and SCL”Transport rules typically require:
- Header
X-CFEmailSecurity-Dispositioncontains disposition tokens (BULK,UCE,SPOOF,MALICIOUS, …). - Sender IP matches Egress IPs.
- Action: Set Spam Confidence Level (SCL) — often
5for junk routing,9for quarantine — or Redirect to hosted quarantine for admin-only flows.
Example from pattern 2:
Name:
Email security User Quarantine Message. … Enter words:UCE,SPOOF… Set the Spam Confidence Level (SCL) >9.— Cloudflare, 2 - Junk email and user managed quarantine
Pattern 5 redirects severe dispositions to hosted quarantine instead of SCL-only handling (5 - Junk email folder and administrative quarantine).
Auto-moves: remediation when mail is already in the inbox
Section titled “Auto-moves: remediation when mail is already in the inbox”For post-delivery integrations, Auto-moves enforce policy without user action:
Auto-moves allow you to automatically move emails out of your inbox based on a disposition that Email security assigns to each message (for example, malicious, spam, or spoof).
— Cloudflare, Auto-move events
Per disposition you can choose soft delete (Microsoft 365 user-recoverable), hard delete (admin-recoverable), trash (Google Workspace), junk, or no action (Configure auto-moves). API deployment cannot inline-quarantine or modify bodies; remediation is move/delete via Graph/Gmail APIs subject to provider throttling (Understanding Email Security Deployments).
Inbound policies: allow lists, blocks, and BEC registry
Section titled “Inbound policies: allow lists, blocks, and BEC registry”Allow policies: Trust sender, Accept sender, Exempt recipient
Section titled “Allow policies: Trust sender, Accept sender, Exempt recipient”An allow policy exempts messages that match certain patterns from normal detection scanning.
— Cloudflare, Allow policies
| Action | Effect | Typical use |
|---|---|---|
| Trust sender | Bypass all detections and link following | Phishing simulations (e.g. KnowBe4) |
| Accept sender | Exempt from Spam, Spoof, Bulk (not Malicious/Suspicious) | Legitimate bulk or internal-tool mail |
| Exempt recipient | Skip detections for matching recipients | Submission mailboxes |
Cloudflare recommends Accept sender with Sender verification (DMARC/SPF/DKIM pass) for systematic traffic (Detection settings best practices). If authentication cannot pass, use static IPv4 with verification off—not spoofable domain-only rules (Allow policies).
Impersonation registry and trusted domains
Section titled “Impersonation registry and trusted domains”Register executives and finance roles in the Impersonation registry for enhanced BEC detection; sync from directory when possible and review quarterly (Before you begin). Trusted domains address lookalike and young-domain detections (Trusted domains). Blocked senders and Blocked content (regex on subject/body → malicious disposition) add explicit deny paths (Blocked senders, Blocked content).
Common mistakes
Section titled “Common mistakes”- Enabling “secure inbound only from Email security” before 72 hours of stable MX, breaking mail for domains still propagating.
- Transport rules without egress IP AND header checks, so non-Cloudflare mail is misclassified.
- Mixing quarantine policy names in anti-spam actions versus transport rules (
UserNotifyUserReleasevsUserNotifyAdminRelease). - Expecting URL rewrite or body banners on API/BCC deployments—those require MX/Inline.
- Broad Trust sender allow policies instead of narrow Accept sender + sender verification.
- Manual add BCC domains without integration: no auto-move or directory sync (Manually add domains).
How to check this on your site
Section titled “How to check this on your site”- In Cloudflare One → Email security → Settings → Domain management → Domains, confirm Status is Active and Configured method matches your chosen path (MS Graph API, BCC/Journaling, or MX/Inline) per Domains.
- Send a test message and verify it appears under Monitoring with the expected disposition (Before you begin configuration checklist).
- For MX/Inline Microsoft 365, confirm egress IPs on the connection filter and that a sample flagged message shows
X-CFEmailSecurity-Dispositionand lands in the intended junk or quarantine per your use case. - For Gmail BCC, confirm domain Active after compliance BCC rules (Add BCC rules).
- You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about.