#1000389 certbot: Renewal failures are not reported to the administrator under systemd

#1000389#5
Date:
2021-11-22 12:21:47 UTC
From:
To:
Dear Maintainer,

on systemd-based systems, certificate renewal is run via combination
of systemd timer and service. When the service fails, the systemd
service is marked as failed, but the administrator is not notified
about that. I'd appreciate if the administrator is notified via email
in the same way as with cron.

I'm not sure what is the best way to implement this. The systemd-cron
package provides cron-failure@.service and the services generated by
that package contain "OnFailure=cron-failure@%i.service". Perhaps,
something like this should be implemented even in the certbot package.

#1000389#10
Date:
2025-05-17 07:52:34 UTC
From:
To:
Hi Michal,

this is not specific to certbot, there are several tutorials out there when you
want to get a mail when a systemd service fails:

https://blog.jlcarveth.dev/systemd-sendgrid.md
https://www.baeldung.com/linux/systemd-service-fail-notification

Hope that helps,
Lee