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 agent | Catch-all + router | |
|---|---|---|
| Setup | One registration per agent | One mailbox, routing code you maintain |
| Isolation | Each agent sees only its own mail | Router sees everything; a bug misroutes mail |
| Credentials | One key per agent, revocable alone | One shared credential |
| Sending identity | Each agent replies from its address | Need a send-as per address |
| Audit | Per-agent mailbox is the log | Rebuild per-agent history from routing logs |
| Cost shape | Per-inbox fees on some providers; none on Mailgi | One mailbox |
| Good for | Agents with distinct identities | Ephemeral addresses for tests, one consumer |
Where catch-all goes wrong
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.
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.
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
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.
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 →