commit 1f1dc31d2ab8e43114689286014bbe8643c7cc91 from: jrmu date: Tue Mar 07 15:28:17 2023 UTC Avoid restarting the mail server commit - 357efc9b89710a1ed6f4544aae54ff9761c57971 commit + 1f1dc31d2ab8e43114689286014bbe8643c7cc91 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