Skip to content

feat: Add sd_notify support#2383

Open
provokateurin wants to merge 1 commit intostalwartlabs:mainfrom
provokateurin:feat/sd_notify
Open

feat: Add sd_notify support#2383
provokateurin wants to merge 1 commit intostalwartlabs:mainfrom
provokateurin:feat/sd_notify

Conversation

@provokateurin
Copy link

@provokateurin provokateurin commented Nov 7, 2025

Closes #283

Allows a systemd service to use Type=notify, so it's only considered ready once all the listeners are up.
Additionally I also added sd_notify Reloading support, so systemd knows when stalwart is reloading the config due to an API call to the management API.
See https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Options and https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html#Well-known%20assignments.

@CLAassistant
Copy link

CLAassistant commented Nov 7, 2025

CLA assistant check
All committers have signed the CLA.

@provokateurin
Copy link
Author

@mdecimus could you have a look at this? It's a pretty small but very useful feature.

@mdecimus
Copy link
Member

This needs to be gated as not everybody uses systemd or Linux. Also, see https://github.com/stalwartlabs/stalwart/blob/main/CONTRIBUTING.md as some contributions can't be accepted at this moment.

@provokateurin
Copy link
Author

Stalwart is currently not accepting external contributions, except for bug fixes and small, well-scoped changes

I would consider this change a very small and well-scoped change 🤔

IMO suppressing the errors functions well enough as gating, but I'll implement a proper check 👍

@provokateurin
Copy link
Author

Now a check for systemd support is in place.

@provokateurin
Copy link
Author

@mdecimus could you take another look?

@mdecimus
Copy link
Member

Sorry, this can't be merged now. I suggest to run your own custom build in the meantime.

@stappersg
Copy link
Contributor

image

@provokateurin please remove the cargo fmt artifact

@mdecimus please run cargo fmt on the code base

@stappersg stappersg mentioned this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[enhancement]: systemd notify support

4 participants