Understanding Email Security Deployments·续
Benefits of API deployment
- Easy way to add protection in complex email architectures with no changes to mail flow operations.
- Agentless deployment for Microsoft 365.
- Microsoft 365 Defender/ATP operates on the message first.
- This method can be used for a Proof of Value to collect and report on emails without requiring changes to mail flow. In this scenario you would leave the remediation policy not configured to prevent actions being taken.
Considerations
Before deploying Email security via API deployment, you will need to consider the following:
- Depending on the API infrastructure, Microsoft 365 or Google outages and maintenance windows will increase message dwell time in the inbox as emails cannot be scanned or remediated until after delivery to the user. This is a limitation of all API vendors.
- Microsoft Graph applies both global and service-specific throttling limits. The Mail API is subject to Outlook service limits. Throttling can delay message retrieval and remediation, increasing message dwell time. The following Outlook limits apply to each application ID and mailbox combination:
- 10,000 API requests in a 10-minute period
- Four concurrent requests
- 150 megabytes (MB) upload (
PATCH,POST,PUT) in a five-minute period - Exceeding these limits for one mailbox does not affect access to another mailbox. Other Graph limits can also trigger throttling. Refer to Outlook service limits ↗︎.
- Throttled requests return HTTP
429. Microsoft recommends honoring theRetry-Afterresponse header, or exponential backoff when that header is absent. Refer to Microsoft Graph throttling guidance ↗︎. - The Gmail API uses quota units to measure API usage. For projects subject to Google's updated quotas, the published limits and method costs are:
- 1,200,000 quota units per minute per project
- 6,000 quota units per minute per user per project
messages.getconsumes 20 quota units, or 60 withformat=full,format=raw, orformat=html.messages.attachments.getconsumes 20 quota units. Remediation also consumes quota:messages.modifyuses five units andmessages.batchModifyuses 50. Refer to Gmail API usage limits ↗︎.- Google documents different quotas for new and existing projects during its quota transition. Check the integration project's effective quotas in Google Cloud. Google also documents an 80,000,000-quota-unit daily billing threshold per project, with billing rollout subject to advance notice. Refer to Google Workspace API quota and billing changes ↗︎.
- Per-user bandwidth and concurrent request limits also apply. These are shared across Gmail API clients accessing the same user. Quota limits can produce HTTP
403errors. Bandwidth or concurrency limits can produce HTTP429errors. Google recommends exponential backoff for retryable failures. Refer to Resolve Gmail API errors ↗︎. - Requires read/write access into mailboxes which some security/email teams may not allow.
- Cloudflare uses Microsoft Graph for Microsoft 365 API ingestion and remediation. For Google Workspace, Cloudflare uses a compliance rule to deliver emails through SMTP for scanning and the Gmail API for remediation. On-prem Exchange requires PowerShell and does not have APIs for auto-moves.
- Messages cannot be modified after delivery as per Microsoft 365/Google requirements. This means we cannot perform URL Rewriting to Cloudflare email link isolation or append text to the email subject or body. Those features are only available using an Inline deployment.
BCC/Journaling
BCC/Journaling is very similar to API deployments with the exception of how emails are delivered to Cloudflare. As with API the email is delivered to the mailbox first, but at the same time an account specific email address is added to the email so a copy is transmitted via SMTP to Cloudflare for evaluation.
Once Cloudflare receives the email, it will scan and determine the disposition of the email. Once an email has a disposition our solution will look at the API authorizations and auto-move policy and perform the desired action. SMTP ingestion reduces API usage, but API-based remediation remains subject to Microsoft 365 and Google throttling limits.

