Postvak
Rules for your IMAP inbox. Test them with a dry run and undo any delete. Postvak syncs your mail into a local store and runs your rules: move mail into folders, mark it read, or delete transient mail such as sign-in codes and magic links once you no longer need it. Without rules, it leaves your mail alone.
It runs headless as a background service, at login or on a server. On top come a keyboard-driven mail window for reading (postvak gui), a full command line, and an MCP server for agents (see Agents over MCP). Postvak reads and sorts mail; it does not send it. It runs on macOS and Linux.

Quickstart
Postvak ships with no rules. Add your own to rules.toml next to config.toml, in ~/.config/postvak/ on Linux or ~/Library/Application Support/postvak/ on macOS. For example, this one deletes read sign-in codes after an hour:
[[]]
= "purge sign-in codes"
= { = "(?i)sign.?in|verification code|magic link" }
= "1h"
= true
= ["delete"]
Deleted mail is kept as .eml for 30 days: postvak trash list and postvak trash restore FILE.
Why not server-side filters?
- Works with any IMAP server, without Sieve or a webmail settings page.
- Rules run on every sync, not once on delivery, so they can act later: an hour after you read a sign-in code, or once a newsletter is a week old.
rules testshows what every rule would do before it does it, and deleted mail can be restored.- Agents over MCP get only the scopes you grant, so it stays privacy-friendly: by default they see headers but no message bodies, and propose rules instead of acting on mail.
- Passwords stay in the macOS Keychain or the Secret Service, or come from a command such as
pass.
Postvak is licensed under MIT or Apache-2.0, at your option. The mail window's HTML view includes Stylo, the CSS engine from Servo and Firefox, which is under MPL-2.0. The mail window is made with Slint under its royalty-free licence; Help ▸ About Postvak shows its attribution.
More
- Documentation: install, accounts, rules, agent guide and CLI reference
- Contributing and Code of Conduct
- Security policy: how to report a vulnerability
- Changelog