Commit Diff
Diff:
357efc9b89710a1ed6f4544aae54ff9761c57971
1f1dc31d2ab8e43114689286014bbe8643c7cc91
Commit:
1f1dc31d2ab8e43114689286014bbe8643c7cc91
Tree:
459b9050897f7d9ea2db82fb70e3bc2513d0cef1
Author:
jrmu <jrmu@ircnow.org>
Committer:
jrmu <jrmu@ircnow.org>
Date:
Tue Mar 7 15:28:17 2023 UTC
Message:
Avoid restarting the mail server
blob - 81631a1683bc2333835448ed59facc6cd8d9e20a
blob + 5d9e1a20ce8d5bf6224587594e921d545d03c935
--- Mail.pm
+++ Mail.pm
@@ -242,7 +242,9 @@ sub createmail {
`doas sh -c 'echo $line >> $passwdpath'`;
`doas sh -c 'echo $line2 >> $virtualspath'`;
`doas sh -c 'echo $line3 >> $senderspath'`;
- `doas rcctl restart smtpd`;
+ `doas smtpctl update table passwd`;
+ `doas smtpctl update table virtuals`;
+ `doas smtpctl update table users`;
`doas rcctl reload dovecot`;
}
@@ -267,7 +269,9 @@ sub deletemail {
main::writefile("$senderspath.bak", join("\n", @senders)."\n");
copy "${senderspath}.bak", $senderspath;
- `doas rcctl restart smtpd`;
+ `doas smtpctl update table passwd`;
+ `doas smtpctl update table virtuals`;
+ `doas smtpctl update table users`;
`doas rcctl reload dovecot`;
}
1; # MUST BE LAST STATEMENT IN FILE
IRCNow