mail.domain.tld ServerAlias

Hi, I recently had an issue with secure certificates and the mail.domain.tld subdomain for an account. When creating a LetsEncrypt cert for a domain the mail.domain.tld was not getting a correct certificate. I managed to fix this by adding the ServerAlias mail.${DOM} directive in Virtualmin / System Settings / Server Templates. The correct certificate then shows up for the mail subdomain.

Just for reference here are the threads that helped me solve that:

However this fix only worked by deleting the account/domain and then recreating it so that the new server directive were applied.

I now have a client who is having issues with their email due to the incorrect certificate showing, but I can't delete their account and recreate it because there is a very complex website associated with it.

Is there a way I can manually add the ServerAlias mail.${DOM} to an existing account/domain?

Many thanks


Virtualmin version: 
Webmin version: 


Yes, you could add it by directly editing the Apache configuration file /etc/httpd/conf/httpd.conf