Open source · works with iCloud, Fastmail and other IMAP mailboxes

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.

Hosted plans start with a 14-day free trial, no card. 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 with

iCloud MailGmailOutlook cloud plansYahoo 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 mark it Wrong and MailRules can remember 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.72
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.0004Decision 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. Unsubscribe in one click where the sender offers it.

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
    restart: unless-stopped
    ports: ["127.0.0.1:8080:8080"]
    volumes: ["mailrules-data:/data"]
    read_only: true
    tmpfs: ["/tmp"]
    cap_drop: [ALL]
    security_opt: ["no-new-privileges:true"]
    environment:
      MAILRULES_DRY_RUN: "true"
      MAILRULES_COOKIE_SECURE: "false"
      OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
      ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
volumes:
  mailrules-data:
$ 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, Fastmail and other 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. Or let us run it: every hosted account starts with a 14-day free trial, no card needed.

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 mailbox except Outlook.com and Microsoft 365
  • Your key, or fully local models
  • Daily summary via your own mail server
  • Community support on GitHub
Get it on GitHub

Personal

Most popular
… / month
Price in your currency

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

  • 3 mailboxes
  • 3,000 AI-sorted emails a month
  • Unlimited with your own key
  • Gmail with an app password
  • One-click Outlook and Google Workspace sign-in
  • Templates, cleanup and daily summary
Start free trial

Pro

… / month
Price in your currency

For heavy inboxes and people who live in email.

  • Everything in Personal
  • 10 mailboxes
  • 10,000 AI-sorted emails a month
  • Suggest from my mail
  • Integrations, draft replies, priority support
Start free trial

Team

… / seat / month
Price in your currency · from 2 seats

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

  • Everything in Pro
  • Shared rule library
  • Roles
  • 5 mailboxes and 5,000 AI-sorted emails a month per seat, shared by the team
  • Audit export
Start free trial

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

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 a password or app password, on every plan: iCloud, Fastmail, Yahoo, Zoho, Gmail, Google Workspace where your admin allows app passwords, and your own server. Self-hosted, Proton Mail works through your own Proton Mail Bridge. Outlook.com and Microsoft 365 only accept Microsoft sign-in, so they need a cloud plan. The cloud plans add one-click Outlook sign-in, and one-click Google Workspace sign-in for organisations whose admin trusts MailRules.

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, Cloudflare or OpenAI-compatible key, or Ollama on your machine. On the cloud plans, your own key removes the monthly email limit.

Do I have to run a server?

No. The hosted plans run MailRules for you, always on. Every account starts with a 14-day free trial, no card needed.

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.