Skip to content

mxr accounts

Generated from mxr accounts --help. After editing crates/daemon/src/cli/, update and review the snapshots with scripts/cargo-test -p mxr --test integration cli_help::, then rebuild site/.

Manage accounts

mxr accounts [OPTIONS] [COMMAND]
Subcommand Purpose
add Add an account
show Show account details
test Test account connectivity
reauth Re-authorize an OAuth account and keep cached mail
repair Re-save account passwords into mxr’s local credential stores
disable Disable an account without deleting local cached mail
remove Remove an account from config; cached mail is kept unless purged
addresses Manage owned addresses (aliases) for an account. Direction inference uses these to classify inbound vs outbound mail
identity Set an account’s colour and tag, the mark on its mail. Config values override what the daemon stored and derived. Pass –color, –tag or both
help Print this message or the help of the given subcommand(s)
Flag Description
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Add, test, repair, disable, or inspect accounts and aliases.

Terminal window
mxr accounts add gmail
mxr accounts addresses add --account work alias@example.com

Add an account.

Without flags, runs an interactive wizard. Pass any subset of the optional flags below to drive the flow non-interactively (scripts / CI). Passwords may also be sourced from MXR_IMAP_PASSWORD, MXR_SMTP_PASSWORD, or MXR_GMAIL_CLIENT_SECRET when stdin is not a TTY.

mxr accounts add [OPTIONS] <PROVIDER>
Flag Description
<PROVIDER> Provider type: gmail, imap, imap-smtp, smtp, outlook, or outlook-work
Flag Description
--account-name <ACCOUNT_NAME> Account key (the short identifier used by other commands)
--email <EMAIL> Email address for the account
--display-name <DISPLAY_NAME> Display name shown in From: headers; defaults to account name
--gmail-bundled <GMAIL_BUNDLED> Use the bundled OAuth client (true) or supply your own (false) [possible values: true, false]
--gmail-client-id <GMAIL_CLIENT_ID> Custom Gmail OAuth client ID (only when --gmail-bundled=false)
--gmail-client-secret <GMAIL_CLIENT_SECRET> Custom Gmail OAuth client secret
--imap-host <IMAP_HOST>
--imap-port <IMAP_PORT> [default: 993]
--imap-no-auth IMAP requires authentication. Default true
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
--imap-username <IMAP_USERNAME>
--imap-password <IMAP_PASSWORD> IMAP password (or set MXR_IMAP_PASSWORD)
--imap-max-connections <IMAP_MAX_CONNECTIONS> Maximum concurrent IMAP connections for this account [default: 4]
--imap-no-tls Connect to IMAP without TLS. Only accepted for loopback hosts (127.0.0.0/8, ::1, localhost), such as a local bridge
--imap-tls-cert-sha256 <IMAP_TLS_CERT_SHA256> Trust only the IMAP server certificate with this SHA-256 (hex), even if self-signed. mxr accounts test <account> prints it
--smtp-host <SMTP_HOST>
--smtp-port <SMTP_PORT> [default: 587]
--smtp-no-auth
--smtp-username <SMTP_USERNAME>
--smtp-password <SMTP_PASSWORD> SMTP password (or set MXR_SMTP_PASSWORD)
-h, --help Print help (see a summary with ‘-h’)

Manage owned addresses (aliases) for an account. Direction inference uses these to classify inbound vs outbound mail

mxr accounts addresses [OPTIONS] <COMMAND>
Subcommand Purpose
list List addresses owned by an account
add Add an address as an alias on an account
remove Remove an alias from an account
set-primary Promote an existing alias to primary (demoting the previous primary)
help Print this message or the help of the given subcommand(s)
Flag Description
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Add an address as an alias on an account

mxr accounts addresses add [OPTIONS] <EMAIL>
Flag Description
<EMAIL>
Flag Description
--account <ACCOUNT> Account name or id. Defaults to the configured default account
--primary Mark as primary; demotes the previous primary atomically
--dry-run Show the stored mail this would reclassify, without adding the address
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

List addresses owned by an account

mxr accounts addresses list [OPTIONS]
Flag Description
--account <ACCOUNT> Account name or id. Defaults to the configured default account
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Remove an alias from an account

mxr accounts addresses remove [OPTIONS] <EMAIL>
Flag Description
<EMAIL>
Flag Description
--account <ACCOUNT>
--dry-run Show the stored mail this would reclassify, without removing the address
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Promote an existing alias to primary (demoting the previous primary)

mxr accounts addresses set-primary [OPTIONS] <EMAIL>
Flag Description
<EMAIL>
Flag Description
--account <ACCOUNT>
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Disable an account without deleting local cached mail

mxr accounts disable [OPTIONS] <NAME>
Flag Description
<NAME>
Flag Description
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Set an account’s colour and tag, the mark on its mail. Config values override what the daemon stored and derived. Pass –color, –tag or both

mxr accounts identity [OPTIONS] <KEY>
Flag Description
<KEY> Account key, as shown by mxr accounts
Flag Description
--color <COLOR> Colour slot: sky, amber, green, yellow, blue, vermilion, purple or slate
--tag <TAG> Tag of 1 to 3 letters or digits. Must be unique across accounts
--dry-run Show the change without writing config
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Re-authorize an OAuth account and keep cached mail

mxr accounts reauth [OPTIONS] <NAME>
Flag Description
<NAME>
Flag Description
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Remove an account from config; cached mail is kept unless purged

mxr accounts remove [OPTIONS] <NAME>
Flag Description
<NAME>
Flag Description
--dry-run
--yes
--purge-local-data
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Re-save account passwords into mxr’s local credential stores

mxr accounts repair [OPTIONS] <NAME>
Flag Description
<NAME>
Flag Description
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Show account details

mxr accounts show [OPTIONS] <NAME>
Flag Description
<NAME>
Flag Description
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Test account connectivity

mxr accounts test [OPTIONS] <NAME>
Flag Description
<NAME>
Flag Description
--format <FORMAT> Output format for accounts (the no-subcommand listing) [possible values: table, json, jsonl, csv, ids]
-h, --help Print help