Open source · works with iCloud, Fastmail and any IMAP mailbox

Your inbox, sorted by rules you write in plain English.

Tell MailRules where things go, the way you'd tell an assistant. It watches your mailbox and files every new email seconds after it lands, on the server, so Apple Mail, Gmail and your phone all see the same tidy inbox.

Self-host free from GitHubJoin the cloud waitlist

The hosted version is coming soon. Dry-run mode shows what MailRules would do before it touches anything.

Every new email takes the cheapest path that can decide it, then gets filed in seconds.
Works withiCloud MailGmail cloudOutlook cloudYahoo MailFastmailZohoMailAny IMAP server

Write it once. It runs on every email, forever.

No filter syntax, no folders to babysit. Three steps, about three minutes.

  1. 01

    Say what you want

    Type or dictate one rule or ten in a paragraph. MailRules turns them into clean rules, shows how many past emails each would match, and asks when something's unclear.

  2. 02

    Connect your mailbox

    Sign in with an app password. MailRules watches with IMAP IDLE and acts within seconds of arrival. It reads without marking anything read.

  3. 03

    Check the reasons, fix in one click

    Every action shows a one-line reason. Wrong call? Undo it, or move it and MailRules learns that sender. Unsure emails wait in Needs review.

AI only where it's needed. That's why it's cheap.

Each email takes the cheapest path that can decide it. Most never reach a language model at all.

≈ $0.32
model cost per month at 100 emails a day
1 · freeSender rulesSenders you've set a rule for are filed instantly.
2 · freeConditionsDomain, subject, attachment, list, alias: matched on your server.
3 · ≈ $0.00002Decision modelPicks the matching rule with a calibrated confidence.
4 · only when unsureClaude Haiku 4.5A second opinion for the hard ones. Still unsure? It waits for you.

Built so you can trust a robot with your inbox.

English or exact conditions

Describe intent in words, or build precise rules on sender, domain, subject, attachments and more. Mix both in one rule.

Undo anything for 30 days

One email, one rule's day, the last hour or a whole cleanup batch. Trash is a move, never a delete.

A reason on every decision

See which step decided, the confidence and why, in one sentence. No black box.

Clean up years of mail

Preview what your rules would do to old mail, run it in the background, undo it as one batch.

Senders at a glance

Who sends you the most, and when they last wrote. Route any sender to a folder, the inbox or Trash for good. One-click unsubscribe is coming next.

Private by design

Credentials encrypted, bodies never logged, only trimmed text sent to the model. Self-host and nothing leaves your server but the model call.

Open source. Your server, your keys.

The full daemon and web app are AGPL and free to run. One Go binary, SQLite, no Node server. Bring your own model key, or run fully local with Ollama.

  • Every core feature, unlimited mailboxes
  • Docker, a single binary or Homebrew
  • Web UI on localhost; put it behind your own TLS proxy
docker-compose.yml
services:
  mailrules:
    image: ghcr.io/turtlebyte-in/mailrules:latest
    ports: ["127.0.0.1:8080:8080"]
    volumes: ["./data:/data"]
    environment:
      MAILRULES_DRY_RUN: "true"
      OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
      ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
$ docker compose up -d

Somewhere between mail filters and an AI email client.

Mail filtersAI email clientsMailRules
Understands “recruiters I haven't talked to”No, keywords onlyYesYes
Keep using your mail appYesUsually you switch appsYes, it sorts on the server
iCloud and any IMAPPer providerMostly Gmail and OutlookYes
Explains and undoes every actionNoVariesYes, for 30 days
Self-host, open sourceBuilt inRarelyYes, AGPL

Free to run yourself. Cheap to let us run it.

Self-hosting is free today. The hosted cloud is coming soon: join the waitlist to lock in founding-member pricing for life and a 14-day free trial.

Self-host

Free forever
AGPL-3.0 · available now

Run it on your own server with your own model key or Ollama.

  • Every core feature, unlimited mailboxes
  • Any IMAP provider
  • Your key, or fully local models
  • Daily summary via your own mail server
  • Community support on GitHub
Get it on GitHub

Personal

Most popular
$5 / month
or $50 a year

We run it for you. Always on, nothing to maintain.

  • 3 mailboxes
  • 3,000 AI-sorted emails a month
  • Unlimited with your own key
  • One-click sign-in (Gmail, Outlook)
  • Templates and daily summary
Join the waitlist

Pro

$10 / month
or $100 a year

For heavy inboxes and people who live in email.

  • Everything in Personal
  • 10 mailboxes
  • 10,000 AI-sorted emails a month
  • Integrations, draft replies, priority support
Join the waitlist

Team

$8 / seat / month
or $80 a year · from 2 seats

Shared rules and shared inboxes for small teams. Self-serve, no sales call.

  • Everything in Pro
  • Shared rule library
  • Roles and SSO
  • 5,000 AI-sorted emails a month per seat, shared by the team
  • Audit export
Join the waitlist

Teams over 20 seats, invoicing, or AGPL-free commercial terms: [email protected]. Checkout and billing by Paddle; taxes are calculated at checkout.

Want us to run it for you?

The hosted version is in the works. Join the waitlist for early access, a 14-day free trial and founding-member pricing locked for life.

One email when we launch, nothing else. See our privacy policy.

Questions

Does MailRules read my email?

Only to decide where it goes. Sender rules and conditions run on the server with no model at all. When a model is needed, it gets the sender, subject and a trimmed plain-text excerpt. Full email bodies are never logged or stored.

Which providers work?

Any IMAP mailbox with an app password: iCloud, Fastmail, Yahoo, Zoho and your own server. The cloud plans add one-click Gmail and Outlook sign-in.

iCloud MailGmailOutlookYahoo MailFastmailZoho Mail
What if it gets one wrong?

Undo it in one click, or tell it the right place and tick “Always do this for this sender” so it remembers. Anything below your confidence threshold stays in your inbox and waits in Needs review.

Can I use my own AI key or a local model?

Yes. Self-hosting uses your own OpenRouter, Anthropic or OpenAI-compatible key, or Ollama on your machine. On the cloud plans, your own key removes the monthly email limit.

When does the cloud version launch?

The open-source version is available now. The hosted cloud follows once it has run reliably for our beta users. Waitlist members get early access and founding-member pricing.

What happens if I cancel?

Your mail stays where it was filed, in your own mailbox. Export your rules as YAML and run them on the free self-hosted version.

Tell your inbox what to do. Then stop thinking about it.

Self-host free from GitHubJoin the cloud waitlist