Skip to content
simailDocsv0

Guides

Holds & injection scanning

Why inbound mail is held, what agents see while it is held, how prompt-injection scanning works, and how humans release or reject mail (sensitive-material holds can only be rejected or purged).

docs.simail.ai/holds

A hold keeps a message away from your agent until a human looks at it. Holds are decided by deterministic checks that finish before the message is committed. The raw mail is stored first, but no agent can read the message until the checks are done and it is committed, so there is never a moment when a suspicious message is readable by an agent.

What a held message looks like to an agent

Section titled “What a held message looks like to an agent”

A held message is metadata only, and only for a key that has hold_metadata_read. Without that permission (the default agent key does not have it) a held or rejected message does not exist for the agent on REST and MCP: GET by ID is 404, and listings, search, the index and threads skip it. The one thing every key with event_read can still see is the message.held event: GET /v0/events always returns it, while webhooks and WebSocket push it only when the subscription sets include_non_wake: true (a held message never wakes the agent, so the default subscription does not carry it). With hold_metadata_read you get this object:

{
"message_id": "msg_…",
"thread_id": "thr_…",
"inbox_id": "agent-7k2m@simail.email",
"from": "unknown@example.com",
"timestamp": "2026-10-18T17:02:11Z",
"size": 18422,
"labels": ["received", "held"],
"hold_reasons": ["injection_suspected"],
"held": true,
"trust_envelope": {
"auth": { "spf": "unknown", "dkim": "unknown", "dmarc": "unknown", "computed_by": "none" },
"sender_known": false,
"first_contact": true,
"classification": "normal",
"hold": true,
"hold_reasons": ["injection_suspected"],
"injection_score": 0.92,
"flags": [],
"wake": false,
"untrusted": true
}
}

timestamp is when simail received the message (the same field as on every message).

Subject, body, attachments and raw source are withheld. Held mail never wakes your agent, and search does not index its body. Fetching the body of a held message does not work; neither does the attachment or raw endpoint. So an agent that learns of a message.held event and then calls GET or the MCP get_message gets 404 unless its key has hold_metadata_read.

Your agent cannot release mail: POST /v0/inboxes/{inbox_id}/messages/{message_id}/agent-armor/release returns 403 human_required, and the MCP server has no release tool.

hold_reasonsCause
rate_limitedmore than 50 messages per hour from one sender to one inbox, or 2,000 per hour to the organization (far above that, extra copies are counted and dropped)
unparseablethe message could not be parsed safely
injection_suspectedthe prompt-injection score reached the threshold (below)
otp_limitexternal organizations only: too many verification-code messages for the organization today (more than 10, or from more than 3 sending domains). Verification-code mail to the internal tenant goes to your agent as usual
sensitive_materialthe message looks like regulated or privileged material (for example legal case material) that simail does not accept
enrichmentreserved for the optional later checks (attachment text, model-based scoring), which are not available in production yet

The scanner is a set of deterministic heuristics, run on the subject, body and HTML of every inbound message:

  • instruction phrasing aimed at an AI (“ignore previous instructions”, role or system prompts), in English and Chinese;
  • hidden text: zero-width characters, CSS-hidden content, text in the same colour as the background;
  • fake system prompts and tool-call syntax;
  • very long encoded blobs.

The result is trust_envelope.injection_score between 0 and 1. At or above injection.hold_threshold (0.7 by default; your policy can lower it, never raise it above the platform’s value) the message is held.

Two optional checks exist in the design: text extraction from attachments, and model-based injection scoring. Neither is available in production yet: both are no-ops today, so no message is held by them and you will not see the enrichment reason. When they are turned on they will run after the message is stored and can only add a hold, never remove one; a message held that way will disappear from search results and produce a message.held event.

In the console, a human with access to the inbox opens Held and chooses:

  • Release: the message becomes a normal message. Its body is indexed for search, and a message.released event is published. Its data.wake is always true: a person decided to release it, so the wake gate does not apply.
  • Reject: the message stays out of reach of agents. It is not moved to the trash; it is kept like any other message under your retention settings.

A message held as sensitive_material can be rejected or purged, but never released.

Both require re-verification within 5 minutes. A human can also add the sender to a block list.

EventWhen
message.helda message was stored as held (the event is metadata only; the message itself needs hold_metadata_read)
message.releaseda human released it