I believe the rubbish should stay outside the organisation.
If we can stop spam, phishing or malware before it reaches the email platform, that is where I prefer to stop it. Just as we put a WAF in front of an application, I want a control point before messages reach the service people use to work.
But that does not complete the design. Internal email can be malicious, accounts can be compromised and a message may only be recognised as dangerous after delivery. There is another question we often leave until the end: what happens when the email platform stops working?
So when someone asks whether I would choose a gateway, an API-integrated solution or both, I first need to understand the service we are protecting and what we expect each approach to do.
My starting point: control before delivery
A gateway adds a control point to the SMTP path before a message reaches the mailbox platform. It lets us decide who can send, how they send and how messages should be treated. I care about more than recognising a malicious attachment: sender authentication, sending limits, file types and the behaviour of file containers matter too.
Buying a gateway does not mean that all email passes through it. MX records, connectors and delivery restrictions need to be designed and tested so there is no direct route around the controls. Outbound inspection also requires an outbound route. Messages between users in the same tenant may follow a different path.
We also need to be careful about changing messages in transit. Content transformations can affect authentication and application behaviour. Orders, CRM replies and transactional messages belong in the test plan from the start.
01 · Gateway: control on the mail path
Example with inbound and outbound mail routed through the gateway.
INBOUND
OUTBOUND
Internal mail staying inside the tenant does not necessarily cross the gateway. Direct routes bypassing inspection must be restricted.
What we avoid storing matters too
Stopping unwanted email before delivery keeps some of that volume out of user mailboxes. At hundreds of thousands of messages a day, where we store it, how long we retain it and who manages quarantine are practical questions.
I would not sell this as an automatic licence saving. That depends on quotas, retention, contracted storage and the selected service. I do see an architectural and operational benefit: I would rather avoid feeding the working platform with messages we already know we do not need. The gateway quarantine needs limits and ownership as well; it is not an unlimited storage service.
API integration has a place too
An API integration can retrieve messages, analyse context and take actions inside the platform, depending on the specific product and its permissions. Its value can extend beyond incoming Internet email to internal messages and action on email that has already been delivered.
However, saying a product connects through an API tells me very little about when it acts. Can the user access the message before analysis finishes? How long does remediation take? What can the product remove? What happens when the API is unavailable? Implementations differ, so I would not describe them all as the same architecture.
The second diagram explicitly illustrates post-delivery inspection. The API provides a query and action path; it is not an SMTP hop through which every message travels. The platform also retains its native controls. Adding a product does not make those disappear.
02 · API: observe and act inside
Specific example: post-delivery inspection. Other implementations may act at a different stage.
MESSAGE PATH
QUERY AND RESPONSE
The API arrow represents queries and actions, not SMTP delivery. In this model users may gain access before remediation: measure that interval.
With Google, I would test collaboration flows carefully
In my experience, some gateway integrations with Google need particular care. Calendar invitations, updates and shared-document notifications do not always behave like an ordinary message sent by a user.
I would not assume that every such message uses the same sending identity, DKIM signature or route. Nor would I conclude that they all fail. We need to inspect the original headers, check the authentication actually present and validate the complete workflow, including the recipient’s response.
An API approach can be attractive here because it may reduce routing changes. But it must demonstrate coverage of the use case we need. Solving an integration problem does not replace assessment of protection, permissions or operations.
Internal email can be malicious too
Sometimes we design as though threats can only arrive from outside. A compromised account can message colleagues, exploit an existing conversation or request an urgent action using a familiar identity.
A gateway sees the traffic that crosses it. If internal email stays inside the tenant, we cannot credit the gateway with coverage it does not have. We need to understand which native or integrated controls inspect that path and how we can investigate and act. An API integration can help if those messages are within its actual coverage and permissions.
For me, this is a clear reason to evaluate both approaches. Not because two products are automatically better, but because they may observe different paths.
Both, when each covers a requirement
A combined approach can control external email before delivery and add visibility or response for internal and already delivered messages. That is the value I want to demonstrate.
It also creates operational work. Two consoles can generate two incidents for one message or attempt conflicting actions. We need to define who detects, who acts, where evidence is retained and who resolves disagreement. A service offering both capabilities may simplify this, but neither savings nor integration should be assumed without examining the design and contract.
I would also test quarantine, release of a legitimate message and possible subsequent removal. Users should not receive two different explanations from two teams about the same email.
03 · Both: different paths, coordinated response
The gateway controls the perimeter; the API adds coverage inside the platform within its capabilities.
EXTERNAL MAIL
INSIDE THE TENANT
The API may review delivered external and internal mail if covered by the product. Coordinate quarantines, incidents and actions to avoid conflicts.
Another criterion: email continuity
A platform outage forces us to separate three requirements: continuing to receive, being able to read and being able to reply. They are not the same. A gateway may accept messages and queue them until the destination recovers. That supports delivery, but a queue alone does not let users work.
A continuity service adds an alternative route, such as a portal providing access to available email and an ability to send. Proofpoint Enterprise Continuity and Mimecast’s continuity capabilities are examples to assess against the actual service purchased. Not every gateway includes continuity.
Independence needs testing. If the portal depends exclusively on the identity provider that is unavailable, we have another problem. DNS, connectivity and the alternative service’s own capacity matter too. We also need to verify pending delivery and reconciliation after recovery.
An integration depending solely on the affected platform’s API does not, by itself, create an alternative SMTP endpoint for receiving new email. Email continuity does not restore Teams, documents or the whole tenant either. The fourth diagram makes that scope explicit.
04 · Continuity: work without the usual mailbox
A service purchased and prepared before the incident; a gateway alone is not enough.
RECEIVING DURING THE OUTAGE
ALTERNATIVE READING AND SENDING
Test independent identity, DNS, capacity, retention and reconciliation. A queue alone does not provide reading or sending. This does not recover documents, Teams or the entire tenant.
What would I choose?
My starting point is still to keep the rubbish outside. Then I need to cover what circulates inside, what we discover late and how people will keep working when their usual mailbox disappears.
I would not choose from a comparison that only says supplier A detects more than supplier B. I want to see which path each controls, which business messages still work and what effort the team needs to sustain the service.
The decision holds up when I can explain those points and demonstrate them through testing. I prefer to keep the rubbish outside. But I also want to know what happens to the rubbish already inside, and how the company will keep working if its normal mailbox disappears tomorrow.
Further reading
Official sources for checking and exploring these concepts. This article presents a practical approach; it does not reproduce the references’ full requirements.
- Google Workspace — Set up an inbound mail gateway
- Microsoft — Exchange Online limits
- Proofpoint — Enterprise Continuity
- Mimecast — Designing for the day the mailbox goes away
Examples are illustrative. Implementation decisions should be adapted to each organization’s requirements and dependencies.