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

Command

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"optional

    Apply this preset's thresholds and guards. It also clears the per-label rules, unless labels is given with it.

  • --warn-atinteger | nulloptional

    Mail scoring at least this is delivered with a warning and is never answered automatically. Null means never.

  • --hold-atinteger | nulloptional

    Mail scoring at least this is held for the owner and kept from agents. Null means never. Not below warnAt.

  • --labelsobject of "warn" | "hold"optional

    The least that happens to mail carrying a label, whatever its score: warn or hold. Replaced as a whole; {} clears it.

  • --hold-unauthenticated-new-sendersbooleanoptional

    Hold mail from a sender the inbox has never dealt with when it does not authenticate as its domain.

  • --model-analysisbooleanoptional

    Let 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-guardbooleanoptional

    Refuse 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"optional

    known: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403 risk_blocked otherwise). 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"optional

    Whose 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's enforcement, except off, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts on apps.

  • --allow-key-managementbooleanoptional

    Let 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-scanbooleanoptional

    Run 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-sandboxbooleanoptional

    Open 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"optional

    The least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish): deliver, warn or hold.

  • --jsonobjectoptional

    The request body as one JSON object. A flag given beside it replaces the field of the same name.

Example

doorman security update \
  --level strict

doorman inboxes security get

Command

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-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

Example

doorman inboxes security get inb_01jc4q7w9k2m5n8p3r6t1v4x7z

doorman inboxes security update

Command

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-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

  • --level"relaxed" | "balanced" | "strict"optional

    Apply this preset's thresholds and guards. It also clears the per-label rules, unless labels is given with it.

  • --warn-atinteger | nulloptional

    Mail scoring at least this is delivered with a warning and is never answered automatically. Null means never.

  • --hold-atinteger | nulloptional

    Mail scoring at least this is held for the owner and kept from agents. Null means never. Not below warnAt.

  • --labelsobject of "warn" | "hold"optional

    The least that happens to mail carrying a label, whatever its score: warn or hold. Replaced as a whole; {} clears it.

  • --hold-unauthenticated-new-sendersbooleanoptional

    Hold mail from a sender the inbox has never dealt with when it does not authenticate as its domain.

  • --model-analysisbooleanoptional

    Let 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-guardbooleanoptional

    Refuse 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"optional

    known: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403 risk_blocked otherwise). 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"optional

    Whose 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's enforcement, except off, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts on apps.

  • --allow-key-managementbooleanoptional

    Let 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-scanbooleanoptional

    Run 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-sandboxbooleanoptional

    Open 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"optional

    The least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish): deliver, warn or hold.

  • --jsonobjectoptional

    The request body as one JSON object. A flag given beside it replaces the field of the same name.

Example

doorman inboxes security update inb_01jc4q7w9k2m5n8p3r6t1v4x7z \
  --level strict

doorman inboxes security reset

Command

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-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

Example

doorman inboxes security reset inb_01jc4q7w9k2m5n8p3r6t1v4x7z

doorman inboxes senders list

Command

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-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

  • --standing"trusted" | "known" | "new" | "blocked"optional

    Only senders with this standing.

  • --qstringoptional

    Keep the senders whose address or name contains this text, case-insensitively.

  • --limitintegeroptional

    Page size, 1 to 100. Defaults to 50.

  • --offsetintegeroptional

    Rows to skip. Defaults to 0.

Example

doorman inboxes senders list inb_01jc4q7w9k2m5n8p3r6t1v4x7z

doorman sender-rules list

Command

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-idstringoptional

    Only the rules that apply to this inbox alone. Omit for every rule of the account.

  • --standing"trusted" | "blocked"optional

    Only trusted or only blocked.

  • --qstringoptional

    Keep the rules whose address or domain contains this text.

  • --limitintegeroptional

    Page size, 1 to 100. Defaults to 50.

  • --offsetintegeroptional

    Rows to skip. Defaults to 0.

doorman sender-rules create

