Expand description
An account’s folders, and what you do to its messages.
Sioul writes to the server only when you act: a flag with UID STORE, a
move with UID MOVE (RFC 6851), else a copy, a deletion flag and UID EXPUNGE (RFC 4315). The local copy follows: a flag renames its file; a
moved message leaves this folder, and the next sync brings it into the other.
Changes made elsewhere (read on the phone, deleted in the webmail) come back
at each sync (reconcile).
Structs§
- Saved 🔒
Enums§
- Action
- What you do to a message.
Constants§
- NOT_
EMPTY - The folder still holds messages: said by the window in your language.
- SET 🔒
- UIDs per command, at most: a long set stays well under the line servers take.
Functions§
- act
- Does
actionto the message stored atfile, on the server, then here. What it says of the message, junk or not, goes into this device’s label log (spam::labels) once the server has taken it; what your own filter moved, into this device’s log of its moves. - act_in 🔒
- act_
many - The same act on several messages of one account, in one connection: a
UID set per folder (RFC 9051 §6.4.9).
filesare kept here;remoteare seen on the server only (a search’s), by their folder’s server name. For acts that say nothing of spam (reading, flags, moves, archiving, the trash); the others go one at a time throughact, for the spam filter’s logs. The local copies follow as withact. A folder that fails is said (the first problem), the others are still done. - act_set 🔒
actionon the messages ofuid, a UID or a set of them (“4,7:9”), infolder, whose UIDVALIDITY must still bevalidity.- append_
then_ 🔒remove - Copies
rawintofolderofto, its flags kept (Maildir letters), and only once that server has it takes the original offsourceoffrom. - create_
folder - Makes a folder on the server (RFC 9051 §6.3.4), then lists them again. The name you typed goes in modified UTF-7, as servers read folder names (“Reçus” is “Re&AOc-us”, RFC 3501 §5.1.3), the way they are listed back.
- delete_
folder - Takes a folder off the server (RFC 9051 §6.3.5): only an empty one, and never one with a purpose (the inbox, Sent, Drafts, the trash, junk, the archive), so no message is ever lost this way.
- device 🔒
- This device’s name in the sharing (a UUID made once,
share::Here): its label log and its logs of what the filter moved or flagged are its own files. - expunge 🔒
- Removes a message marked deleted. Without UIDPLUS, a plain EXPUNGE could also remove other messages marked deleted by another client: the mark is left, and most clients hide such messages.
- fetched 🔒
- Whether a folder is fetched: everything but views of other folders, except where “All Mail” is the only archive there is (Gmail): it is fetched then, and shown as the archive, without what the inbox and Sent already show. Folders you chose not to keep stay on the server; the inbox is always kept. A folder whose name would make it the Maildir itself or the folder above (“INBOX.” or “INBOX..” with “.” between levels) is not fetched.
- flagged
- Writes into this device’s log of what your own filter flagged where it
is (
spam::labels::Flagged) the message stored atfile, judgedclass, as it arrived: nothing changes on the server nor here. The training learns from it as it is until you say otherwise: a probable spam as spam, a maybe spam not at all. - folder_
of - The folder a stored message belongs to, from where its file is.
- folders
- The account’s folders as last listed: the inbox alone before the first sync.
- folders_
path 🔒 - forget_
folder - A folder no longer kept here: its copy goes (the server keeps it all), and where its sync stopped is forgotten, so keeping it again brings it back whole.
- kept_
with 🔒 - What becomes of the local copy once the server took
actionon it in a folder ofrole: its letters now, or none when it left this folder (the next sync brings the copy into the other). Said not spam, it keeps its keyword here as on the server; said spam in a Junk folder, it stays there. - label
- Writes into the spam filter’s label log what you said of the message
stored at
file, without acting on it there: a sender blocked from it. - list
- The folders the server lists, with what each is for. Gmail’s “All Mail”, “Starred” and “Important” are views of the same messages: the first is kept to archive into, the other two are left out (RFC 6154, RFC 8457).
- local_
files 🔒 - The stored messages of a Maildir folder, with where each sits on the server.
- move_
across - Moves the message stored at
fileintofolderof another account: a copy is appended there, its flags kept, and only once that server has it is the original taken off the first one. Nothing is lost on the way: if the copy fails, the original stays; if removing the original fails, both remain. - move_
across_ from_ server - The same for a message seen on its server only (a search’s): read whole from its folder first, its flags with it, then copied and taken off.
- move_to 🔒
- own_dir 🔒
- A folder’s own directory in the account’s Maildir: one name in it, never the Maildir itself nor what is above it, whatever the server named the folder.
- ranges 🔒
- “1:5,7,9:12”: a UID set as short as it gets.
- read_
whole 🔒 - A message of
folder, whole, with its flags as Maildir letters. - reconcile 🔒
- Brings back what changed on the server since the last sync, for the
messages kept here: their flags, and those deleted or moved elsewhere,
whose local copies go. The folder must be open (
EXAMINEorSELECT). - remove_
in 🔒 - Takes a message off its folder for good: marked deleted, then expunged.
- role_
folder 🔒 - The server name of the folder for
role; made, withname, when the server has none. - said 🔒
- What an act says of a message, for the label log: none for those that say nothing of spam, nor for your own filter’s move (its own log’s).
- save 🔒
- Keeps the list for the window and for actions, which need to know where the trash is.
- sorted 🔒
- store 🔒