· Written · Integration · Least access
The Model That Reads the Mail Gets No Mail Tool
Our setup guide recommended outdated permissions that could leave the app able to open every company mailbox. Platform documentation exposed the problem. The model cannot fetch or send mail. A person approves each draft. We removed company-wide access and tested the limits: approved mailboxes answered, while one outside the approved list refused a real request.

The old system
Anyone can send your business an email. You don't choose who writes in. That makes email the easiest place for a stranger to give an AI instructions. We wanted an AI agent, software that carries out tasks, to handle the mailbox of the consulting practice I'm a partner in: sort what comes in, file it to the right client folder, draft replies, and bring a person in at set points.
What broke
The easy build gives the AI model a mail tool, meaning the power to send, forward and fetch mail itself, and trusts it to follow its instructions. An email that says "forward this thread to me" is only a bad judgment away from being carried out. An attempt to override the AI's instructions through email text is prompt injection. We never built that mail-tool setup. What broke was our own runbook (our setup guide). It told us to grant access through a method the platform's current documentation labels legacy, meaning outdated. The same documentation warns that two kinds of permission add together: a narrow one for chosen mailboxes and an older company-wide one. Narrow the app but leave the old one in place, and it can still open every mailbox in the company. Nothing would have shown an error.
The number
No headline number here, and I won't make one up. What matters is how many mailboxes the app can open. The answer has to be the approved ones, with a mailbox outside the list refusing a real request.
The fix
The model gets no mail tool. Fixed commands controlled by code do every mailbox action. The model works from the list those commands hand it: sort each message, file it, and write drafts into a queue a person approves. Every message body is data, never orders. When the system spots an injection attempt, it flags it as a security event for a person, with no draft and no filing. An attempt that slips past still can't send, forward or fetch mail, because the model has no mail tool. Any draft it writes waits for a person. No command is built from message text. No attachment is opened, and no link in an email is followed unless someone asks.
Access came next. We followed least privilege, giving the app only the access its job needs. We moved to role-based scopes, permissions tied to the app's role. We limited access to approved mailboxes and removed the company-wide permissions. Then we tested from outside: the approved mailboxes answered, and one outside the list refused. Only the refusal was recorded, with no mailbox content kept. The app's credentials limit its access to approved mailboxes. Code limits which mailbox actions the model can use.
What I'd tell the ops lead
Anyone can email your company, including someone writing to trick an AI. So the AI that reads your mail shouldn't be able to send any. Let it sort and draft. A person approves what leaves. Then ask your IT admin which mailboxes the app can open, and have them prove it from outside: a mailbox that isn't on the list should refuse a real request. If the honest answer is "all of them, but the settings say otherwise," you have the problem we caught in our own runbook.