I’m going to be blunt. This is a really poor post. I understand that these are legitimate questions, but your grammar and organization is so horrible to the point we can’t understand what you’re saying.
Firstly, who is hosting your DNS server? Your registrar? Mail-in-a-Box?
Certificates and DNS records are two separate things. You can have one without the other, they do not technically depend on each other.
Maybe you are talking about the certificate not matching the domain and the web browser is complaining?
Not everyone’s native language is English. People do the best that they can. If you cannot understand what a poster is saying or asking, either pass the topic or ask for clarification. Honestly, I understand the OP’s post perfectly.
OP is adding a second domain which has web hosting elsewhere and wants to know how to issue a LE cert for it. OP is also wanting to use a different hostname for the boxes SMTP and IMAP (and MX).
This is really beyond the scope of MiaB. That said, you CAN use a CNAME record in DNS to point pop.seconddomain.com and imap.seconddomain.com to your hostname of your MiaB install. This would be an unsupported modification.
I also believe that you would have to have a certificate for those subdomains which could be accomplished by adding a user for each subdomain and then issuing a certificate in the admin area, after the CNAME records are set up. In theory. I have not attempted this but I am curious so I am going to try. But honestly, you should just stick with the hostname of the box. If you have a specific reasoning to use vanity hostnames, MiaB is most likely not the product for you.
I guess this might be something related to autodiscover, but theres no suggestion in DNS part of MiaB for autodiscover. So maybe you can pinpoint me, maybe i can somehow make CNAME in DNSes so autodiscover works and mail clients can get config porperly ?
PS - Concerning “manual configuration” - why would i create a topic here then I’m planning to have 50-60 users aged 40-60 , and all of them would occasionally be pinging me for “we cant setup mail” . So this is not the case
Well, yes, i missed it wasnt merged indeed. And it SHOULD BE MERGED
Basically hints (I’m not sure if devs will notice this, whoich would be good) are as follows :
There definitely should be an option generating Letsencrypt for autodiscover/autoconfig subdomains (either they are on inner DNSes or not.) Just check if it resolves to mailbox machine , and if so - add it to Letsencrypt ! (or add checkbox for manual try ?). For now i solved this by adding emails on subdomains (as recommended by alento earlier)
with 1+2 my Thunderbird autoconfig is now working like a charm !
However, Outlook is much worse - somehow when i try to access autodiscover.xml ,Im getting auth window (no logins work to log in ) , when i cancel - im getting some error (see image below). I found this is z-push makes this, however im not sure how to make this work, any hints maybe ? :