Command

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
  • --matchstringrequired

    An address (sam@example.com) or a domain (example.com, which covers every address at it, not its subdomains).

  • --standing"trusted" | "blocked"required

    trusted: 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-idstringoptional

    Apply to this inbox only. Omit for every inbox of the account.

  • --notestringoptional

    A label for whoever reads the list later, at most 200 characters.

  • --jsonobjectoptional

    The request body as one JSON object. A flag given beside it replaces the field of the same name.

Example

doorman sender-rules create \
  --match sam@example.com \
  --standing trusted

doorman sender-rules delete

Command

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-idstringoptional

    The same as the argument <senderRuleId>, for a script that names everything.

Example

doorman sender-rules delete snr_01jc5f1a2b3c4d5e6f7g8h9j0k

doorman inboxes held list

Command

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-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

  • --limitintegeroptional

    Page size, 1 to 100. Defaults to 50.

  • --offsetintegeroptional

    Rows to skip. Defaults to 0.

Example

doorman inboxes held list inb_01jc4q7w9k2m5n8p3r6t1v4x7z

doorman messages release

Command

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-idstringoptional

    The same as the argument <messageId>, for a script that names everything.

Example

doorman messages release msg_01jc5a6g7h8j9k0m1n2p3q4r5s

doorman messages discard

Command

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-idstringoptional

    The same as the argument <messageId>, for a script that names everything.

Example

doorman messages discard msg_01jc5a6g7h8j9k0m1n2p3q4r5s

doorman messages feedback

Command

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-idstringoptional

    The same as the argument <messageId>, for a script that names everything.

  • --verdict"safe" | "unsafe"required

  • --jsonobjectoptional

    The request body as one JSON object. A flag given beside it replaces the field of the same name.

Example

doorman messages feedback msg_01jc5a6g7h8j9k0m1n2p3q4r5s \
  --verdict safe

doorman security audit

Command

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-idstringoptional

    Only the entries about this inbox.

  • --limitintegeroptional

    Page size, 1 to 100. Defaults to 50.

  • --offsetintegeroptional

    Rows to skip. Defaults to 0.

doorman security preview

Command

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-idstringoptional

    Evaluate 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-idstringoptional

    A 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"optional

    A built-in message: ordinary mail, a phishing attempt, an injection hidden from the reader, or an impersonation.

  • --fromstringoptional

    The sender of your own message. Defaults to a sender the inbox has never seen.

  • --authenticatedbooleanoptional

    Whether 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

  • --textstringoptional

    The plain-text body of your own message.

  • --htmlstringoptional

    The HTML body of your own message.

  • --policyobjectoptional

    A draft to evaluate under, applied over the policy in force. Omit to use the policy in force.

  • --jsonobjectoptional

    The request body as one JSON object. A flag given beside it replaces the field of the same name.

Example

doorman security preview \
  --sample prompt_injection \
  --policy '{"level":"strict"}'

doorman inboxes held-sends list

Command

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-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

  • --status"held" | "sent" | "discarded" | "expired"optional

    Only held sends in this state. Defaults to held.

  • --kind"held" | "draft"optional

    Only the sends the policy kept (held) or only drafts (draft). Both when left out.

  • --limitintegeroptional

    Page size, 1 to 100. Defaults to 50.

  • --offsetintegeroptional

    Rows to skip. Defaults to 0.

Example

doorman inboxes held-sends list inb_01jc4q7w9k2m5n8p3r6t1v4x7z

doorman held-sends get

Command

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-idstringoptional

    The same as the argument <heldSendId>, for a script that names everything.

Example

doorman held-sends get hsd_01jc5f1a2b3c4d5e6f7g8h9j0k

doorman held-sends approve

Command

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-idstringoptional

    The same as the argument <heldSendId>, for a script that names everything.

Example

doorman held-sends approve hsd_01jc5f1a2b3c4d5e6f7g8h9j0k

doorman held-sends discard

Command

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-idstringoptional

    The same as the argument <heldSendId>, for a script that names everything.

Example

doorman held-sends discard hsd_01jc5f1a2b3c4d5e6f7g8h9j0k

Up Down to move, Enter to open, Esc to close