Decision guide

Inbox per agent, or one catch-all?

Two ways to give many agents email. One of them turns your routing code into security code.

Give each agent its own inbox when agents have separate identities, credentials or customers; use a catch-all with routing only when one consumer reads everything anyway, such as a test harness. Inbox per agent costs a little more setup per agent and removes a whole class of misrouting and access bugs.

The two designs, compared

A catch-all accepts mail for any address on a domain into one mailbox; your code reads the To header and dispatches. Inbox per agent gives each agent a real mailbox and key.

Inbox per agentCatch-all + router
SetupOne registration per agentOne mailbox, routing code you maintain
IsolationEach agent sees only its own mailRouter sees everything; a bug misroutes mail
CredentialsOne key per agent, revocable aloneOne shared credential
Sending identityEach agent replies from its addressNeed a send-as per address
AuditPer-agent mailbox is the logRebuild per-agent history from routing logs
Cost shapePer-inbox fees on some providers; none on MailgiOne mailbox
Good forAgents with distinct identitiesEphemeral addresses for tests, one consumer

Where catch-all goes wrong

01

Routing is now security code

The To header decides which agent reads a message. BCC, forwarding and display-name tricks all land in the same box, and a routing bug hands one customer's mail to another customer's agent.

02

Prompt injection reaches every agent

Any message to any address on the domain is read by the router first. With separate inboxes, a hostile message only ever reaches the one agent it was addressed to.

03

Revoking one agent revokes all

One credential reads the shared mailbox. Taking one agent offline means rotating it for everyone.

When catch-all is fine

01

Test suites

Generating a fresh address per test run and reading them all from one place is exactly what a catch-all is good at.

02

One agent, many aliases

If one agent legitimately handles every address, routing is just labelling.

Inbox per agent on Mailgi

There is no catch-all on Mailgi; each address is an agent. Registration is free and has no quota, so one agent per role is the normal pattern.

One call per agent

On your own domain, a human creates a registration token once in the dashboard, and each agent claims its own local part with domainToken and localPart.

Agents on an organisation's domain share the organisation's balance; mail between them is free.

# One token, several agents on your domain
for role in support sales billing; do
  curl -s -X POST https://api.mailgi.xyz/v1/agents/register \
    -H "Content-Type: application/json" \
    -d "{\"domainToken\":\"$TOKEN\",\"localPart\":\"$role\"}"
done
# => support@yourco.com, sales@yourco.com, billing@yourco.com
#    each with its own mailbox and API key

Questions, answered

01Should each AI agent have its own email inbox?

Yes, when agents act for different customers, roles or tasks. Separate inboxes isolate mail, credentials and prompt-injection exposure, and each agent replies from its own address. A catch-all with a router is only simpler when one consumer reads everything anyway.

02What is a catch-all email address?

A domain setting that accepts mail sent to any address on the domain, including ones that were never created, and delivers it to one mailbox.

03Does Mailgi support catch-all addresses?

No. Each Mailgi address belongs to one agent with its own mailbox. Registering more agents is free and has no quota.

One POST to start.

No signup form, no OAuth, no card to start. Receiving is free.

Open the dashboard →