Skip to main content

Mail Rules

When you receive many emails daily, manual sorting is time-consuming and easy to overlook. DesireCore's mail rules system automatically performs specified actions on new emails based on conditions you define.

How Rules Work

Rule execution flow

Rules execute automatically during background sync—each time new emails arrive, the system matches them against rules in priority order.

Creating Rules

Setting Conditions

Each rule contains one or more conditions. A condition has three parts:

ComponentDescriptionExample
FieldWhich part of the email to matchSender, recipient, subject, body, has attachments
OperatorHow to matchContains, does not contain, equals, starts with, ends with, regex
ValueContent to matchnewsletter@example.com, [Notification]

Multiple conditions can be combined with a logic operator:

  • All match (AND) — Rule triggers only when all conditions are met
  • Any match (OR) — Rule triggers when any single condition is met

Setting Actions

When conditions are met, the following actions are available (multiple can be combined):

ActionDescription
Add labelApply a specified label to the email
Remove labelRemove a specified label from the email
Move to folderMove the email to a specified folder
Mark readAutomatically mark as read
Mark unreadMark as unread
StarAdd star/flag
ArchiveRemove from inbox without deleting
ForwardAutomatically forward to a specified address
DeleteMove to trash

Rule Examples

Auto-Classify Subscription Emails

Condition: Sender contains newsletter OR noreply

Action: Add label "Subscriptions", mark as read

Highlight VIP Client Emails

Condition: Sender equals vip@client.com

Action: Add label "VIP Client", star

Filter Notification Emails

Condition: Subject starts with [Notification] AND Sender contains system

Action: Move to "Notifications" folder, mark as read

Managing Rules

Rule Priority

Rules execute in priority order from highest to lowest. You can reorder rules to control execution sequence.

Stop on Match

Each rule has a stopOnMatch option:

  • Enabled — After this rule matches, no further rules are checked
  • Disabled — Even after matching, subsequent rules are still checked
When to Use "Stop on Match"

When you have a "catch-all" rule (e.g., "Label all uncategorized emails as Other"), ensure it has the lowest priority and that all preceding rules have "Stop on Match" enabled—otherwise every email gets labeled "Other."

Manual Rule Execution

In addition to automatic execution, you can manually apply a rule to existing emails. This is useful when you create a new rule and want to retroactively process historical emails.

Next Steps