nextmail security
Every command in this namespace, with its arguments, flags and examples.
Commands
Verification codes for apps connected with OAuth: check whether sensitive changes are unlocked, ask for a code and verify it. API keys are never asked for one. It also reads the security log of the workspace: who invited, added or removed people, changed roles or changed how the workspace is protected, and reads and sets whether everyone in the workspace has to sign in with two-factor authentication.
Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags
nextmail security list-events
Read the workspace security log
Usage
nextmail security list-events [flags]
Resolves one page of the changes people made to who can reach the workspace, newest first: invitations sent and withdrawn, members added and removed, roles created, changed and deleted, the two-factor requirement, passwords set for an address and directory sync. Each one names who did it in actor. Nothing is ever removed from it.
Add --all to walk every page: a table on a terminal, one JSON object per line when piped or with --ndjson, and one { items, hasMore, nextCursor } document with --json. --max <n> stops after that many items.
Flags
--limit <n>Page size, from 1 to 100. The server defaults to 25.
Default25--cursor <value>The
nextCursorof the previous page. Leave it out for the first page.--allFetch every page and stream the items as they arrive.
--max <n>Stop after this many items. Implies
--all.--ndjsonPrint every item as one JSON object per line. Implies
--all
Examples
nextmail security list-eventsnextmail security list-events --limit 50nextmail security list-events --all --max 100nextmail security list-events --all > security.ndjsonAlso available in
nextmail security get-policy
Read the two-factor requirement
Usage
nextmail security get-policy [flags]
Resolves whether the workspace requires everyone in it to sign in with two-factor authentication, as Settings, Privacy shows it to every member, and whether the person the key or the app acts for meets it: the workspace owner for an API key, and the person who connected the app for an access token.
myTwoFactorEnabled says whether that person has an authenticator app turned on, and twoFactorSatisfied whether they meet the requirement, which an authenticator app or a passkey does.
Examples
nextmail security get-policynextmail security get-policy --jsonAlso available in
nextmail security update-policy
Require two-factor sign-in
Usage
nextmail security update-policy --require-two-factor [flags] nextmail security update-policy --data <json|@file|-> [flags]
Requires everyone in the workspace, the owner included, to sign in with two-factor authentication, or lifts the requirement, and resolves with the requirement as it is now. Somebody without an authenticator app or a passkey is refused in the workspace until they add one, and an app they connected stops working until then.
An API key acts for the workspace owner, so it stops working too while the owner has neither an authenticator app nor a passkey. Check twoFactorSatisfied on getPolicy before turning it on.
Flags
--require-two-factorTrue asks everyone in the workspace to sign in with an authenticator app or a passkey. False lifts the requirement. Required, here or in
--data.--data <json|@file|->The whole
patchas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
nextmail security update-policy --require-two-factornextmail security update-policy --data @security.json