Skip to main content

Module config

Module config 

Source
Expand description

TOML configuration from $RMUT_CONFIG or ~/.config/rmut/config.toml.

[identity]
name = "Jane Doe"
email = "jane@example.com"
reverse_name = false  # reply From = the address the mail came to

[[identities]]        # conditional identity (folder-/send-hook)
folder = "*work*"     # glob on the open mailbox, and/or:
recipient = "*@work.example.com"   # glob on a draft recipient
name = "Jane Work"
email = "jane@work.example.com"

[mail]
alternates = ["jane@old\\.example\\.com"]  # my other addresses
my_hdr = ["Organization: Acme"]        # on every draft
mailboxes = ["~/Maildir", "~/Maildir/.Sent"]
sent = "~/Maildir/.Sent"
postponed = "~/Maildir/.Drafts"
sendmail = "/usr/sbin/sendmail"
editor = "vim"
poll_seconds = 5
print = "lpr"

[index]
format = "%4C %Z %-6d %-15.15L (%?l?%4l&%4c?) %s"

[ui]
theme = "default"   # or "mono"

[colors]            # overrides: status_fg status_bg deleted flagged header
deleted = "red"

[keys.index]        # action = key, e.g. sync = "w", delete = "ctrl+d"
[keys.pager]

[[accounts]]        # remote account, opened as imap:name/FOLDER
name = "work"
user = "jane@example.com"
password_command = "pass show mail/work"   # or: password = "..."
imap_host = "imap.example.com"   # imap_port = 993, imap_tls = true
smtp_host = "smtp.example.com"   # smtp_port = 587, smtp_tls = true
sent_folder = "Sent"             # Fcc target via IMAP APPEND

[[folder_hooks]]      # mutt's folder-hook, any `:` command line
folder = "*work*"
command = "set index_format=\"%4C %Z %-6d %-20.20F %s\""

[[message_hooks]]     # applied while the message is selected
pattern = "~f boss@example.com"
command = "set pager_context=5"

[[reply_hooks]]       # applied while a reply to it is built
pattern = "~t @work.example.com"
command = "set from=jane@work.example.com"

[[fcc_hooks]]         # where the sent copy goes
pattern = "~t @work.example.com"
mailbox = "~/Maildir/.WorkSent"

[[crypt_hooks]]       # encrypt to this key for this recipient
address = "boss@example.com"
key = "0xDEADBEEF"

[pgp]
command = "gpg"              # runs via $PATH; passphrases come from
sign_key = "jane@example.com"  # the gpg agent, never from rmut
sign_by_default = false
encrypt_by_default = false

Structs§

Account
One remote account: IMAP for reading, SMTP for sending. The password comes from password_command (preferred) or, when you accept a secret sitting in the config file, a literal password.
ColorRule
One [[color_index]] rule (mutt’s color index FG BG PATTERN): index lines whose message matches pattern take these colors. First matching rule wins; rules are checked in config order.
Config
CryptHook
One [[crypt_hooks]] entry: encrypt to key for any recipient address matching address (a case-insensitive regex).
FccHook
One [[fcc_hooks]] entry: the mailbox a matching outgoing message’s copy goes to (a local maildir path).
FolderHook
One [[folder_hooks]] entry: mutt’s folder-hook. Like mutt, a folder-hook is not undone when you leave the mailbox, so a catch-all entry (folder = "*") is the way to put a setting back.
Gui
The window front end (rmut-egui). The terminal front end never reads these.
Identity
IdentityRule
One [[identities]] entry. With both globs set, both must match; with neither, it always applies. Unset name/email keep the value from the layer below.
Index
Keys
Mail
MessageHook
One [[message_hooks]] or [[reply_hooks]] entry: a message pattern and the enter-command line it runs.
Net
How long to wait on the network before saying so. A mail client that blocks has nothing to draw and no keys to read, so these are short by default: an unreachable server should cost seconds, not the OS default of about two minutes.
Pager
Pgp
PGP via gpg(1). Decrypt/verify happens automatically when a viewed message is PGP; signing and encrypting are chosen at the send prompt. Passphrases are gpg-agent’s business; rmut never sees them.
Sidebar
The optional left pane listing mail.mailboxes with new-mail counts (toggle with B at runtime).
Ui

Enums§

AuthKind
How an account authenticates, from its auth key.

Functions§

expand_folder
mutt’s +x / =x: a mailbox named under $folder. = or + alone is $folder itself; anything else, and any name at all when no folder is configured, comes back untouched. This runs on every mailbox rmut is handed, typed or configured, before anything tries to read it as a path or an imap: spec.
glob_match
Glob match: * spans anything, everything else is literal; case-insensitive, anchored at both ends.
let_commands_prompt
Lend the terminal to password_command / token_command (stdin and stderr passed through), or take it back.
load_default
Load the config; a missing file is fine (defaults), a broken file returns defaults plus a warning to show the user.
path