Before the mail.domain.tld issue came about, I had a Let's Encrypt certificates generated each time a virtual server was created.
I recall finding an article that showed how to modify the virtual server template code to add steps to auto-generate the certificate but I'm not sure where that article is. I no longer seem to have that functionality since updates (I guess).
Could you advise on how I can go about doing this using virtualmin?
I'd like it so that my virtual server template(s) autogenerate lets encrypt for domain.tld and www.domain.tld.
I need this because I offer my customers free certificates on all WordPress hosting plans so when they place an order, the server is created via WHM script, and the site needs to be HTTPS ready when they complete the installation.