postfix: restart automatically on failure

This commit is contained in:
missytake
2025-12-10 09:55:20 +01:00
committed by holger krekel
parent e7bed4d2a1
commit 8c8c37c822

View File

@@ -60,6 +60,13 @@ class PostfixDeployer(Deployer):
mode="644",
)
need_restart |= login_map.changed
restart_conf = files.put(
name="postfix: restart automatically on failure",
src=get_resource("service/10_restart.conf"),
dest="/etc/systemd/system/dovecot.service.d/10_restart.conf",
)
self.daemon_reload = restart_conf.changed
self.need_restart = need_restart
def activate(self):
@@ -73,5 +80,6 @@ class PostfixDeployer(Deployer):
running=False if self.disable_mail else True,
enabled=False if self.disable_mail else True,
restarted=restart,
daemon_reload=self.daemon_reload,
)
self.need_restart = False