CLI: Security
The commands of the doorman command line under Security. Risk assessment and sender trust: the policy that warns, holds and guards sending, the senders an inbox knows, held mail and the audit log.
doorman security get
Command for security.get: GET /v1/security
Read the security policy. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
doorman security update
doorman security update [flags]Sends security.update: PATCH /v1/security
Change the security policy. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--level"relaxed" | "balanced" | "strict"optionalApply this preset's thresholds and guards. It also clears the per-label rules, unless
labelsis given with it.--warn-atinteger | nulloptionalMail scoring at least this is delivered with a warning and is never answered automatically. Null means never.
--hold-atinteger | nulloptionalMail scoring at least this is held for the owner and kept from agents. Null means never. Not below
warnAt.--labelsobject of "warn" | "hold"optionalThe least that happens to mail carrying a label, whatever its score:
warnorhold. Replaced as a whole; {} clears it.--hold-unauthenticated-new-sendersbooleanoptionalHold mail from a sender the inbox has never dealt with when it does not authenticate as its domain.
--model-analysisbooleanoptionalLet a model read the content of mail the signals leave undecided. The text goes to the deployment's AI gateway, is not kept and is never used for training. Off: assessments rest on the deterministic signals alone.
--reply-guardbooleanoptionalRefuse an agent's reply into a thread that holds a flagged message: one this policy warns about or holds, by its score or a label, or one the owner marked unsafe (403
risk_blocked). A message stops counting once the owner marks it safe, or while its sender is trusted and it passed authentication. A console session is never refused.--recipients"any" | "known"optionalknown: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403risk_blockedotherwise). Having written to the inbox, or being named in a message, does not make a recipient known: answering a stranger takes a person, or trusting them first.any: no such limit. A console session is never refused.--send-approval"off" | "apps" | "all"optionalWhose sends wait for the owner when a recipient is not one the inbox knows or trusts, nor one of the account's own inboxes.
apps: a connected app's.all: an app's and an API key's.off: nobody's. A send that waits answers 202 with a held send, which the owner sends or discards; it expires unsent after 7 days. A console session is never held, and neither is mail an inbox rule generates. It applies whatever the deployment'senforcement, exceptoff, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts onapps.--allow-key-managementbooleanoptionalLet account keys loosen protection (trust a sender, raise a threshold, release held mail, approve a held send). Off by default, and only a console session can switch it on. Account scope only.
--deep-scanbooleanoptionalRun every attachment, in both directions, through the deployment's malware engine. The bytes go to an isolated scanner that keeps nothing. Off: attachments are still checked by their structure. No effect where the deployment has no engine (
deepScanAvailable).--link-sandboxbooleanoptionalOpen the most suspect links of a message in an isolated browser before the message is delivered, to see where they lead. The site a link points at sees a visit. Links that verify an address, sign in, accept an invitation or unsubscribe are never opened, and neither are an authenticated sender's links to its own site. No effect where the deployment has no sandbox.
--unscannable"deliver" | "warn" | "hold"optionalThe least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish):
deliver,warnorhold.--jsonobjectoptionalThe request body as one JSON object. A flag given beside it replaces the field of the same name.
doorman security update \
--level strictdoorman inboxes security get
doorman inboxes security get <inboxId> [flags]Sends inboxes.security.get: GET /v1/inboxes/{inboxId}/security
Read an inbox's security policy. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.
doorman inboxes security get inb_01jc4q7w9k2m5n8p3r6t1v4x7zdoorman inboxes security update
doorman inboxes security update <inboxId> [flags]Sends inboxes.security.update: PATCH /v1/inboxes/{inboxId}/security
Give an inbox its own security policy. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.--level"relaxed" | "balanced" | "strict"optionalApply this preset's thresholds and guards. It also clears the per-label rules, unless
labelsis given with it.--warn-atinteger | nulloptionalMail scoring at least this is delivered with a warning and is never answered automatically. Null means never.
--hold-atinteger | nulloptionalMail scoring at least this is held for the owner and kept from agents. Null means never. Not below
warnAt.--labelsobject of "warn" | "hold"optionalThe least that happens to mail carrying a label, whatever its score:
warnorhold. Replaced as a whole; {} clears it.--hold-unauthenticated-new-sendersbooleanoptionalHold mail from a sender the inbox has never dealt with when it does not authenticate as its domain.
--model-analysisbooleanoptionalLet a model read the content of mail the signals leave undecided. The text goes to the deployment's AI gateway, is not kept and is never used for training. Off: assessments rest on the deterministic signals alone.
--reply-guardbooleanoptionalRefuse an agent's reply into a thread that holds a flagged message: one this policy warns about or holds, by its score or a label, or one the owner marked unsafe (403
risk_blocked). A message stops counting once the owner marks it safe, or while its sender is trusted and it passed authentication. A console session is never refused.--recipients"any" | "known"optionalknown: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403risk_blockedotherwise). Having written to the inbox, or being named in a message, does not make a recipient known: answering a stranger takes a person, or trusting them first.any: no such limit. A console session is never refused.--send-approval"off" | "apps" | "all"optionalWhose sends wait for the owner when a recipient is not one the inbox knows or trusts, nor one of the account's own inboxes.
apps: a connected app's.all: an app's and an API key's.off: nobody's. A send that waits answers 202 with a held send, which the owner sends or discards; it expires unsent after 7 days. A console session is never held, and neither is mail an inbox rule generates. It applies whatever the deployment'senforcement, exceptoff, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts onapps.--allow-key-managementbooleanoptionalLet account keys loosen protection (trust a sender, raise a threshold, release held mail, approve a held send). Off by default, and only a console session can switch it on. Account scope only.
--deep-scanbooleanoptionalRun every attachment, in both directions, through the deployment's malware engine. The bytes go to an isolated scanner that keeps nothing. Off: attachments are still checked by their structure. No effect where the deployment has no engine (
deepScanAvailable).--link-sandboxbooleanoptionalOpen the most suspect links of a message in an isolated browser before the message is delivered, to see where they lead. The site a link points at sees a visit. Links that verify an address, sign in, accept an invitation or unsubscribe are never opened, and neither are an authenticated sender's links to its own site. No effect where the deployment has no sandbox.
--unscannable"deliver" | "warn" | "hold"optionalThe least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish):
deliver,warnorhold.--jsonobjectoptionalThe request body as one JSON object. A flag given beside it replaces the field of the same name.
doorman inboxes security update inb_01jc4q7w9k2m5n8p3r6t1v4x7z \
--level strictdoorman inboxes security reset
doorman inboxes security reset <inboxId> [flags]Sends inboxes.security.reset: DELETE /v1/inboxes/{inboxId}/security
Return an inbox to the account's security policy. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.
doorman inboxes security reset inb_01jc4q7w9k2m5n8p3r6t1v4x7zdoorman inboxes senders list
doorman inboxes senders list <inboxId> [flags]Sends inboxes.senders.list: GET /v1/inboxes/{inboxId}/senders
List an inbox's senders. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.--standing"trusted" | "known" | "new" | "blocked"optionalOnly senders with this standing.
--qstringoptionalKeep the senders whose address or name contains this text, case-insensitively.
--limitintegeroptionalPage size, 1 to 100. Defaults to 50.
--offsetintegeroptionalRows to skip. Defaults to 0.
doorman inboxes senders list inb_01jc4q7w9k2m5n8p3r6t1v4x7zdoorman sender-rules list
doorman sender-rules list [flags]Sends senderRules.list: GET /v1/sender-rules
List sender rules. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--inbox-idstringoptionalOnly the rules that apply to this inbox alone. Omit for every rule of the account.
--standing"trusted" | "blocked"optionalOnly trusted or only blocked.
--qstringoptionalKeep the rules whose address or domain contains this text.
--limitintegeroptionalPage size, 1 to 100. Defaults to 50.
--offsetintegeroptionalRows to skip. Defaults to 0.
doorman sender-rules create
doorman sender-rules create [flags]Sends senderRules.create: POST /v1/sender-rules
Trust or block a sender. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--matchstringrequiredAn address (
sam@example.com) or a domain (example.com, which covers every address at it, not its subdomains).--standing"trusted" | "blocked"requiredtrusted: their authenticated mail is treated as low risk and replies to them are never guarded.blocked: their mail is refused. Trusting needs a console session unless the account allows its account keys to.--inbox-idstringoptionalApply to this inbox only. Omit for every inbox of the account.
--notestringoptionalA label for whoever reads the list later, at most 200 characters.
--jsonobjectoptionalThe request body as one JSON object. A flag given beside it replaces the field of the same name.
doorman sender-rules create \
--match sam@example.com \
--standing trusteddoorman sender-rules delete
doorman sender-rules delete <senderRuleId> [flags]Sends senderRules.delete: DELETE /v1/sender-rules/{senderRuleId}
Remove a sender rule. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--sender-rule-idstringoptionalThe same as the argument
<senderRuleId>, for a script that names everything.
doorman sender-rules delete snr_01jc5f1a2b3c4d5e6f7g8h9j0kdoorman inboxes held list
doorman inboxes held list <inboxId> [flags]Sends inboxes.held.list: GET /v1/inboxes/{inboxId}/held
List held messages. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.--limitintegeroptionalPage size, 1 to 100. Defaults to 50.
--offsetintegeroptionalRows to skip. Defaults to 0.
doorman inboxes held list inb_01jc4q7w9k2m5n8p3r6t1v4x7zdoorman messages release
doorman messages release <messageId> [flags]Sends messages.release: POST /v1/messages/{messageId}/release
Release a held message. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--message-idstringoptionalThe same as the argument
<messageId>, for a script that names everything.
doorman messages release msg_01jc5a6g7h8j9k0m1n2p3q4r5sdoorman messages discard
doorman messages discard <messageId> [flags]Sends messages.discard: POST /v1/messages/{messageId}/discard
Discard a held message. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--message-idstringoptionalThe same as the argument
<messageId>, for a script that names everything.
doorman messages discard msg_01jc5a6g7h8j9k0m1n2p3q4r5sdoorman messages feedback
doorman messages feedback <messageId> [flags]Sends messages.feedback: POST /v1/messages/{messageId}/feedback
Mark a message safe or unsafe. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--message-idstringoptionalThe same as the argument
<messageId>, for a script that names everything.--verdict"safe" | "unsafe"required--jsonobjectoptionalThe request body as one JSON object. A flag given beside it replaces the field of the same name.
doorman messages feedback msg_01jc5a6g7h8j9k0m1n2p3q4r5s \
--verdict safedoorman security audit
doorman security audit [flags]Sends security.audit: GET /v1/security/audit
Read the security audit log. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--inbox-idstringoptionalOnly the entries about this inbox.
--limitintegeroptionalPage size, 1 to 100. Defaults to 50.
--offsetintegeroptionalRows to skip. Defaults to 0.
doorman security preview
doorman security preview [flags]Sends security.preview: POST /v1/security/preview
Preview what a policy does to a message. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--inbox-idstringoptionalEvaluate as this inbox: its senders and, without
policy, its policy. Defaults to the message's inbox, or to the account's policy with no sender history.--message-idstringoptionalA stored inbound message of the account that was assessed. A held one needs a caller that may review held mail.
--sample"ordinary" | "phishing" | "prompt_injection" | "impersonation"optionalA built-in message: ordinary mail, a phishing attempt, an injection hidden from the reader, or an impersonation.
--fromstringoptionalThe sender of your own message. Defaults to a sender the inbox has never seen.
--authenticatedbooleanoptionalWhether your own message passed authentication for its sender's domain. Defaults to true, so the content decides; false shows what a forged sender looks like.
--subjectstringoptional--textstringoptionalThe plain-text body of your own message.
--htmlstringoptionalThe HTML body of your own message.
--policyobjectoptionalA draft to evaluate under, applied over the policy in force. Omit to use the policy in force.
--jsonobjectoptionalThe request body as one JSON object. A flag given beside it replaces the field of the same name.
doorman security preview \
--sample prompt_injection \
--policy '{"level":"strict"}'doorman inboxes held-sends list
doorman inboxes held-sends list <inboxId> [flags]Sends inboxes.heldSends.list: GET /v1/inboxes/{inboxId}/held-sends
List held sends. Access any: any API key, or a console session. App tokens are refused.
Flags
--inbox-idstringoptionalThe same as the argument
<inboxId>, for a script that names everything.--status"held" | "sent" | "discarded" | "expired"optionalOnly held sends in this state. Defaults to
held.--kind"held" | "draft"optionalOnly the sends the policy kept (
held) or only drafts (draft). Both when left out.--limitintegeroptionalPage size, 1 to 100. Defaults to 50.
--offsetintegeroptionalRows to skip. Defaults to 0.
doorman inboxes held-sends list inb_01jc4q7w9k2m5n8p3r6t1v4x7zdoorman held-sends get
doorman held-sends get <heldSendId> [flags]Sends heldSends.get: GET /v1/held-sends/{heldSendId}
Read a held send. Access any: any API key, or a console session. An app token needs mail:read.
Flags
--held-send-idstringoptionalThe same as the argument
<heldSendId>, for a script that names everything.
doorman held-sends get hsd_01jc5f1a2b3c4d5e6f7g8h9j0kdoorman held-sends approve
doorman held-sends approve <heldSendId> [flags]Sends heldSends.approve: POST /v1/held-sends/{heldSendId}/approve
Send a held send. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--held-send-idstringoptionalThe same as the argument
<heldSendId>, for a script that names everything.
doorman held-sends approve hsd_01jc5f1a2b3c4d5e6f7g8h9j0kdoorman held-sends discard
doorman held-sends discard <heldSendId> [flags]Sends heldSends.discard: POST /v1/held-sends/{heldSendId}/discard
Discard a held send. Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden. App tokens are refused.
Flags
--held-send-idstringoptionalThe same as the argument
<heldSendId>, for a script that names everything.
doorman held-sends discard hsd_01jc5f1a2b3c4d5e6f7g8h9j0k
