Is ServerAlias mail.domain.com needed?

I’ve noticed that on creation of a new virtual server Virtualmin is creating a record for ServerAlias mail.domain.com (in httpd.conf) - is there a reason for this? We don’t need webmail and I’m pretty sure this has never happened on older installs of Virtualmin.

If it’s not needed, where do we switch it off so that it is not created for new virtual servers?

Virtualmin > Server templates.
Then from drop down > website for domain

If it’s there, there is a reason. :wink:

1 Like

It’s in the Directives and settings for new websites but why? (We don’t use webmail so is it needed for anything else?)

Just checked and it’s not in an older version of Virtualmin…

Anyone know why it’s needed?

Obviously, if you aren’t hosting mail, you don’t need it. But, if you are hosting mail, and if you have recent enough versions of everything, most mail services would use it for sending and receiving.

1 Like

Thanks Joe.

I don’t use webmail but do use pop/smtp.

What’s the best way to add this to imported virtual servers that don’t already have it? (Just edit httpd.conf?)

I think he is only referring to the http config on this, not a dns alias.

1 Like

Yes, but you need to validate an TLS cert if you want to use it for any mail operation that needs a cert, and you can only validate mail.domain.tld if there’s a website for it, or if Virtualmin is managing DNS.

2 Likes

The last two posts above clarify and answer this question - if you don’t need webmail but you do want an ssl cert for sending mail, then mail.domain.tld will be required to set up things like letsencrypt as letsencrypt needs to resolve that domain/sub-domain in order to issue a cert.

Only other question remaining is:

Should we just edit httpd.conf? Or is there some setting in Virtualmin that will do it for us?

Sure, that’d be fine. I don’t think Virtualmin will setup the virtual domain stuff in mail automatically though…so it wouldn’t actually do anything with the cert. I’m not sure how one should make it do all that for an old domain from before those features were available in the various services and in Virtualmin.

Moved this reply to the other thread as it seems a better fit for those questions:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.