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.
| Command | Summary |
|---|---|
lists create | Create list entry |
lists delete | Delete list entry |
lists get | Get list entry |
lists list | List 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.
Arguments
<direction>stringRequired<type>stringRequiredFlags
--inbox <inbox-id>string--pod <pod-id>string--entry <value>string--reason <value>string-d, --data <json|@file|->stringExamples
API
POST /v0/lists/{direction}/{type}POST /v0/inboxes/{inbox_id}/lists/{direction}/{type}with--inboxPOST /v0/pods/{pod_id}/lists/{direction}/{type}with--pod
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.
Arguments
<direction>stringRequired<type>stringRequired<entry>stringRequiredFlags
--inbox <inbox-id>string--pod <pod-id>stringExamples
API
DELETE /v0/lists/{direction}/{type}/{entry}DELETE /v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}with--inboxDELETE /v0/pods/{pod_id}/lists/{direction}/{type}/{entry}with--pod
lists get
Get list entry.
Requires the list_entry_read permission.
Arguments
<direction>stringRequired<type>stringRequired<entry>stringRequiredFlags
--inbox <inbox-id>string--pod <pod-id>stringExamples
API
GET /v0/lists/{direction}/{type}/{entry}GET /v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}with--inboxGET /v0/pods/{pod_id}/lists/{direction}/{type}/{entry}with--pod
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.
Arguments
<direction>stringRequired<type>stringRequiredFlags
--inbox <inbox-id>string--pod <pod-id>string--limit <n>integer--page-token <value>string--ascendingboolean--allboolean