-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hooks do not run if mail delivery fails #100
Comments
I think the line Lines 40 to 41 in 0ba0a1f
The same behavior is used also by execScript and execScriptDir, woul you be in favor of changing it also there? |
When a notification fails, certspotter is supposed to terminate and write an error to stderr (which should be captured by the systemd journal). Are you saying that certspotter continues to run when sending an email fails? It might be reasonable to try all of the notification methods even if one fails. However, if any of them fail, I do believe certspotter needs to terminate. This allows the operator to correct the problem and restart certspotter, which will cause the failed notifications to be delivered. Continuing on failure means those notifications are essentially lost forever. |
And indeed it does, I noticed about the failure in the journal. Certspotter continued to try delivering the email.
Yes, I'd like that. If email sending fails, I'd like to get an alert anyway using a different channels
I see, indeed losing notifications forever is not desirable. Maybe attempting all notification channels and then returning an error could be a good compromise. One thing I do not understand is what you mean by 'terminate', even if notifications fail I see certspotter running and attempting to deliver the email but not terminating. What am I missing? |
Hello,
I'm using this systemd unit for certspotter:
I have a local mailserver which correctly deliver mails.
I defined a hook which correctly works
Whats happens
If certspotter encounters errors while delivering the mail such as the following
then hooks do not run.
If I solve the mail delivery issue, the hook fires correctly.
What I expected
Mail delivery fails, other hooks are fired
System details:
$ lsb_release -a LSB Version: n/a Distributor ID: Arch Description: Arch Linux Release: rolling Codename: n/a $ certspotter --version certspotter version v0.18.0? systemd version: 256.7-1
Side note
The issue delivering the email is caused probably by systemd, if I add the directive
ReadWritePaths=/var/spool/postfix/maildrop
and add the user to the maildrop group mail delivery works . I have yet to investigate if only the change to systemd is enough to let mail flow. Just adding the user to the group is not enough as maildrop fails with an error regarding the filesystem being readonly.The text was updated successfully, but these errors were encountered: