Nameservers error - DNS + MX

Hello everyone. I have a question about DNS…

I have 2 servers.

WebServer (apache2, php, etc)
ns1.mywebserver.com
ns2.mywebserver.com
MailServer (mail-in-a-box)
ns1.box.mymailserver.com
ns2.box.mymailserver.com

The domain box.mymailserver.com is delegated to my MailServer:
ns1.box.mymailserver.com
ns2.box.mymailserver.com
It’s working fine, and in control panel everything is alright.

The domain testingwebserver.com is delegated to my WebServer:
ns1.mywebserver.com
ns2.mywebserver.com
Then I add MX:
Priority: 0
Host: ns1.box.mymailserver.com
Priority: 5
Host: ns2.box.mymailserver.com
Priority: 10
Host: box.mymailserver.com

But the control panel says:
The nameservers set on this domain are incorrect. They are currently [Not Set]. Use your domain name registrar’s control panel to set the nameservers to ns1.box.mymailserver.com; ns2.box.mymailserver.com.
It’s mandatory that ALL DNS point to MailServer?.. to box mail server?.. Can I do what I describe above?

Thanks!

If you are comfortable maintaining your own DNS and records (sounds like you are), you can of course setup your Nameservers with your registrar as you please. When you do this, it’s like using “External DNS”. Further, the status checks on your box will show errors, but this is okay if you have External DNS configured correctly.

If your sites are reachable and mail is being directed from testingwebserver.com domain to your box correctly, it’s probably fine.

I thing that may be it’s not the best idea…
I thought that making the Glue DNS configuration in Gandi, this will work… But no…

There’s a place I can look to know how to configure my other server as the mail server DNS configuration?
I mean… My MIAB server works just fine with the ns1 and ns2 … how can I make this issue in other server?

If Gandi was registrar for WebServer, I think you simply need to list your nameservers as:
ns1.box.mymailserver.com
ns2.box.mymailserver.com

This will cause the box to become the name server for your WebServer.

Or if not, I don’t understand your question.

Thanks for your answer.
ns1 and ns2 for box server is working just fine. My question was to make something like the box… but only for web.
Gandi is my registrar for both:
mymailserver.com
and
mywebserver.com

ns1.box.mymailserver.com and ns2.box.mymailserver.com works fine
I’ve pointed ns1.mywebserver.com and ns2.mywebserver.com but it doesn’t work… I think maybe is because my web server doesn’t have something that mymailserver has… NSD right?

The box does install NSD, correct.

What I’m saying is: you could put your mywebserver.com under your box’s DNS control. You simply have one email user or one alias. Then the domain could be administered via your box’s DNS and admin panel.

Thanks!.
I finally end to setup all my two servers.