Skip to content
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

Setting email for renewals #48

Closed
adamtg opened this issue Dec 13, 2017 · 6 comments
Closed

Setting email for renewals #48

adamtg opened this issue Dec 13, 2017 · 6 comments

Comments

@adamtg
Copy link

adamtg commented Dec 13, 2017

Is there a way to setup the email to get renewal messages?

thank you very much.

@shred
Copy link
Owner

shred commented Dec 13, 2017

There is no way to set renewal notifications.

You can read the expiry date of your certificate via X509Certificate.getNotAfter(), and renew the certificate a couple of days before expiry.

@shred shred closed this as completed Dec 13, 2017
@BryceStevenWilley
Copy link

Apologies for resurrecting a closed issue, but I've been looking into this recently. I'm assuming that you mean that acme4j has no way to set renewal notifications, but from what I understand, CA's like LetsEncrypt can and do send renewal notifications. And that using other ACME clients like certbot can get you those. I've been using acme4j for a few months, and the mailto: contact is attached to the account I'm using, but haven't received any emails from LetsEncrypt, and unfortunately it doesn't look like there's a way to test the notifications. I tried looking around for any differences between what certbot is doing with the supplied email and what acme4j is doing with it, but I couldn't tell, so I figured I might ask here.

@shred
Copy link
Owner

shred commented May 6, 2023

The ACME protocol itself does not provide means to set up renewal notifications via email. All you can do is adding contact addresses to your account, but the purpose is not specified any further.

Let's Encrypt says here that all you need to do is to give an email address at account registration, and they will automatically start to send you notifications 20 and 7 days before expiration.

I also had a look a the Boulder source code, and found an expiration-mailer tool there. It just uses the mailto: address that is connected to your account.

So all I can tell is that you should get the notification mails, unless you unsubscribed from them.

@shred
Copy link
Owner

shred commented May 6, 2023

I have just set an email address to my account via acme4j, and already got a renewal notification mail from Let's Encrypt a few hours later. So there's nothing more to do than to make sure that there is at least one valid mailto: address set in your account, and have at least one certificate that will expire in 20 days or less.

Have you checked the usual suspects (typo in email address, spam folder, etc)?

@BryceStevenWilley
Copy link

Thanks for confirming this! It did take me until now to confirm that I got a reply, and it looks like my issue was that I had been using an account key that didn't yet have any email in the mailto: address, and I had been incorrectly assuming that AccountBuilder::addEmail() would add an email to an existing account, and it didn't seem to do that. Instead, I needed to get the already logged in account and call account.modify().addEmail().commit();

Sorry for the late reply, and thanks for the assistance!

@shred
Copy link
Owner

shred commented Jul 19, 2023

Thank you for your feedback! Yes, AccountBuilder will only create new accounts, but won't modify existing accounts. account.modify() is the correct way to change the email addresses of existing accounts. I will point that out in the documentation.

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

No branches or pull requests

3 participants