During a proof of value, this deployment can be configured with any Email security solution or mail platform that allows for adding a BCC recipient to gain visibility into what those solutions are missing that Cloudflare would block.
Benefits of BCC/Journaling deployment
- Easy way to add protection in complex email architectures with no changes to mail flow operations.
- Agentless deployment for Microsoft 365. Microsoft 365 would transmit emails after delivery to Cloudflare and the API Authorization can be configured with a Remediation policy to move emails with a disposition out of the inbox.
- Google makes use of Compliance Rules for BCC which can be combined with an API Authorization to move emails after delivery. This provides for the same outcome as the API deployment detailed above.
- Microsoft 365 and Google operate on the message first. This provides a more layered approach taking advantage of the security capabilities of Microsoft 365/Google in addition to Cloudflare.
- You can control the scope of messages inspected (external, internal, or both)
- This method can be used for a Proof of Value to collect and report on emails without requiring changes to mail flow. This does not require an API Authorization to be in place. If the API is configured for Microsoft 365 or Google, you would leave the Remediation policy not configured to prevent actions being taken.
Considerations
Before deploying Email security via BCC/Journaling deployment, you will need to consider the following:
- API-based remediation has the same provider throttling limits as API deployment. Message ingestion uses SMTP instead of API requests.
- Depends on Google or Microsoft 365 to deliver messages via SMTP.
- May require a Connector in Microsoft 365 to facilitate direct communication.
- Messages cannot be modified after delivery as per Microsoft 365/Google requirements. This means we cannot perform URL Rewriting to Cloudflare Email Link Isolation or append text to the email Subject or Body. Those features are only available using an Inline deployment.
Mixed
Mixed utilizes an Inline deployment for external emails and BCC/Journaling for internal emails. This is facilitated by using both deployment methods but configuring Cloudflare for two hops in BCC/Journal mode. This scenario provides all of the added benefits of an MX delivery for external messages, while also providing remediation of bad emails from internal sources. Here are some scenarios where this is helpful.
If you have mailboxes where emails are consumed by services such as ticketing systems, CRMs (Customer Relationship Management systems), or Legal Archiving. Each of these integrations run the risk of malicious emails being delivered into those systems where no API-based Email security solution can remediate the problem. The only deployment capable of protecting you would be Inline. If you had additional concerns about malware being spread internally or compromised accounts being used to phish users internally, you would have a gap requiring the purchase of both an Inline solution and an API solution. This would create other problems as you may need to manage policies related to email delivery in three different solutions (MX, API, and Microsoft 365/Google).
Cloudflare's mixed deployment allows us to collapse all of those use cases into a single solution by allowing quarantining of messages at the Cloudflare edge in addition to evaluating internal email and removing them when needed. This improves security while decreasing vendor spend, management overhead, and risk due to the complexity of managing three different policy sets.
Benefits
mixed deployment combines the benefits of Inline deployment for external emails and BCC/Journaling for internal emails.
Considerations
When you choose mixed deployment, you need to consider that:
- Internal email detections are limited due to a lack of information such as Email Authentication, Sending Server, and Delivery Path. Only the content within the body of the email can be analyzed.
- Internal emails may have higher False Positives when using Protecting Users with impersonation registry.
Automated Post Delivery
Cloudflare offers automated workflows based on continuous analysis and submissions. These features enable Cloudflare to move messages using the API auto-move policy after delivery. This is best paired with the phish submissions or third-party user submissions.
Submission Handling
Cloudflare prioritizes Administrator Submissions for false positives and negatives through the Cloudflare dashboard. This approach enables faster review times and helps Cloudflare proactively identify and correct issues that may affect multiple users improving the overall product experience. It is recommended that administrators review user submissions, identify all related messages, and submit as verified false positive/false negatives via the Cloudflare dashboard. These submissions will be reviewed and used to improve Machine Learning Models, Detections, and Engines in the future.
Summary
To summarize, Email security offers three core deployment models: API, BCC/Journaling, and Inline (or MX). Inline is the preferred deployment model as it filters and remediates malicious messages before they reach the user inbox, thereby removing dwell time risk and allowing for features like URL Rewriting and message modification.
API and BCC/Journaling models are post-delivery solutions, integrating directly with platforms like Microsoft 365 or Google Workspace to inspect and auto-move emails after they have landed in the user mailbox. While these post-delivery methods are easier to deploy and require no mail flow changes, they face limitations such as API throttling risks and the inability to modify message content (like subjects or body text).
Finally, the mixed deployment combines the benefits of Inline for external email protection (critical for systems like CRM or ticketing that ingest email) with BCC/Journaling for internal email evaluation.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/reference-architecture/architectures/email-security-deployments/#page","headline":"Understanding Email Security Deployments","description":"This reference architecture describes the key architecture of Cloudflare Email security.","url":"https://developers.cloudflare.com/reference-architecture/architectures/email-security-deployments/","inLanguage":"en","image":"https://developers.cloudflare.com/reference-architecture/architectures/email-security-deployments/og.png?v=98b33a6bcfbf31a5","dateModified":"2026-10-26","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: This reference architecture is for organizations looking to deploy both global and local traffic management load balancing solutions. It is designed for IT, web hosting, and network professionals with some responsibility over or familiarity with their organization's existing infrastructure. title: Load Balancing Reference Architecture image: https://developers.cloudflare.com/reference-architecture/architectures/load-balancing/og.png?v=daafded9a53993a5
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/reference-architecture/llms.txt
Use this file to discover all available pages before exploring further.
