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, Outlook, 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. Outlook and Proton Mail move the message to Archive.
  • trash — move to Trash. Recoverable. Not a permanent delete. mailkit cannot empty Trash. On Outlook this is the Deleted Items folder.
  • untrash — Gmail only.
Proton Mail ids: INBOX:12. Outlook ids: long opaque Graph ids.

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. Outlook, Fastmail, and Proton Mail refuse label verbs. Graph has folders and categories, not Gmail labels. JSON from archive / mark / trash includes count and the id list.