DNS issue with subdomains added as regular subserver


Here we have 2 issues related to sub-domains added as regular sub-servers when the first level domain is present on the same server. As you know virtualmin add all subdomains to the first level domain's zone. But it also add NS records for every subdomain which then brakes the subdomains and they did not resolve because of that. Also it adds additional SPF record but it shouldn't.

The second issue is: is you have test.domain.com and somethingtest.domain.com

note that the "test.domain.com" at the end is the same on the two domains.

and you try to delete "test.domain.com" it deletes also "somethingtest.domain.com"



Can you post the DNS zone file here? NS records shouldn't be added for sub-domains inside an existing domain file.

I already fix it so it is not possible. But the additional NS entries ware like: sub.domain.com NS name.server.com

And these we in the same zone file as the records for domain.com ?

Yes they was in the same zone file as domain.com

Is this re-produceable for new domains? Because from looking at the current Virtualmin code, I can't see how an NS record could be added to a sub-domain.

I will test this and see if i can reproduce it and write back with the results.