What do you need?
- An inbox receiving mail
- A key with policy:manage to change settings, and one with send:approve or policy:manage to release mail
Steps
-
1. See what a score looks like
Every message carries
injection_scoreandinjection_reasonsin its metadata. The safety report adds where each finding was (body, hidden HTML, an attachment, an encoded payload), the sender's trust level with its SPF, DKIM, DMARC and ARC results, and the quarantine state.Safety report curl https://api.nofeb.com/v1/messages/e3KX9Q/safety -H "Authorization: Bearer $NOFEB_API_KEY" -
2. Set the threshold and action
Settings inherit from organization to pod to inbox. A support inbox that hears from the public might quarantine at 0.6; an internal inbox might only flag, which records the score and lets the message through.
Per-inbox settings curl -X PUT https://api.nofeb.com/v1/intelligence/settings -H "Authorization: Bearer $NOFEB_ADMIN_KEY" -H 'content-type: application/json' \ -d '{"scope": "inbox", "inbox_id": "inb_…", "settings": {"injection_threshold": 0.6, "injection_action": "quarantine"}}' -
3. Review the quarantine
GET /v1/quarantine?inbox_id=… lists held messages newest first, each with its source (injection, hook, rule, sender list, spam, virus or DMARC), the reason, the score, the sender's trust level and a sanitised preview. Subscribe to message.quarantined to hear about each one as it happens.
-
4. Release or delete
Releasing moves the message to the Inbox and emits message.released with the full message summary;
allow_senderalso adds the sender to the inbox's sender allowlist. Releasing undoes a safety control, so it needs send:approve or policy:manage and an agent's key cannot do it.Release, trusting the sender from now on curl -X POST https://api.nofeb.com/v1/messages/e3KX9Q/release -H "Authorization: Bearer $APPROVER_KEY" \ -H 'content-type: application/json' -d '{"allow_sender": true}' # or discard it curl -X DELETE https://api.nofeb.com/v1/quarantine/e3KX9Q -H "Authorization: Bearer $NOFEB_API_KEY" -
5. Feed the model safe_body
For mail that gets through, read
safe_bodyrather than the raw text. It removes what the scorer looks for (hidden text, zero-width, direction-altering and look-alike characters, role tokens, sentences addressed to an AI, tracking beacons, data-carrying links and encoded payloads), says what it removed, and wraps the rest in a header naming the sender. -
6. Scan text from elsewhere
Agents read web pages, documents and tool results too. POST /v1/safety/scan scores any text or HTML the way inbound mail is scored and returns it sanitised; the scan_text MCP tool does the same from inside an agent.
What does the score look for?
Hidden HTML (display:none, zero-size, off-screen, white or same-colour text, comments), zero-width, bidirectional and tag characters, look-alike and mixed-script words, instructions aimed at an AI, chat-template and role tokens, text imitating a system prompt, links that carry data out in their query string, markdown image beacons, and encoded payloads. Each finding adds to the score and is named in the reasons, so a reviewer can see why a message was held.
No filter catches every instruction written in plain sight. The score is one layer: the inbox's autonomy tier still decides what the agent may send, and an agent key cannot approve its own send or release its own quarantine.
Frequently asked questions
Is there an email filter for prompt injection?
nofeb scores every inbound message for prompt injection and quarantines it above a threshold you set per inbox, before your agent or your webhooks see its content.
Will a false positive lose mail?
No. Quarantined mail is kept in Junk with its full content until a person releases or deletes it, and releasing with allow_sender stops the same sender being held again in that inbox.
Does scoring send my mail to a third party?
No. Scoring runs inside nofeb on every message. Message content leaves nofeb only if you choose a third-party model for decisions in your settings and give the explicit opt-in that requires, and even then the model sees only the sanitised text.
Status of everything on this page
Every capability named above, with its status as reconciled against the engine.
| Capability | What it does | Status |
|---|---|---|
| Injection scoring and quarantine | Every inbound message gets a prompt-injection score from 0 to 1 with its reasons: hidden text, invisible and look-alike characters, instructions aimed at an AI, role and chat-template tokens, tracking beacons, data-carrying links and encoded payloads. Above the threshold you set per organization, pod or inbox, the message is quarantined (or only flagged) for a person to release or delete, and its content stays out of the delivery event. | Shipped |
| Sender trust on every message | Each inbound message is labelled trusted, known, unknown or suspicious, with the reasons: its authentication results, your sender lists, look-alike domains, display-name spoofing, and whether the inbox has corresponded with the sender before. | Shipped |
| safe_body for untrusted mail | The message's new text with zero-width and direction-altering characters, hidden HTML and forgeable quoted history removed, wrapped in a provenance header that tells the model whose words these are. | Shipped |
| Recipient and sender allowlists and blocklists | Lists of addresses, domains or wildcards per organization, pod or inbox: who an agent may write to, and whose mail it reads. A blocked recipient is refused on every autonomy tier, a blocked sender's mail is rejected or quarantined, and you choose whether a send outside the allowlist is held for approval or refused. A check call predicts what a send or an inbound message would meet before it happens. | Shipped |
| Human approval of held sends | A held send waits with status awaiting_approval until a human approves or rejects it; both steps emit events. The approval queue lists every held send with its recipients (each marked if new to the conversation), the reasons it was held and who submitted it. Approving needs the separate send:approve scope, which keys from agent self-signup never hold, so an agent cannot approve its own send. | Shipped |
| Autonomy tiers enforced by the server | Every inbox carries a sending policy, from read-only to autonomous, enforced on the server for every surface that sends, so switching from the API to MCP cannot bypass it. | Shipped |