Skip to main content

chainmail rule edit

Change a rule's fields from flags, or the keys a rule file holds

Usage​

chainmail rule edit <id|name> (field flags | -f FILE) [flags]

Examples​

chainmail rule edit receipts --priority 10 --stop
chainmail rule edit inbox-cleanup --at 07:00
# change only the keys the file holds
chainmail rule edit receipts -f receipts.toml

Flags​

--account stringArray an account the rule covers (repeatable; default: every account)
--action stringArray an action, run in the order given (repeatable): label=NAME, unlabel=NAME, copy=FOLDER, move=FOLDER, link_item=ID[,anchor], forward=ADDR[,ADDR...], flag, unflag, read, unread, archive or trash
--all-accounts make the rule cover every account
--at string run once a day at this time, HH:MM in the [rules] timezone
--description string what the rule is for
--every string run on a schedule, this long after the last run finished: 15m to 30d, such as 6h or 7d
--expected-revision int refuse the change if the rule is no longer at this revision
-f, --file string read the rule from this TOML rule file instead of the field flags
--max-per-run int32 the most messages one run acts on, 1 to 5000 (default 500)
--name string the rule's name: lowercase letters, digits and dashes, starting with a letter or digit
--no-schedule take the rule off its schedule
--note string the note the forward action adds above the forwarded message
--on-new run on new mail as the cache takes it
--priority int32 order among rules, lowest first, -1000000 to 1000000 (default 100)
--query string the messages to act on, in the search language
--stop keep later rules off the messages this rule matched

Global 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)

See also​