Skip to content

Commit

Permalink
fix(event): update postfix service handling to include reload on user…
Browse files Browse the repository at this point in the history
…-domain-changed
  • Loading branch information
stephdl committed Nov 21, 2024
1 parent 06bea83 commit 1303d17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions imageroot/events/user-domain-changed/20configure_ldap
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ if event.get('domain') != os.getenv('POSTFIX_ORIGIN'):
if 'node_id' in event and str(event['node_id']) != 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()
# FIX ME: postfix needs to be restarted, reload is not enough
agent.run_helper('systemctl', '--user', '-T', 'try-restart', 'postfix.service').check_returncode()
agent.run_helper('systemctl', '--user', '-T', 'try-reload-or-restart', 'dovecot.service', 'postfix.service').check_returncode()
1 change: 1 addition & 0 deletions imageroot/systemd/user/postfix.service
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ 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 discover-services
ExecReload=runagent /usr/bin/podman exec --env-file=discovery.env --env=POSTFIX_* %N reload-config
PIDFile=%t/postfix.pid
Type=forking
Expand Down

0 comments on commit 1303d17

Please sign in to comment.