Editing rules
Besides the text, Sievesmith can show a script as a list of rules, similar to the rules in Apple Mail. Switch with Text | Rules in the editor’s toolbar; the choice is remembered per script on this device. Both views edit the same script and the same draft, and Undo works across both.
The list of rules
Section headings come from separator comments in the script, for example a line of ##### with a title line below
it. Each rule shows:
- its number,
- its name: the comment line directly above the rule, or “Untitled Rule” if there is none,
- a one-line summary, e.g. “Header List-Id contains swift.org → File into Lists/Swift, Stop”,
- an Active switch. Turning a rule off comments it out with
#on each line; turning it on removes them again. Rules that are commented out appear greyed out.
The bar above the list shows the number of rules (Rules: n) and has Expand All / Collapse All, Move Rule Up / Move Rule Down (⌘↑ / ⌘↓ for the selected rule) and Add Rule. You can also drag rules to a new position.
Editing a rule
Expand a rule to edit it. At the top is its Name field. Below come, for each branch of the rule (If, Otherwise, if, Otherwise), its conditions and then its actions. Rules nested in a rule appear indented.



Conditions
For a list of conditions, choose All conditions are met or Any condition is met. Each condition is a row of field, comparison and value:
- Fields: Subject, From, To, Header, Address in, Envelope Sender, Envelope Recipient, Size, Body, Header exists, Variable, Always and Never.
- For addresses, choose the part: Whole Address, Local Part, Domain, User or Detail.
- Comparisons: is, contains and matches; for Size: is larger than and is smaller than.
⊖ removes a condition, Add Condition adds one.
Actions
After then: come the actions: File into (with Keep a Copy and Create Folder), Redirect to (with Keep a Copy), Keep, Discard, Stop, Add / Set / Remove Flags, Reply and Set Variable. ⊖ removes an action, Add Action adds one.
Values
Separate several values with a comma and a space (", “). A value takes effect when you press Return or when the field loses focus. On iPhone the fields of a row are stacked.
What changes in the script
An edit changes only the affected text; comments and formatting elsewhere in the script stay as they are. The
require lines the script needs are added and removed automatically, in the script’s style: a script with one
require per extension keeps it that way.
Anything the form cannot show stays in the list as an editable text block; Apply applies your changes to it.
Without a subscription you can edit rules as a local draft; uploading them needs Sievesmith Pro.