Expand description
Mail folders: what each is for, its name as you read it, and where it is kept on disk.
Servers say what a folder is for with special-use attributes (RFC 6154:
\Sent, \Drafts, \Junk, \Trash, \Archive, \All); when they do
not, the usual names tell it. Names travel in modified UTF-7 (RFC 3501
§5.1.3). Each folder is a Maildir++ subfolder of the account’s Maildir, the
inbox being the Maildir itself, as Dovecot lays them out: “INBOX.Sent” and
“Sent” both become .Sent.
Structs§
- Folder
- One folder of an account.
Enums§
Constants§
- BASE64 🔒
Functions§
- decode_
base64_ 🔒utf16 - decode_
utf7 - Modified UTF-7 (RFC 3501 §5.1.3):
&opens base64 of UTF-16BE, with,for/, until-;&-is&. Anything malformed is kept as it came. - display_
name 🔒 INBOX.Sent→Sent,[Gmail]/Sent Mail→[Gmail]/Sent Mail,Re&AOc-us→Reçus.- encode_
base64 🔒 - encode_
utf7 - Encodes a name for the server, the reverse of
decode_utf7. - folder
- A folder from what the server lists.
- local_
dir 🔒 - The Maildir++ directory: a dot, then the levels joined by dots. Characters
that a level’s name cannot hold on disk, on any system, are written
%XX. An empty level (“INBOX.”, “a//b”, “/” where “/” separates levels) is written%00: joined as it is, it could make “.” or “..”, the account’s Maildir or the folder of every account’s, which removing this folder’s copy would delete. - preferred
- The folder for a role when several have it (“Junk” and “spam” on cPanel hosts): the one the server marks, else the first.
- role_in
- What a folder is for: the server’s word first, else its name among the
names providers give their folders when they do not say what for
(
words::FolderWords), capitals and accents aside. - role_of
- What a folder is for: the server’s word first, else its name, as the
words in use name folders (
words::current: the configuration’s). - saved
- An account’s folders as its server last listed them; none before its first sync.
- saved_
path - Where an account’s folders, as its server last listed them, are kept:
$XDG_STATE_HOME/sioul/sync/<account>.folders.toml(sioul-sync writes it at each sync).