Skip to content
Sortmailsortmail
Help · Sorting

Writing a rule by hand

Updated 12 September 2026 · 3 min read

Corrections write rules for you. Sometimes you want to write one before the mail arrives.

What you can match on

  • Sender is — an exact address.
  • Sender domain is — everything from a company.
  • Subject contains — a phrase in the subject line.
  • Body contains — a phrase in the body. It only matches when reading message text is on for the mailbox; it is evaluated in memory at sort time, and the phrase you typed is stored, the body never is.
  • Has attachment.

How conflicts resolve

Rules are ordered, and the first one that matches wins. Rules made by your corrections come before rules you wrote by hand. Nothing is averaged and nothing is combined, and the message page shows which rule decided.

Rules always beat the model. If a rule matches, no model is called at all.

Unicode and lookalike domains

Domains are normalised to punycode before matching, so a rule for a domain cannot be evaded by a visually identical character from another alphabet.