What is a secure email gateway, and how does a pre-delivery inbox differ?

A secure email gateway is a filter that sits in front of a mail server and screens messages before passing them on. A pre-delivery inbox does the screening itself, at its own door, so the system that judges a message is also the one that stores it and decides who may read it.

Updated

What does a secure email gateway do?

A secure email gateway (SEG) screens mail on its way to a mail server. It checks senders, links and attachments, then blocks a message, quarantines it or passes it on. Many gateways also screen outgoing mail for data that should not leave.

Gateways stop a great deal: bulk spam, known malware, known phishing sites and spoofed domains. They have been a standard defense for business mail for years, and they do their screening before delivery.

Where does a gateway sit?

A secure email gateway sits in the mail path, between the internet and the mailbox platform. The domain's MX record, the DNS record that says where its mail goes, points at the gateway instead of the mail server.

Mail for a domain behind a gateway
example.com.  IN MX  10 mx.gateway.example.

sender  ->  gateway (screens)  ->  mail server  ->  inbox

The gateway accepts the message, screens it, and relays what it allows to the mail server behind it. Because it is first in line, it can refuse a message during the SMTP conversation. Pre-delivery email screening explains that step.

What are the alternatives to a gateway?

There are three alternatives to a secure email gateway: the filtering built into the mailbox platform, API-based email security, and an inbox that screens at its own door.

ApproachWhere it sitsWhen it actsReader it was built for
Built-in filtering (Gmail, Outlook)Inside the mailbox platformBefore delivery, with cleanup afterA human
Secure email gatewayIn front of the mail server, by MX recordBefore deliveryA human
API-based email securityInside the mailbox platform, by APIMostly after deliveryA human
Pre-delivery inboxThe mailbox itselfBefore deliveryAn AI agent or a human

API-based tools connect to Google Workspace or Microsoft 365 without an MX change. They see internal mail and can remove one message from many mailboxes. The trade is timing: most of them act after a message has landed. See pre-delivery vs post-delivery.

Where do gateways fall short?

A gateway's limits come from being a separate system in front of the mailbox, built to protect human readers.

  • It does not own the mailbox. The gateway's quarantine and the mailbox are two systems. What an API key or an agent may read is decided by the mailbox platform, not by the gateway.
  • It screens for a human reader. Text hidden from a human, or an instruction written for a model, is a newer problem than the ones gateways were built for. OWASP ranks prompt injection as LLM01, the top risk in its Top 10 for LLM Applications, in both the 2025 edition and the current 2026 edition.
  • Internal mail may not pass through it. Mail between two mailboxes on the same platform often never crosses the gateway.
  • It can be bypassed. Unless the mail server accepts mail from the gateway alone, a sender can deliver straight to the server behind it.
  • It is a second system to run. MX changes, connectors and policies have to be kept in step with the mailbox platform.

None of this makes a gateway a poor choice for human mailboxes. It means a gateway was not designed for a reader that is a model.

How is a pre-delivery inbox different?

A pre-delivery inbox is a mailbox that screens every message itself before the message is delivered. There is no separate filter in front of it and no gap between the filter and the inbox.

  • One system decides and stores. The verdict travels with the message. A held message sits outside the inbox, and the same system enforces who may read it.
  • It knows who is reading. It can be stricter for an agent than for a human, and give an agent a safe view of the text.
  • Internal mail is screened too. Mail between two inboxes on the platform goes through the same door.
  • Outgoing mail uses the same door. What an agent sends is screened before it leaves.

A pre-delivery inbox protects the mail that is addressed to it. It does not filter mail for mailboxes hosted on another platform. A gateway does.

Which should you use?

The choice follows the reader and where the mailbox lives. Humans on Google Workspace or Microsoft 365, with no agents reading mail, are served by the platform's built-in filtering, plus a gateway or an API-based tool if the risk calls for it. An AI agent that needs its own address is served by an inbox that screens before delivery.

Secure email gateways compared sets out when each fits, and how to run both side by side.

Where does Trotta Mail fit?

Trotta Mail is a pre-delivery inbox for AI agents and humans. Every message is screened while the sending server is still connected. Attacks, known and new, are refused at the door or held outside the inbox for a human. Everything else is delivered with a verdict.

An agent's API key reads the safe view: only what a human could see, with hidden text removed and instructions aimed at a model fenced off. It cannot read or release held mail. The rules are in the security model.

Putting your own domain on Trotta Mail uses an MX record, the same way a gateway does. The difference is that the mail stays where it was screened. See connect a domain.

Trotta Mail has limits worth knowing. It does not offer IMAP or SMTP access for mail clients: humans read in the browser, and agents use the API or the MCP server. And no filter catches everything, which is why uncertain mail is held for a human.

Questions

What is a secure email gateway?

A secure email gateway is a filter that sits between the internet and a mail server. A domain's MX record points to it, and it blocks, quarantines or relays each message before the mail server sees it.

What is the difference between a SEG and API-based email security?

A secure email gateway sits in the mail path and acts before delivery. API-based email security connects to the mailbox platform, needs no MX change, sees internal mail, and mostly acts after a message has been delivered.

Is a secure email gateway still needed with Microsoft 365 or Google Workspace?

Both platforms filter spam and malware on their own. Many organizations add a gateway or an API-based tool for more control over phishing, impersonation and data loss. Whether you need one depends on your risk.

Can a secure email gateway protect an AI agent's inbox?

It can filter mail on the way in, as it does for a human. It was not built to look for instructions aimed at a model, and it does not decide what an agent's key may read once mail is in the mailbox.

Does a pre-delivery inbox replace a gateway?

For the inboxes that live in it, yes: the screening is built in. It does not filter mail for mailboxes hosted elsewhere, so human mailboxes on another platform keep their own protection.

Sources

Give your agent an inbox of its own. Free for two inboxes. No card.