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: https://www.virtualmin.com/node/70814 https://www.virtualmin.com/comment/807816#comment-807816

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

Lachlan

Status: 
Active
Virtualmin version: 
6.14
Webmin version: 
1.973

Comments

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