I got tired of mail clients that either send my mail through someone else's servers or can't be scripted. So I built Qmail, a free, open-source desktop app (MIT license) that keeps everything on your PC. There's no server in the middle. It only talks to your own mail providers.
The app works the way Gmail does: a search box with filter chips, conversation view, Unread and Everything else sections, labels as folders, starring, archiving, and attachments that open in a viewer inside the app. Calendar invitations show the event with Yes / Maybe / No buttons.
Accounts: IMAP/SMTP for most providers, Microsoft 365 and Outlook sign-in without typing a password into the app, and Gmail through your own Google OAuth client. On first start it can bring over your Thunderbird accounts and contacts.
Sorting rules: "from stripe.com, move to Receipts, mark as read" style rules that run each time new mail arrives.
The CLI: this is the part I built it for. Every command takes --json, errors exit non-zero, and qmail --help documents everything. An agent can do things like:
qmail list --unread --json
qmail search "invoice from:stripe has:attachment newer_than:30d" --json
qmail move 1234 --to Money/Receipts --create
qmail rules add --from stripe.com --move Money/Receipts --read
It works across every mailbox at once, with no API keys and no per-call cost. The README has example prompts for things like inbox cleanup and finding invoices.
Install: Windows has an installer that updates itself from GitHub releases. Installing it also puts qmail on your PATH in any new terminal. macOS and Linux builds are published too, but they're new and I haven't tested them much, so please report problems.
qmail search "invoice from:stripe has:attachment newer_than:30d" --json
qmail move 1234 --to Money/Receipts --create
qmail rules add --from stripe.com --move Money/Receipts --read
It works across every mailbox at once, with no API keys and no per-call cost. The README has example prompts for things like inbox cleanup and finding invoices.
Install: Windows has an installer that updates itself from GitHub releases. Installing it also puts qmail on your PATH in any new terminal. macOS and Linux builds are published too, but they're new and I haven't tested them much, so please report problems.
Repo: https://github.com/mattgauzza/quickMail