Open-source mail sorting for macOS and Linux

Your inbox, organized by rules you write.

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
The Postvak mail window: folders on the left, the inbox in the middle, an open message on the right
rules.toml
[[rules]]
name = "used sign-in codes"
match.subject = { regex = "sign.?in|magic link" }
match.older_than = "1h"
match.read = true
actions.delete = true

Rules, not an AI that sorts your mail.

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, readNewsletters
match.subject = { contains = "invoice" }archiveArchive
match.subject = { regex = "sign.?in" }
match.older_than = "1h"
deleteTrash
no rule matchesuntouchedInbox
deals@shop.example
Invoice #2041
Your sign-in code
Lunch on Friday?
A rule matches on any header, the sender or the subject, then acts. No match, the message stays in the inbox.
See rules that work together

Predictable

The same mail gets the same outcome, every time. A model can file a message differently tomorrow, or delete one it misread.

Safe from the sender

Mail is written by strangers. A rule matches patterns, so instructions hidden in a message cannot change what it does.

Private

Your mail is never sent to a model to be sorted. Agents see only what you grant: by default senders and subjects, no bodies.

Free and fast

No tokens per message and no API key. Rules run on every sync, across years of mail, without a round trip to a model.

AI where it helps

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.

Why not Thunderbird filters or Sieve?

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.

FeaturePostvakThunderbird, Apple MailSieveimapfilter
Sorts while the app is closedYesNoYesYes
Sorts mail already in a folderOn every syncWhen you run a filterOn delivery onlyYes
Works with any IMAP serverYesYesIf it offers SieveYes
Rules without programmingTOML or a formDialogsSieve scriptsLua
Shows what a rule would do firstDry runNoNoDry run
Undo a delete.eml backupsThe app's trashNoNo
Rules in a file you can keep in gitYesNoOn the serverYes
terminal
$ postvak rules test      # dry run first
$ postvak service install # sort at login
$ postvak log             # what each rule did
$ postvak undo 42         # put one back
The full comparison, AI sorters and where Postvak falls short

Agents propose, you approve

Let Claude draft the rule. Keep the decision.

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
The Rules view with a rule proposed by an agent, its dry run on cached mail beside it, waiting for Approve rule or Reject

One engine, four ways in.

Sort your mail on your own terms.

Free and open source under MIT or Apache-2.0, built in the open. File an issue, or help build it.