email: outbound mail subsystem and RESETPASS

Adds a config-driven mailer: a SendEmail action the link layer pipes to
a configured command (sendmail -t, msmtp, ...) off-thread. NickServ
RESETPASS <account> emails a short-lived code to the address on file;
RESETPASS <account> <code> <newpassword> completes the reset. Codes are
node-local; the password change itself federates.
This commit is contained in:
Jean Chevronnet 2026-07-12 15:28:15 +00:00
parent 020e9bd576
commit a2957ffe02
No known key found for this signature in database
12 changed files with 205 additions and 10 deletions

View file

@ -9,6 +9,18 @@ pub struct Config {
pub gossip: Option<Gossip>,
#[serde(default)]
pub peer: Vec<Peer>,
// Outbound email (password resets). Absent = email features are off.
#[serde(default)]
pub email: Option<Email>,
}
#[derive(Debug, Deserialize, Clone)]
pub struct Email {
// Sender address stamped on outgoing mail.
pub from: String,
// A shell command the message is piped to on stdin, e.g. "sendmail -t" or
// "msmtp -t". Run via `sh -c`, so redirection and pipes work.
pub command: String,
}
#[derive(Debug, Deserialize, Clone)]