How does one renew a certbot certificate on Ubuntu 20.04 that has expired but certbot renew says isn't due for renewal.
A dry run returns:
Congratulations, all renewals succeeded. The following certs have been renewed: /etc/letsencrypt/live/mail.hydrogenscoop.com/fullchain.pem (success)
** DRY RUN: simulating 'certbot renew' close to cert expiry
** (The test certificates above have not been saved.)
no renewal failures
But when a certbot -v renew command is issued the return is:
The following certs are not due for renewal yet:
/etc/letsencrypt/live/mail.hydrogenscoop.com/fullchain.pem expires on 2021-10-30 (skipped)
No renewals were attempted.
No hooks were run.
Thanks for your response.
I cannot access Roundmail anymore( it warned me prior to the certificate expiring) and Thunderbird mail likewise warned that the certificate had expired.
For now then, @greatl-lancer will likely want to use the --force-renewal parameter along with a --deploy-hook "nginx -s reload" or possibly -i nginx (but be careful with that one if you've modified your port 443 server block).
If certbot says renewal is not necessary and services are still using an older, expired certificate, this is probably due to incorrect installation of the certificate into those services or the relevant services need to be reloaded to make use of the newly renewed certificate.
If certbot says renewal is not yet due, forcing a renewal will do NOTHING except adding load to the Let's Encrypt servers.
The main point from @griffin s post you're quoting is adding a nginx reload command. But we're not even sure if that's applicable to your situation (yet).
Maybe in the end you should use the force renewal option once but that's only necessary to store the other options provided on the command line and it should NOT be used to renew a certificate unnecessarily if that's the sole purpose.
OK, perhaps you can point me in the direction i.e. a research topic that adresses this particular error. I have tried restarting the nginx as suggested by one post. The dry run renew came back with: Dry run: skipping deploy hook command: systemctl reload nginx
Skipping renewal deployer in dry-run mode.
That reload command should have been run (and probably did run) when you previously renewed on August 8.
It depends on how your nginx is configured if that actually was useful or not. The same goes for your Dovecot and Postfix. If you could show us the relevant configuration files, that would be most helpful.
Ah yes, good attempt though! There is a feature request for a --dry-run-and-save option, so you can actually save stuff like those reload commands without actually renewing the certificate. Unfortunately, that new option is not implemented yet.
Currently your ngix/Postfix/Dovecot is down, correct?
I'm currently getting "Connection refused" errors when trying to connect to your nginx/Dovecot/Postfix. That's why I'm thinking the services are down.
The certificate configuration in Dovecot is by using the ssl_cert and ssl_key options, in Postfix it's by using the smtpd_tls_cert_file and smtpd_tls_key_file options and in nginx it's with the ssl_certificate and ssl_certificate_key options.
Those should point to /etc/letsencrypt/live/mail.hydrogenscoop.com/fullchain.pem and /etc/letsencrypt/live/mail.hydrogenscoop.com/privkey.pem respectively.
I am puzzled...... My email accounts were working 100% and I don't understand why the pointers from Dovecot, Nginx and Postfix would/could/should be affected by the certificate expiration.
Did I misunderstand the use of point in your post ?
Those should point to /etc/letsencrypt/live/mail.hydrogenscoop.com/fullchain.pem and /etc/letsencrypt/live/mail.hydrogenscoop.com/privkey.pem respectively.
I have just requested a friend to verify that my mail server is still running by sending an email to my address. I reason that if it gets through that the services are running correctly, and that the only problem is with how they interact with cerbot and it's funtioning. As I was typing, (not my first languige) the email arrived.
Maybe a dynamic firewall (fail2ban?) has banned me from your server. In any case that unfortunately also means I can't debug it remotely, so I'm not really able to help you further from my end. Maybe someone else who hasn't been banned can help you.
Thank you for your time sofar and verifying that my system is reasonably secure. It seems a reinstall or a force renew is needed as there was no deploy-hook = systemctl reload nginx , or a cron job to reload nnginx after an update. A force reload seems to be the least drastic possible remedy at this point in time.