Custom Email Rules Guide
Last updated
Built-in categories cover common cases, but your inbox has its own ecosystem of chaos. Custom rules let you describe in plain English what you want to happen, and the AI evaluates whether it applies. Write rules conversationally. No special syntax, no query language, no regular expressions required.
Examples of things that work as custom rules:
- Archive any appointment reminders from my dentist.
- Trash emails with "URGENT" in the subject from senders I don't recognize.
- Move invoices to the Finance folder.
- Archive all GitHub pull request review notifications.

How do you create a custom rule?
- 1Open the Rules tab and click + Add Rule.
- 2Describe the mail the rule is for, for example: Anything sent from mattsenter.com that has a subject mentioning StockCar.
- 3Pick an action: Archive, Trash, Move, Quarantine, or Label. Move asks for a folder name and Label asks for a label name. Label is only offered when a connected account supports labels, so it is hidden if you only use iCloud.
- 4Set the filter strength slider and choose whether matching messages are marked as read.
- 5Click Add Rule. The rule is saved and applies to new mail right away.
You can also start a rule from a real message. Open its entry in the Activity tab and choose to create a custom rule from that email, or drop the message into the Dropzone.
The sentence says which mail the rule is for. The action buttons decide what happens to it. Writing "to the Finance folder" does not pick a folder by itself, so choose Move and type Finance in the folder field.
What does the AI read when it checks a rule?
The whole message, not just the envelope. Premail sends the model the sender, subject, recipients, any mailing-list ID, attachment names, and the message body, along with a few signals Premail computes itself, such as whether the message has an unsubscribe link. Very long bodies are trimmed first, and local models see a shorter excerpt to keep them fast.
That means a rule can describe what a message says, not only who sent it. "Archive emails offering to buy a domain I own" works even when every sender is different.
Sender rules are strict. When a rule names a sender or domain, only the From or Sender header counts. A signature, footer, or link inside the body that mentions the same domain does not make the rule match.
Which simple rules skip the AI entirely?
A rule with a single condition, and no "or" in it, is often checked directly without a model call. A hit counts as a confident match, and a miss rules the rule out before the AI is asked. Phrasings Premail recognizes include:
- "from example.com"
- "sent to you@example.com"
- "subject contains 'invoice'"
- "body contains 'order number'"
- "has an unsubscribe link" or "is a mailing list"
These rules are fast, predictable, and cost nothing in AI usage, so use this wording whenever a simple condition is all you need.
Which rule wins when several could match?
Custom rules are checked before the built-in categories. The AI looks at all of your enabled custom rules and picks the single best match. If its confidence meets that rule's filter strength, the rule's action is applied and the built-in categories are skipped for that message. If it falls short, the message goes on to the built-in categories as usual.
If the AI finds no match, rules with a specific sender or domain constraint are checked in the order they appear in the Rules tab.
Why didn't my custom rule fire?
- The sender is allowed or blocked. Allowed senders skip every rule, and blocked senders are trashed before rules run. See Allowed Senders.
- The match was too weak. The AI matched, but below the rule's filter strength. Move the slider toward a stronger filter, or make the description more concrete. The rule trace shows the confidence it returned.
- The account is in Learning mode. Premail records what it would do without touching the message. See Setup & Learning Mode.
- The rule is switched off. If a Pro license ends, rules beyond the free limit are switched off. They are switched back on when you upgrade again.
To test a change without waiting for new mail, drop a saved copy of the message into the Dropzone and check the result.
Still have questions?
Contact Support (for Pro members)