These verbs change filing on the account. They do not send. They do not need --yes. Every organize verb takes message ids or -q "query". If both are given, ids win. Confirm bulk -q scope with the human when the match set could be large (mailkit search first).

Gmail and Proton Mail

mailkit archive MESSAGE_ID
mailkit archive -q "from:newsletters.example.com older_than:7d"
mailkit mark-read MESSAGE_ID
mailkit mark-unread MESSAGE_ID
mailkit trash MESSAGE_ID
  • archive — leave the inbox. Gmail drops the INBOX label. Proton Mail moves the message to Archive.
  • trash — move to Trash. Recoverable. Not a permanent delete. mailkit cannot empty Trash.
  • untrash — Gmail only.
Proton Mail ids: INBOX:12.

Gmail only — labels

mailkit labels --json
mailkit labels-create Receipts
mailkit label MESSAGE_ID --add Receipts --create
mailkit label MESSAGE_ID --remove Receipts
mailkit label -q "from:store.example.com" --add Receipts --create
--add and --remove are repeatable. --create makes a missing --add label. Fastmail and Proton Mail refuse label verbs. JSON from archive / mark / trash includes count and the id list.