Skip to content
machinemail

lists

Allow and block lists for the organization, a pod or an inbox. A non-empty allow list is allow-only: one receive/allow entry blocks mail from every sender not on it. The `machinemail lists` commands: arguments, flags, examples and the API routes they call.

Allow and block lists for the organization, a pod or an inbox. A non-empty allow list is allow-only: one receive/allow entry blocks mail from every sender not on it.

CommandSummary
lists createCreate list entry
lists deleteDelete list entry
lists getGet list entry
lists listList the entries of an allow or block list

Every command also takes the global flags.

lists create

Create list entry.

An address (user@example.com) or a domain (example.com); a domain also matches its subdomains. Adding an entry that exists returns it unchanged.

An allow entry makes its scope allow-only. The first receive/allow entry at the organization (/v0/lists), a pod (/v0/pods/{pod_id}/lists) or an inbox (/v0/inboxes/{inbox_id}/lists) blocks every sender that does not match an allow entry: their mail is labeled BLOCKED, emits message.received.blocked and is withheld from agents. Likewise, a send/allow entry blocks sending to every other recipient. An allow-listed sender reaches trust level verified only when DMARC passes and is aligned; do not add one only to raise trust. Prior correspondence (the inbox has written to the sender) is the usual way to reach verified.

Requires the list_entry_create permission.

shell
machinemail lists create <direction> <type> [flags]

Arguments

<direction>stringRequired
receive: who may send to you (inbound mail from a blocked sender is labeled BLOCKED). send: who you may send to (a blocked recipient is a 403). reply entries are stored and listed but not applied to any mail yet.
<type>stringRequired
block refuses matching addresses. allow makes the list exclusive: once it has an entry, only matching addresses pass.

Flags

--inbox <inbox-id>string
Create it in this inbox.
--pod <pod-id>string
Create it in this pod.
--entry <value>string
Email address or domain to add.
--reason <value>string
Reason for adding the entry.
-d, --data <json|@file|->string
Request body as JSON, @file or - for stdin; field flags override its keys.

Examples

shell
machinemail lists create send allow --entry spam@example.com
machinemail lists create send allow --entry spam@example.com --inbox agent@machinemail.dev
machinemail lists create send allow --data @body.json

API

lists delete

Delete list entry.

Also: machinemail lists rm.

Deleting the last allow entry for a direction at every level that applies ends allow-only mode: unmatched addresses are allowed again unless a block entry matches.

Requires the list_entry_delete permission.

shell
machinemail lists delete <direction> <type> <entry> [flags]

Arguments

<direction>stringRequired
receive: who may send to you (inbound mail from a blocked sender is labeled BLOCKED). send: who you may send to (a blocked recipient is a 403). reply entries are stored and listed but not applied to any mail yet.
<type>stringRequired
block refuses matching addresses. allow makes the list exclusive: once it has an entry, only matching addresses pass.
<entry>stringRequired
Email address or domain.

Flags

--inbox <inbox-id>string
Use this inbox's scoped route.
--pod <pod-id>string
Use this pod's scoped route.

Examples

shell
machinemail lists delete send allow spam@example.com
machinemail lists delete send allow spam@example.com --inbox agent@machinemail.dev

API

lists get

Get list entry.

Requires the list_entry_read permission.

shell
machinemail lists get <direction> <type> <entry> [flags]

Arguments

<direction>stringRequired
receive: who may send to you (inbound mail from a blocked sender is labeled BLOCKED). send: who you may send to (a blocked recipient is a 403). reply entries are stored and listed but not applied to any mail yet.
<type>stringRequired
block refuses matching addresses. allow makes the list exclusive: once it has an entry, only matching addresses pass.
<entry>stringRequired
Email address or domain.

Flags

--inbox <inbox-id>string
Only this inbox.
--pod <pod-id>string
Only this pod.

Examples

shell
machinemail lists get send allow spam@example.com
machinemail lists get send allow spam@example.com --inbox agent@machinemail.dev

API

lists list

List the entries of an allow or block list.

Also: machinemail lists ls.

Entries stored at this exact level. Mail is checked against the organization, pod and inbox lists together. An allow entry wins over a block entry; while any allow entry exists for a direction, every address that matches none is blocked (allow-only).

Requires the list_entry_read permission.

shell
machinemail lists list <direction> <type> [flags]

Arguments

<direction>stringRequired
receive: who may send to you (inbound mail from a blocked sender is labeled BLOCKED). send: who you may send to (a blocked recipient is a 403). reply entries are stored and listed but not applied to any mail yet.
<type>stringRequired
block refuses matching addresses. allow makes the list exclusive: once it has an entry, only matching addresses pass.

Flags

--inbox <inbox-id>string
Only this inbox.
--pod <pod-id>string
Only this pod.
--limit <n>integer
Maximum number of items to return. Default 50, maximum 500; larger values are capped.

Default50

--page-token <value>string
next_page_token from the previous page.
--ascendingboolean
false sorts by entry descending. Default true.

Defaulttrue

--allboolean
Follow next_page_token and return every page.

Examples

shell
machinemail lists list send allow
machinemail lists list send allow --inbox agent@machinemail.dev
machinemail lists list send allow --all --json | jq '.entries | length'

API