Mail subdomain for (top) domain and sibling subdomains?

Hello, i would like to make new mail subdomain (on my DNS registrar server, via NS record) as: and assigned it to MIAB for DNS handling (just subdomain!) and as (primary) mail domain (for initial setup). (i’ll let MIAB setup prepend this name with box. hostname, no problem with it)
Now, what i can’t figure-out would it be possible for MIAB (from subdomain mymail) also to handle mail for my parent owndomain and any sibling subdomains (ie., if i create such MX records on my DNS registrar server and make corespondent user(address) in MIAB/admin panel?

No, don’t do that. Just replace box with mymail or mail or whatever you want to use … now, read on to make sure I am understanding what you want to accomplish.

Ok, what I am reading is that you’d like to have the MX record (which is the same as the servers hostname in MiaB’s case) be the MX record for several sub-domains. Am I right? If that is the case, all domains and sub-domains which MiaB handles email for will use just the one MX record - whether you have email users for user@something.domain.tld or user@domain.tld or user@somethingelse.domain.tld. Or even user@anotherdomain.tld.

The part that is confusing me is your first paragraph about the NS record and DNS handling — I am not sure what you mean by what you have written - if it is a misunderstanding of how DNS works on your part, or if it is a question of whether some specific thing can be accomplished? If the latter, please elaborate. @nikolab

Hi @alento thnx,
What i want to accomplish is let MIAB (dns) be responsible just for that mymail subdomain, for SFP, DKIM, DMARC etc (whitout handling anything else from parent domain or sibling subdomains), yet handling all the mails for all of them, via MX records (in external DNS) and creating user (and address) accounts in MIAB (and/or using mail domain alias?).
I would understand part with same server instance (and MX server record) for all the handled domains, but i am puzzled would MIAB handle correctly subdomains of the same level and/or it’s parent domain (ie. not required itself to be a parent domain, and handle the ones below, as it’s subdomains)?
I thought MIAB setup prefer hostname as box and would be it’s domain and (primary) domain name for the setup?

By examining /etc/nsd/zones/ it seems that all subsequent configuration of adding Users (in admin panel) of topdomain and sibling subdomain went ahead (for the DNS part) in topdomain zone file, yet as MIAB is not responsible for topdomain (only for mymail subdomain) those SPF, DKIM, DMARC record wouldn’t be accessible from the outside (unless somehow they are, because of the MX record?).

Ok, I think I understand what you want to accomplish. You want MiaB to be responsible ONLY for DNS for the sub-domain…

To accomplish this you need to enter a NS record for the subdomain and point it to your MiaB. There is one problem with this though. Many DNS providers do not allow you to set NS records on your domain. This is especially true if you use your domain registrar’s name servers.

And now, I think I can answer the rest of your question properly as I understand the question better:

Yes, absolutely!

Remember that when you set DNS, most DNS providers allow you to enter @ in the ‘name’ filed. This represents a wild card for all other subdomains which are not specifically mentioned elsewhere. Most DNS systems make you enter a value into the ‘name’ field which I believe is actually incorrect.

So, in the end you are either going to have a single MX record with the ‘name’ field of @, or several MX records with the ‘name’ field of mymail, mytest, myothertest, etc.

I do not know (I have never actually given it enough thought to care) why MiaB creates a zone file for the box’s hostname. It has been a mystery to me personally. @JoshData could you shed some light on this please?
But yes, your observations are correct as all domains have a single zone file except the servers domain.

MiaB IS responsible for the domain’s DNS itself - Note that there are actually two zone files for the one for and the one for As mentioned above, I do not know the reasoning for this.

This is, of course, dependent upon your listing and as the name servers with the registrar.

as i figure out MiaB creates (additional) zone file name “box” (for NS, MX records?) plus it sets itself a hostname same as that same zone (box). Yet i can’t figure out why in that case it also doesn’t set www record also on box hostname (aka , but on top domain zone name (www.domain.tld) !? :thinking:

because it’s not necessary. You can custom www.domain.tld as a website if you want to ( if it’s external then point www to your external Ip as a A record). You can create the dns in the admin area.

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