Virtualmin does not copy updated CERT to other services after renewal

SYSTEM INFORMATION
OS type and version Rocky 9.8
Webmin version 2.651
Virtualmin version 8.1.0 Pro
Webserver version Apache 2.4.62
Related packages SUGGESTED

Every time the Lets Encrypt certificate is renewed it is not copied to other services like Postfix. When browsing the website the cert is valid but when trying to send email I get an error because the certificate has expired. I have to manually go into Virtualmin, remove the cert and then apply it again to get everything working again. This happens with every renewal. I have seen posts from 2023 so I guess this has not been solved yet. Any pointers to make sure this happens automatically?

The times I’ve seen this it was because the problem certs had, at some point, been managed directly with certbot. Virtualmin already automatically copies certs to wherever they’re needed, but using certbot directly confuses it. I don’t remember details…but, the solution is to not do that.

Disable SSL for the domain, remove all the certs, remove any certbot configuration for those certs, and then re-enable SSL in Virtualmin. Hopefully that cleans up the mismatched paths.

We should handle this more gracefully, but it’s kinda complicated, and we have to deal with quite a lot of variety in how it works on various distros.

I can confidently say that we have never used certbot on this server. All SSL certificates are handled directly from Virtualmin for all domains.