Skip to main content

Module rules

Module rules 

Source
Expand description

Mail filters: what a message shows, and what is then done to it on its server (docs/client.md, “Filters”).

A filter holds conditions, each a field, a test and a value (“From contains @bank.example”), all of them needed or one enough; and actions: into a folder, to the archive, to spam, flagged, read, to the trash, a keyword. One flat list serves every account, each filter on all of them or on some, in the configuration ([[mail.filter]]), shared with it. Filters run on what arrives unread in an inbox, on whichever device fetches it first (sioul-sync’s filters), and on the rest of the inbox when you ask. The Mail page’s search reads the same conditions (Condition::matches on a Message).

Text is compared as Sioul’s search compares it: case and accents aside (text::fold_char), each run of spaces one space. A sender nothing authenticates is read as nobody’s: a condition on who sent it holds for no such message, as a project’s route does not (docs/porch.md, “Trust”).

At the end, Virtual Secretary’s words (docs/virtual-secretary.md): the folder it moved a message to becomes a proposal here (FolderMapping).

Structs§

Choice
One choice the editor offers: its id and its words.
Condition
One condition: a field, a test, a value.
Facts
What a condition knows of a message beyond its card, given by whoever asks.
FieldForm
A field as the editor offers it: its tests, and what each asks for.
Filter
One filter: its conditions, what it does, on which accounts.
FolderMapping
Virtual Secretary, compatibility mode A: it keeps sorting on the server; the IMAP folder it moved a message to becomes a proposal here.
Form
Everything the filters’ editor offers, in your language.
Message
A message as conditions read it: its card and the facts beside it, each field folded once, when a condition first asks for it.
Person 🔒
One address of a message, folded.
Place
Where a message is and its marks, for the search’s own conditions (Field::Account, Field::Folder, Field::Mark): a filter has none.
Plan
What the filters do to one message, once added up: the first filter that moves it says where it goes; reads, flags and keywords add up.
TestForm

Enums§

Act
What a filter does to a message that matches, on its server.
Destination
Where a filter sends a message.
Field
What a condition reads of a message.
Join
Every condition, or one of them.
Proposed
What Virtual Secretary’s sorting proposes for a message.
Shelf
Test
How a condition compares its field with its value.
Value
What a condition’s value is, for the editor to ask it.

Constants§

DAYS
The days of the week as a condition names them, Monday first.
FILTERED
The keyword that says filters went through a message: set on its server before they act on it, so that another device fetching it too leaves it alone (sioul-sync’s filters).
KEPT 🔒
The characters of a card’s text kept beside it (card::EXCERPT_LIMIT): one shorter holds the whole text; one this long may be cut.
KINDS
The kinds of attachment a condition names.
MARKS
The marks a search’s condition names (Field::Mark): “is not read” is unread.
ROLES
The folders a search’s condition names by purpose (Field::Folder), whatever their name on each server; Gmail’s “All Mail” is its archive.
WHO
Who a sender may be to you, as a condition names it: “known” is anyone in your address books or on a list (safe, neutral or restricted). The blocked are not among them: their mail is set aside, and no filter touches it.

Functions§

addresses 🔒
The addresses of a header (To, Cc, Reply-To), their names decoded.
attachment_kind
The kind of an attached file, by its type, else by its name’s ending (KINDS; “other” for the rest).
day 🔒
A day as a condition writes it: “2026-10-01”.
days 🔒
Days of the week as a condition writes them (“sat,sun”): their places from Monday (0), in order.
facts_of
The facts beside a message the Porch judged: who its sender is to you, and whether anything proves it is them.
fold
Text as conditions compare it: case and accents aside, each run of spaces one space, trimmed.
folder_named
Whether a folder condition’s value (a purpose of ROLES, or a server’s own name) names a folder of role and name.
form
The editor’s words.
holds
Whether all conditions hold (Join::All), or one (Join::Any). None never holds.
is_on 🔒
joined 🔒
Words joined: “Saturday or Sunday”; “Monday, Tuesday or Friday”.
keyword
Whether name can be an IMAP keyword a filter adds (RFC 9051 §2.3.2, an atom): no space, no ( ) { % * " \ ], no control character; never a system flag, the spam keywords (the spam action sets those) nor Sioul’s own mark.
lenient
Reads the filters of the configuration one by one: one that does not read is left out, never the whole configuration with it.
on 🔒
plan
What filters do to message, which came to account: each filter that runs on that account and matches, in their order, until one that stops the rest.
plans
What filters do to each message the Porch judged, for its account; none for what it protects (untouched), nor where no filter matches.
said_size 🔒
A size in words: “5 MB”, “500 KB”, in your language’s units and decimals.
size
A size as a condition writes it, in bytes: “5 MB”, “500 KB”, “1.5 Go”; megabytes when it says no unit.
time 🔒
A time of day as a condition writes it: “18:00”, “8:30”.
untouched
Whether the Porch keeps a message from every filter: set aside (forged, blocked, a borrowed name, your provider’s spam), hostile, in your spam filter’s review queue (it moves or flags that mail itself), or a code you asked for, which must reach you where you look for it.
who_is 🔒