Mail

Email CLI configuration

See and change a profile's mailbox settings, permissions and run records.

Settings live in one file, config.json, in the folder mail doctor shows. Each profile has its own part, and defaults apply to every profile. This page lists how to see and change them.

mail personal config show
mail personal config set limit 50
mail personal config unset limit

A profile made by session start also holds the mailbox: address, login (when it is not the address), imap_host, imap_port, imap_security (tls or starttls), auth (app-password; a profile saved without it signs in with an app password too) and folders (the folders sync reads). smtp_host, smtp_port and smtp_security name the server messages send submits to; set them only for a provider the built-in list does not know. The app password is not a setting: it lives in the keyring, or in MAIL_PASSWORD for a run that has no keyring. Nor is an OAuth sign-in: its tokens live in the keyring too.

read_attachments (default true) and max_attachment_mb (default 10) decide whether sync reads the text of attachments into the search index and the largest file it reads. No file is kept. sync --no-attachments, --attachments and --max-attachment-mb override them for one run; messages show reads one email's attachments whatever they say.

microsoft_client_id is the Microsoft app that Outlook.com and Microsoft 365 sign in with, when you use your own instead of WireCat's. Set it once for every profile with config set --defaults microsoft_client_id and the app's id; how to get an id is in register a Microsoft app. google_client_id does the same for Gmail over OAuth; its secret comes from MAIL_GOOGLE_CLIENT_SECRET, never the file. MAIL_MICROSOFT_CLIENT_ID and MAIL_GOOGLE_CLIENT_ID win over both settings for one run, and --client-file wins over everything for Gmail. A profile already signed in keeps refreshing with the app it signed in with. mail doctor shows each profile's app under oauth_client.

An agent over MCP that holds mcp.authority may change settings with config set, but never these: the mailbox settings above, which decide where the app password goes, microsoft_client_id and google_client_id, which decide which app you sign in to, and permissions.messages.send.others, which lets an agent mail other people. Only you change them, at a terminal.

config show lists each setting and where it came from: the file, a variable or the default.

config set also lists settings for search, speech and embeddings (embedding_*, speech_model, picture_search and others). Every WireCat CLI shares that list. mail ignores them.

Permissions

permissions decides what a command may do for this profile: allow, ask, readonly or deny, per permission key. Over MCP there is no one to ask, so ask lets the command run. MAIL_READ_ONLY=1 refuses every write, whatever the permissions say, but one: rules add --sender or --list-id with --do envelope, for a sender or list that has no rule yet, which memo's scheduled mail triage runs. It is recorded with source: agent (rules list source:agent); a replaced rule, --domain, --filter, --kind, any other action and a tag stay refused, as do rules remove, rules import and rules apply.

The key of a command is its path: messages.move, folders.delete. Built in, a change that can be undone goes ahead (flags, moves, copies, folders made or renamed, drafts saved), and these ask: messages.delete, folders.delete, drafts.delete, and messages.bulk, which every change of more than 20 messages or chosen by --filter passes as well. At a terminal ask is a y/N question, and no is the default. A flag answers it instead: --allow-dangerous for drafts delete, since a deleted draft does not come back, and --yes for every other change, messages delete included, since Trash and messages restore bring the mail back. With no terminal and no flag the command stops with confirmation_required (exit 7) and changes nothing.

Sending has two keys. messages.send and messages.forward are the commands themselves and go ahead when the mail goes only to you. Mail that reaches anyone else also passes messages.send.others, which asks by default; set it to allow to send without the question, or readonly to let this profile mail only you. An agent over MCP, where nobody can answer the question, mails only you until you set messages.send.others in the config yourself (ask or allow); an mcp serve --permission cannot open it. Each recipient counts toward sends_per_hour (30 by default).

mail personal config set permissions.messages readonly      # no flag, move, deletion or send on this profile
mail personal config set permissions.messages.bulk deny     # one message at a time only
mail personal config set permissions.messages.send.others allow   # send to others without the question, agents too

Every attempt to change the mailbox or send goes into the profile's send journal with its key, the count and the outcome, never a subject, an address or the text.

Run records

A command that fails is kept as a run, for mail runs list and runs show. record_input decides whether a run keeps the words you typed; it is true unless you set it to false. Secrets are masked either way; see Security.