mailman: trigger postfix reload when caddy renews
TLS Let's Encrypt certificates
This commit is contained in:
parent
d8f608db54
commit
664a0bd5b9
|
@ -29,6 +29,23 @@ in {
|
||||||
hostname = "list.pub.solar";
|
hostname = "list.pub.solar";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.paths.watcher-caddy-ssl-file = {
|
||||||
|
description = "Watches for changes in caddy's TLS cert file (after renewals) to reload postfix";
|
||||||
|
pathConfig = {
|
||||||
|
PathChanged = "/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/list.pub.solar/list.pub.solar.crt";
|
||||||
|
Unit = "postfix-reload.service";
|
||||||
|
};
|
||||||
|
partOf = ["postfix.service"];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services."postfix-reload" = {
|
||||||
|
description = "Reloads postfix config";
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
script = ''
|
||||||
|
${pkgs.systemd}/bin/systemctl reload postfix
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
services.mailman = {
|
services.mailman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# We use caddy instead of nginx
|
# We use caddy instead of nginx
|
||||||
|
|
Loading…
Reference in a new issue