Add support for LE expiration notification e-mails on API cert #227
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR adds support for setting an e-mail address in the config file that Let's Encrypt can use to send notification e-mails if the API's certificate is expiring soon. When an account at LE is registered and an e-mail address is provided, LE will use this address for this purpose:
https://letsencrypt.org/docs/expiration-emails/
This is a helpful, optional service that LE offers for free, and the e-mails can be useful for an admin to be alerted to potential certificate renewal issues that might otherwise go unnoticed.
The new config option
notification_email
is an empty string by default, preserving the previous behavior of not registering any address with LE upon account creation. If the user fills in an e-mail address, this value will be used during account creation with LE.The value of
notification_email
is passed through to CertMagic and leverages their existing support for this feature.Example:
Where the config file includes these entries:
This patch yields the following results: