Sortbay Inbox Triage Rules
Test inbox rules on real mail: which labels, assignee, status and due date each message gets.
How it works
Runs deterministic triage rules — conditions on sender, recipients, subject, text, attachment names or source, actions that add labels, assign, set a status or a due date — over e-mails from an .eml/.mbox file and explains for every message which rule matched and what it set. The same evaluator sorts new mail in the Sortbay shared inbox.
- A rule matches when all (match: all) or any (match: any) of its conditions hold. Comparisons ignore case and accents; there are no user regular expressions, so a rule can never hang the evaluator.
- Rules run in order. Labels of every matching rule are collected; assignee, status and due date come from the FIRST matching rule that sets them; a matching rule with stop ends the evaluation for that message.
- Due dates are the message date (UTC day) plus dueInDays; messages without a date use “today”. “text” means subject and body together; “to” covers To and Cc; domain_is also matches subdomains.
Sources
Part of Sortbay
-
Sortbay Shared team inbox & notifications
One inbox for your team’s mail, forms and mentions: assign, label, snooze and follow up.
How to use the Sortbay Inbox Triage Rules
Test inbox rules on real mail and see which labels, owner, status and due date every message would get, and which rule decided it.
What it is for
A shared inbox stays manageable when routine mail sorts itself: invoices go to accounts, login problems to the person on support duty, quote requests get a “Lead” label. Writing such rules is easy; trusting them is harder. This tool runs a list of rules over one message or a whole .mbox file and shows, per message, the labels, owner, status and due date it would get, plus a sentence explaining which rule did what. It also counts how many messages each rule matched, so you notice rules that never fire. The rules are the same ones Sortbay uses in its Rules tab.
Worked example
The first example runs four rules over four messages. The summary: 4 of 4 messages match at least one of 4 rules; 0 stay untouched.
- Maria Lopez's “Can't log in after the update” matches Login problems: label Bug, owner Alex, due 2026-12-01 — one day after the mail arrived.
- Her reply “Re: Can't log in after the update” matches Login problems too and also Thank-you replies (subject starts with “re:” and the text says thanks), so its status becomes done.
- The German invoice with a PDF matches Invoices to accounts because both conditions hold — an attachment ending in .pdf and one of the words “invoice, rechnung, receipt”: label Billing, owner Accounts, due 2026-12-15.
- Priya's “Quote for 40 seats?” gets Lead and status open; the rule has stop, so no later rule runs for it.
The second example runs the same rules over the invoice alone. Three warnings say that Login problems, Quote requests and Thank-you replies matched no message — exactly what you want to see before relying on a rule.
The third example routes by sender: a rule “from is from the domain shop.example” gives Priya's mail the label Customer, owner Sam and a due date two days later.
How to read the result
- Result per message shows the final values; “—” means no rule set that field.
- Why lists, per message, every matching rule and what it set.
- Messages matched per rule shows dead rules (0) and rules that catch too much.
- Labels of all matching rules add up. Owner, status and due date come from the first matching rule that sets them; rule order matters.
- Due dates count days from the message date. For mail without a date, Today is used.
Tips and common mistakes
- “contains any of” takes a comma-separated list:
log in, login, password. Each entry is a phrase, not a pattern. - Case and accents never matter: “Rechnung” matches “rechnung”, “cafe” matches “café”.
- “is from the domain” also matches subdomains, so
example.comcatchessupport.example.com. - Put narrow rules first and give them stop when later rules must not change the result.
- Rules are plain comparisons without regular expressions, so a rule can never hang on a long mail.
FAQ
Where do the rules come from?
Write the JSON list by hand (the examples show the format) or copy the rules list from a Sortbay inbox file saved with File → Save inbox file.
Does the tool change my mail?
No. It only reports what the rules would do. Sortbay applies the rules when you import mail into a shared inbox.
What happens to mail no rule matches?
It is counted as untouched and keeps its values: open, no owner, no labels.
Can a rule move mail in my mail program?
No. Sortbay is not connected to a mailbox; it only works on files you import.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://sortbaytriagerules.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://sortbaytriagerules.usefulweb.app/mcp· tool namesortbay_triage_rules
Example request
curl -s -X POST https://sortbaytriagerules.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{}'