Predictable
The same mail gets the same outcome, every time. A model can file a message differently tomorrow, or delete one it misread.
Open-source mail sorting for macOS and Linux
Postvak sorts any IMAP inbox with rules you can read: move mail, archive it, mark it read, or delete sign-in codes once you have used them. It sorts on your mail server, so every mail app you use sees the result, your phone included. Test every rule with a dry run, and undo anything a rule did.
$ brew install --cask postvak-app/tap/postvak
[[rules]]
name = "used sign-in codes"
match.subject = { regex = "sign.?in|magic link" }
match.older_than = "1h"
match.read = true
actions.delete = true
Many AI mail clients hand every message to a model and let it decide. Postvak sorts with rules you can read, and lets AI help you write them.
match.header.List-Id = { contains = "shop" }move, readNewslettersmatch.subject = { contains = "invoice" }archiveArchivematch.subject = { regex = "sign.?in" }
match.older_than = "1h"deleteTrashno rule matchesuntouchedInboxThe same mail gets the same outcome, every time. A model can file a message differently tomorrow, or delete one it misread.
A rule is a few lines of TOML. rules test shows what it would do. A message a rule acted on says which rule did it, and why, and postvak log lists every action.
Mail is written by strangers. A rule matches patterns, so instructions hidden in a message cannot change what it does.
Your mail is never sent to a model to be sorted. Agents see only what you grant: by default senders and subjects, no bodies.
No tokens per message and no API key. Rules run on every sync, across years of mail, without a round trip to a model.
An agent over MCP reads your inbox and proposes a rule, or a change to a shared list. You approve it once; from then on the rule does the work.
Client filters stop when the app closes. Sieve sees a message once, as it arrives. Postvak keeps sorting without you, and acts on mail later: an hour after you read a sign-in code, or once a newsletter is a week old.
| Feature | Postvak | Thunderbird, Apple Mail | Sieve | imapfilter |
|---|---|---|---|---|
| Sorts while the app is closed | Yes | No | Yes | Yes |
| Sorts mail already in a folder | On every sync | When you run a filter | On delivery only | Yes |
| Works with any IMAP server | Yes | Yes | If it offers Sieve | Yes |
| Rules without programming | TOML or a form | Dialogs | Sieve scripts | Lua |
| Shows what a rule would do first | Dry run | No | No | Dry run |
| Undo a delete | .eml backups | The app's trash | No | No |
| Rules in a file you can keep in git | Yes | No | On the server | Yes |
$ postvak rules test # dry run first
$ postvak service install # sort at login
$ postvak log # what each rule did
$ postvak undo 42 # put one back
Agents propose, you approve
Optional: Postvak works fully without any AI. It also ships an MCP server for Claude, Codex, Cursor, Gemini CLI and other agent hosts. An agent can look at your inbox, write a rule and show its dry run, but the rule stays disabled until you approve it in the window or on the command line.
It sees only what you grant. By default that is folders, senders and subjects: no message bodies, and no moving or deleting mail. Bodies, acting on mail and approving rules are each a scope you add on purpose, and --account hides your other accounts. No scope lets it send mail: it gets no tool to send, and a rule that forwards mail waits until you approve it yourself.
$ postvak mcp install claude-desktop
Agents over MCP
A keyboard-driven window for reading and writing mail, and approving rules. No scripts, no remote content until you allow it, and a seal when your provider confirms who sent the mail. postvak gui
Every feature, with --json for scripts. List, search, move, send, test rules.
For Claude, Codex, Cursor and other agents, scoped to what you grant. Senders and subjects by default.
Headless at login, on a server or in Docker. Works with any IMAP server.
Free and open source under MIT or Apache-2.0, built in the open. File an issue, or help build it.