I have a ssl cirtificate for my base url, mydomain.com and also www.mydomain.com. Virtualmin automatically creates mail.mydomain.com for smtp, imap, pop, also mx records, I want to remove mail from it, and use mydomain.com as mail purpose, How i can do it easely with one click, is there any option. if nt kindly provide me detailed instruction.
Hmm, that should be possible, but it’d probably be a bit of a pain to do
I believe what you’d need to do is go into System Settings -> Server Templates -> Default -> BIND DNS Domain, and you’d have to manually specify all of the DNS records you wish for your domains to have, including the MX record, in the “BIND DNS records for new domains” section.
Is there a reason you want to do all that though?
It shouldn’t be a problem to use an SSL certificate for mydomain.com, even if the MX record points to mail.mydomain.com.
I want to use mydomain.com as mail purpose
Your mail users (pop/imap and smtp) can probably already do this.
If by this you refer to the MX record in the DNS zone, which is used by remote mail servers to deliver your mail, it probably doesn’t matter since both mail.domain and domain both point to the same IP; but that is a change you can make.
There are good reasons, though it’s not often a strict requirement, to have your MX record, your HELO/EHLO (virtualmin hostname), your PTR (DNS record assigning domain name to the IP), and your SSL certs all have the same full hostname; you just have to create them all with that intention since they are created in separate configurations.