I would be very grateful if someone could help me on this matter because, well, I am a bit lost here.
I have two Linux (Ubuntu 22.04) servers at Linode. The first one is running very well, and I use it only for host my domain. The website is running fine, etc (Apache, MySQL, WordPress, PHP-FPM, etc).
I have also deployed a second server, also with Ubuntu 22.04, only to set up a mail server using Mail in a Box.
Well, things are a bit complicated because I can’t get things to work. And I know that this certainly is DNS related, but I can’t figure out what is wrong.
I’ve added in Mail in a Box, in the “Custom DNS” section, the below entries, pointing to the IP of the server where the website is hosted (different than the one where I have Mail in a Box installed):
“`
domain.com A SERVER_IP
www.domain.com A SERVER_IP
“`
Well, at Google Domains I’ve added two glue records, as per the MIAB installation guide, as below:
ns1.box ==> IPv4 ==> IPv6
ns2.box ==> IPv4 ==> IPv6
Obs: at Google Domains I am using “custom name servers”.
Here I have added the following:
ns1.box.domain.com
ns2.box.domain.com
And now if I run `dig domain.com +trace +additional | grep ns1.box.domain.com` I obtain the following output:
“`
domain.com. 172800 IN NS ns1.box.domain.com.
ns1.box.domain.com. 172800 IN A SERVER_IP_IPV4
ns1.box.domain.com. 172800 IN AAAA SERVER_IP_IPV6
couldn’t get address for ‘ns1.box.domain.com’: failure
dig: couldn’t get address for ‘ns1.box.domain.com’: no more
“`
I still don’t understanding the “could’t get address…” above.
But, if I run `dig +norec @a.gtld-servers.net. domain.com` the below output is the result:
“`
; <<>> DiG 9.18.1-1ubuntu1.3-Ubuntu <<>> +norec @a.gtld-servers.net. domain.com
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62280
;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 5
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;domain.com. IN A
;; AUTHORITY SECTION:
domain.com. 172800 IN NS ns1.box.domain.com.
domain.com. 172800 IN NS ns2.box.domain.com.
;; ADDITIONAL SECTION:
ns1.box.domain.com. 172800 IN A SERVER_IP_IPV4
ns1.box.domain.com. 172800 IN AAAA SERVER_IP_IPV6
ns2.box.domain.com. 172800 IN A SERVER_IP_IPV4
ns2.box.domain.com. 172800 IN AAAA SERVER_IP_IPV6
;; Query time: 0 msec
;; SERVER: 2001:503:a83e::2:30#53(a.gtld-servers.net.) (UDP)
;; WHEN: Fri Feb 17 14:54:49 -03 2023
;; MSG SIZE rcvd: 169
“`
For the above I think things are almost right. Or not?
But, why do Mail in a Box still displaying errors, as below?
“`
“Nameserver glue records are incorrect. The ns1.box.domain.com and ns2.box.domain.com nameservers must be configured at your domain name registrar as having the IP address SERVER_IP. They currently report addresses of [Not Set]/[Not Set]. It may take several hours for public DNS to update after a change.”
”
This domain must resolve to your box’s IP address (SERVER_IP_IPV4 / SERVER_IP_IPV6) in public DNS but it currently resolves to [Not Set] / [Not Set]. It may take several hours for public DNS to update after a change. This problem may result from other issues listed above.”
“`
I am really really lost here, and can’t get this to work. I would be extremely grateful for any help and/or advice.