Castellum.

Rules (automatic filing)

Settings > Rules · Castellum

A rule looks at mail and does something with it automatically: mark it read, star it, archive it, move it to a folder. Rules are in Settings > Rules.

Accounts must have writes enabled. A rule's actions change mail on the server. While an account is read-only, rules cannot change mail there, and Settings > Rules says so.

1. Add a rule

Click Add… and fill in the form.

  1. Name the rule.
  2. Apply to All accounts or one account.
  3. When: When mail arrives, and on demand (it runs after each sync, and you can also run it yourself) or On demand only (it runs only when you click Run Now).
  4. If: the conditions that select mail. This is the same editor as Smart Mailboxes: match all, any or none of your conditions.
  5. Then: the actions, added from the Add Action menu.

2. Actions

Actions that move the message run last. Each action is queued like one you do by hand, so it is logged, retried if it fails, and held while an account is read-only. Rules never touch Trash, Junk, Drafts or Sent.

3. Order and “stop”

Rules run in the order of the list, after each sync. Turn on Stop processing more rules for messages this rule matches and the mail it matched is taken away from the rules below it. Each rule also has an on/off switch (Enabled).

4. Preview first

In the rule form, click Preview Matches. Castellum shows how many current messages match and lists a few examples. It is a dry run: nothing is changed or queued.

5. Run Now

Select a rule and click Run Now to apply it to everything it currently matches. Castellum asks you to confirm first, then shows progress. Click Cancel to stop; later, Continue picks up where it stopped, while Run Now starts again from the first message.

6. Deleting a rule

Deleting a rule stops it running. Mail it already changed stays as it is; there is no undo for past changes.