chainmail
Email for AI agents, behind a policy daemon
Usage
chainmail [flags]
Examples
# find unread mail, then read a message by its ref
chainmail search is:unread in:inbox
chainmail get cm1:work:INBOX:7:42
Flags
--output string output format: json or table (default $CHAINMAIL_OUTPUT, then cli.toml, then table on a terminal, json otherwise)
--socket string daemon socket (default $CHAINMAIL_SOCKET, then cli.toml, then /run/chainmail/chainmail.sock)
Commands
- chainmail accounts: List, test and probe configured accounts
- chainmail admin: Daemon administration
- chainmail archive: Move messages out of the inbox to the account's archive
- chainmail attachment: Download one attachment, by the part number get lists
- chainmail audit: Show the daemon's audit log, newest first
- chainmail auth: Log in to OAuth2 accounts
- chainmail cache: Show and maintain the local mail cache
- chainmail completion: Print a shell completion script
- chainmail copy: Copy messages to a folder
- chainmail daemon: Run the chainmail daemon
- chainmail draft: Save, change, send and delete drafts
- chainmail expunge: Delete messages for good (disabled unless policy allows it)
- chainmail flag: Star messages: add \Flagged
- chainmail flags: Add and remove flags such as \Seen, \Flagged and keywords
- chainmail folder: Create, rename and delete folders
- chainmail folders: List folders and their message counts
- chainmail forward: Forward a message, with its attachments
- chainmail get: Read up to 50 messages
- chainmail item: Keep work items and file mail threads against them
- chainmail label: Add and remove Gmail labels
- chainmail mcp: Serve chainmail's tools to an AI agent over MCP on stdio
- chainmail move: Move messages to a folder
- chainmail read: Mark messages read: add \Seen
- chainmail reply: Reply to a message, quoting it
- chainmail search: Search mail on every account, newest first
- chainmail secret: Store secrets in the daemon's vault
- chainmail send: Send a new message
- chainmail send-raw: Send a complete RFC 5322 message as given
- chainmail thread: Read a message's whole thread, oldest first
- chainmail trash: Move messages to Trash
- chainmail unflag: Unstar messages: remove \Flagged
- chainmail unread: Mark messages unread: remove \Seen
- chainmail version: Print the chainmail version
- chainmail watch: Stream mail events as they happen, one per line