diff --git a/cmdeploy/src/cmdeploy/__init__.py b/cmdeploy/src/cmdeploy/__init__.py index 419391e1..92750f3b 100644 --- a/cmdeploy/src/cmdeploy/__init__.py +++ b/cmdeploy/src/cmdeploy/__init__.py @@ -566,14 +566,9 @@ def deploy_chatmail(config_path: Path) -> None: restarted=mta_sts_need_restart, ) - systemd.service( - name="Start and enable Postfix", - service="postfix.service", - running=True, - enabled=True, - restarted=postfix_need_restart, - ) - + # Dovecot should be started before Postfix + # because it creates authentication socket + # required by Postfix. systemd.service( name="Start and enable Dovecot", service="dovecot.service", @@ -582,6 +577,14 @@ def deploy_chatmail(config_path: Path) -> None: restarted=dovecot_need_restart, ) + systemd.service( + name="Start and enable Postfix", + service="postfix.service", + running=True, + enabled=True, + restarted=postfix_need_restart, + ) + systemd.service( name="Start and enable nginx", service="nginx.service",