diff --git a/imageroot/events/user-domain-changed/20configure_ldap b/imageroot/events/user-domain-changed/20configure_ldap index de6e27f0..ac03c6f1 100755 --- a/imageroot/events/user-domain-changed/20configure_ldap +++ b/imageroot/events/user-domain-changed/20configure_ldap @@ -15,7 +15,4 @@ event = json.load(sys.stdin) if event.get('domain') != os.getenv('POSTFIX_ORIGIN'): exit(0) -if 'node' in event and str(event['node']) != os.getenv('NODE_ID'): - exit(0) # ignore event if the source is not in our node - -agent.run_helper('systemctl', '--user', '-T', 'try-reload-or-restart', 'dovecot.service').check_returncode() +agent.run_helper('systemctl', '--user', '-T', 'try-reload-or-restart', 'dovecot.service', 'postfix.service').check_returncode() diff --git a/imageroot/systemd/user/postfix.service b/imageroot/systemd/user/postfix.service index 7a444329..cd805fb3 100644 --- a/imageroot/systemd/user/postfix.service +++ b/imageroot/systemd/user/postfix.service @@ -28,7 +28,8 @@ ExecStart=/usr/bin/podman run \ ${MAIL_POSTFIX_IMAGE} ExecStop=/usr/bin/podman stop --ignore --cidfile %t/postfix.ctr-id -t 60 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/postfix.ctr-id -ExecReload=runagent /usr/bin/podman exec --env=POSTFIX_* %N reload-config +ExecReload=runagent discover-services +ExecReload=runagent /usr/bin/podman exec --env-file=discovery.env --env=POSTFIX_* %N reload-config PIDFile=%t/postfix.pid Type=forking SyslogIdentifier=%N