MailRules vs Sieve filters
Sieve is the standard filtering language that Fastmail, Proton Mail and many self-run servers use under their rules screens. It runs at delivery and matches exact text. MailRules works alongside it over IMAP and handles the rules that are about meaning, not wording.
| MailRules | Sieve filters | |
|---|---|---|
| Where it runs | A separate process that connects to your mailbox over IMAP and files new mail seconds after it lands, using IMAP IDLE. | Inside the mail server, while each message is delivered to your mailbox. |
| How rules are written | Type or dictate a sentence. MailRules splits a paragraph into rules, flags overlaps and asks when something is unclear. | A script of tests and actions, such as if address :is "from" … { fileinto … }. Most hosts also offer a form that writes the script for you. |
| What it can match | Intent, such as "recruiters I haven't replied to", or exact conditions on sender, domain, recipient, subject, body text, any header, attachments, size or age. Mix both in one rule. | Addresses, headers, size and, with extensions, body text, dates and more. Matches are exact, contains, wildcard or limited regular expressions. |
| What a rule can do | Move, archive, trash, mark as junk, flag, mark read or unread, or keep. | File into a folder, keep, discard, redirect, and with extensions set flags, reject, send vacation replies and more, depending on the host. |
| Mail already in your inbox | Rules sort new mail. Cleanup sorts the mail already in a folder, and a rule shows how many recent emails it would have matched before you save it. | Scripts run during delivery, so they act on new mail as it arrives. |
| Mistakes | Each action has a one-line reason and can be undone for 30 days. Trash goes to a MailRules Trash folder first, and nothing is permanently deleted. | Proton warns that unsupported regular expression shorthand can make filters fail silently. A discard in a script deletes the message. |
| Price | Self-hosting is free; you pay your model provider. Hosted cloud is coming: Personal $5 a month, Pro $10 a month, Team $8 per seat. | Included with hosts that support it, such as Fastmail and Proton Mail, or free on your own server with Dovecot Pigeonhole. |
Delivery-time scripts, exact matches
Sieve was designed, in the words of its RFC, to be “powerful enough to be useful but limited” so that it could run safely on a server. Scripts run as each message is delivered. Fastmail’s own help calls it difficult to use and suited to people with a high technical ability, and points most users to its rules screen instead. Proton describes it the same way. What every script has in common is that it matches text you can predict.
When the wording changes
A shop sends receipts, shipping updates and sales from one address with different subjects every week. A recruiter writes from a new domain each time. Sieve needs a test for every variation. In MailRules you write “receipts, but not shipping updates” once. It checks senders you’ve corrected and exact conditions first, then asks a small decision model. A larger model is asked only when that one is unsure, and anything still unclear waits in Needs review.
Running both
MailRules doesn’t replace your server’s filtering; it works after it. Leave your mailing-list and spam scripts in Sieve. Point MailRules at the same mailbox, start in dry-run mode, and watch what it would move before you let it act.
When Sieve filters is the better pick
Keep Sieve for anything you can describe exactly: a mailing list header, a sender address, a size limit. It runs on the server before any app sees the message, it needs no model, and it can do things MailRules can't, such as reject mail, redirect it or send vacation replies. Many people will want both: Sieve for the exact cases, MailRules for the rest.
Questions
Do I have to give up my Sieve script to use MailRules?
No. Sieve runs while mail is delivered. MailRules sees the result over IMAP and sorts whatever is still in your inbox. Keep the exact rules where they are.
Can MailRules write Sieve for me?
No. MailRules keeps its own rules and acts over IMAP. It doesn't create or change Sieve scripts on your server.
Why not just write a better Sieve script?
For exact matches, you should. Sieve can't tell an order confirmation from a marketing email from the same shop unless the wording gives it away. MailRules can, and it leaves the email in your inbox when it isn't sure.
Does MailRules work with Fastmail?
It works with Fastmail and any other IMAP mailbox that accepts an app password.
Is my mail sent to an AI model?
Only when a model is needed, and then only the sender, subject and the first 2,000 characters of plain text. With Ollama, nothing leaves your machine.