Quarantine suspicious mail
How a mailbox holds spam, phishing, fraud, and malware before an agent reads it, and how a person releases or discards it.
A mailbox checks every incoming message before anyone reads it. Mail that looks like spam,
phishing, fraud, or an attempt to steer an AI agent is held instead of delivered. An agent that
reads the mailbox never sees held mail unless you gave it quarantine.read, and even then it sees
metadata only.
Dispositions
Every incoming message has one disposition.
| Disposition | What happens |
|---|---|
delivered | The message joins its thread and is searchable. It produces mailbox.message.received. |
quarantined | The message is held outside every thread, search, and received event until a person decides. |
isolated | The message carried malware. Samva keeps who sent it and why, never its body or attachments. |
Reasons
A held message carries a reason and a source: receipt when the scan that runs as the message
arrives held it, or classifier when Samva's content classifier did.
| Reason | Meaning |
|---|---|
spam | Suspected spam. |
phishing | Suspected phishing. |
fraud | Suspected payment or business-email-compromise fraud. |
prompt_injection | Text written to steer an AI agent that reads the mailbox. |
dmarc | The sender's own DMARC policy asks receivers to quarantine or reject failing mail. |
virus | Malware was found. The message is isolated. |
virus_unscanned | The malware scan could not decide, so a person decides. The message is quarantined. |
Who can see and decide
| Action | Who |
|---|---|
| List held messages (metadata) | A person with an admin grant, or a key or extension with quarantine.read. |
| Release a message | A person with an admin grant. Never a key, an extension, or MCP. |
| Discard a message | A person with an admin grant. Never a key, an extension, or MCP. |
| Read an isolated message's body | Nobody. Samva does not keep it. |
Held messages show metadata only: sender, subject, reason, and when they arrived and were held. Their bodies and attachments stay unreachable while they are held.
List held messages
import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const held = await samva.mailboxes.listQuarantine({ id: "mbx_..." });
for (const item of held.items) {
console.log(item.id, item.disposition, item.reason, item.from.address, item.subject);
}curl "https://api.samva.dev/v1/mailboxes/$MAILBOX_ID/quarantine?limit=50" \
-H "X-API-Key: $SAMVA_API_KEY"The newest held message comes first. Pass a page's nextCursor as cursor to read the next page.
limit defaults to 20 and is at most 100. after and before bound when a message was held.
Each item has id (the held message's id, the one release and discard take), disposition,
reason, source, from, subject, receivedAt, heldAt, releasedAt, threadId, and
discardedAt. releasedAt and threadId are
set after a release, and discardedAt after a discard.
Release a message
Releasing delivers a quarantined message into the thread it would have joined and publishes one
mailbox.message.released event. It does not create a second copy.
Sign in with samva login as a person with an admin grant, or use the dashboard:
samva login
samva mailboxes quarantine release $MESSAGE_ID --mailbox $MAILBOX_IDReleasing is idempotent: releasing again returns the same result and publishes nothing. An isolated
message cannot be released, and neither can one that was discarded. Both are 409.
Discard a message
Discarding removes a held message for good. It leaves the quarantine list, never reaches a thread,
and can no longer be released. Both quarantined and isolated messages can be discarded.
samva mailboxes quarantine discard $MESSAGE_ID --mailbox $MAILBOX_IDDiscarding publishes one mailbox.message.discarded event. It is idempotent: discarding again
returns the same result and publishes nothing. A message that was released is already in its thread
and cannot be discarded: 409.
React to held mail
Three events describe held mail; Events lists their payloads.
mailbox.message.quarantinedfires when a message is held.mailbox.message.releasedfires when a person releases it.mailbox.message.discardedfires when a person discards it.
An event stream connection or an extension receives quarantined and discarded events only for
mailboxes where its credential holds quarantine.read.