Trying to understand DNS settings and a lot of problems

Just an FYI - there should be zone files for and (and any other domains known to MIAB) - 3 files for each (.txt .txt.ds and .txt.signed). They should have been created by the original install, and are recreated whenever you run mailinabox.

(It uses the email addresses that it has to make a list of domains. Hopefully ewsg576’s MIAB has at least an admin address setup.)

Hi again,

Sorry for my late reply.

Well, I was not able to see those zone files for and .

Even running sudo mailinabox again does not helps. I really don´t know what more I can do.

I can’t see why your box hasn’t generated zone files. Must be something quite unusual!?!

Your box must have at least one email address setup - it uses the email addresses to build stuff (zones, etc) for each domain. Did you create an address for yourself? (Not, but a real user, like - the install process asks for that initial user.)

So, I created an email ( address only for the first time I ran the install.

From that point I ran the install several times again but I was not asked for a new address.

How’s your zone files now?
ls /etc/nsd/zones/

I think there are no zone files, because the command had no output. :frowning:

That all sounds quite strange. I would try: create another user (using the admin pages), then sudo mailinabox again, and see if any zones files have been created.

Another question - who is your provider and what Ubuntu image are you using? (Some providers spin-up their own custom images which have subtle differences from official Ubuntu Server!)

Well, I am really almost giving up.

I destroyed that server (at Linode) and created a new one.

From now on I started all over again. But, when installing MIAB, at the end of the installation in SSH a 500 Internal Error happened.

So I ran the install again, and now everything was fine.

But when trying to login in the admin area, I was told that there was no admin user, so I had to run that command to create a new admin user.

And, again, after get access to the admin area, the same errors, regarding glue records incorrect, nameservers incorrect, the same 500 Internal Server Error when trying to access the “external DNS” area, etc, etc.

I really don’t know what can I do more in order to have Mail in a Box running. :frowning:

P.S.: sorry, I forgot this. My servers are at Linode, and I am using Ubuntu 22.04.

P.S. 2: I tried to create a new user, but again a 500 Internal Error happened. Running again the procedure and I was told that the user already exists.

One last question - when you are doing the initial install (when you run “curl … sudo -E bash” or mailinabox) one of the questions it asks starts

Your Email Address 
What email address are you setting this box up to manage?

What is your answer? What is that first email address that you enter?

I always enter the same address (

I noticed that it asks for an email address only the first time I run the setup. The next times (with sudo mailbox) it does not asks for it.

Are you saying you really enter “”? What is the actual name and actual domain that you enter?

I suspect that you might have used a name that conflicts with the build-in aliases, which might cause the zones problems.

I am entering myname [at] . Always the same address, every time I run the setup again. But nothing works, unfortunately.

I noticed that 500 Internal Error during installation only in the last few ones. But don’t know what causes that. Maybe I could check the logs.

I would love if at least I could pick up the custom entries at “External DNS”, but this page also returns a 500 error and no entries are displayed (so I could try setting up things at external DNS manager).

Hi again,

Well I mentioned in other thread some errors I get.

They are below, maybe they can help to identify the cause of the problem:

Exception on /dns/dump [GET]
                                                 Traceback (most recent call last):
                                                 File "/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask>/", line 252>
                                                 response = self.full_dispatch_request()
                                                 File "/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/", line 182>
                                                     rv = self.handle_user_exception(e)


xception on /dns/dump [GET]
                                                  Traceback (most recent call last):
                                                    File "/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/", line 2528, in wsgi_app
                                                      response = self.full_dispatch_request()
                                                    File "/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/", line 1825, in full_dispatch_request
                                                      rv = self.handle_user_exception(e)
                                                    File "/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/", line 1823, in full_dispatch_request
                                                      rv = self.dispatch_request()
                                                    File "/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/", line 1799, in dispatch_request
                                                      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
                                                    File "/home/ed/mailinabox/management/", line 75, in newview
                                                      return viewfunc(*args, **kwargs)
                                                    File "/home/ed/mailinabox/management/", line 397, in dns_get_dump
                                                      return json_response(build_recommended_dns(env))
                                                    File "/home/ed/mailinabox/management/", line 1084, in build_recommended_dns
                                                      for (domain, zonefile, records) in build_zones(env):
                                                    File "/home/ed/mailinabox/management/", line 175, in build_zones
                                                      records = build_zone(domain, domains, additional_records, env)
                                                    File "/home/ed/mailinabox/management/", line 224, in build_zone
                                                      subzone = build_zone(subdomain, domain_properties, additional_records, env, is_zone=False)
                                                    File "/home/ed/mailinabox/management/", line 215, in build_zone
                                                      for value in build_sshfp_records():
                                                    File "/home/ed/mailinabox/management/", line 468, in build_sshfp_records
                                                      keys = shell("check_output", ["ssh-keyscan", "-t", "rsa,dsa,ecdsa,ed25519", "-p", str(port), "localhost"])
                                                    File "/home/ed/mailinabox/management/", line 126, in shell
                                                      ret = getattr(subprocess, method)(cmd_args, **kwargs)
                                                    File "/usr/lib/python3.10/", line 420, in check_output
                                                      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
                                                    File "/usr/lib/python3.10/", line 524, in run
                                                      raise CalledProcessError(retcode, process.args,
                                                  subprocess.CalledProcessError: Command '['ssh-keyscan', '-t', 'rsa,dsa,ecdsa,ed25519', '-p', '22', 'localhost']' returned non-zero exit status 1.

Thanks once again for your help.

P.S.: I also found the below lines in /var/log/syslog. Just after I tried to access the External DNS page (obtaining the 500 error):

Feb 27 10:29:00 box Exception on /dns/dump [GET]#012Traceback (most recent call last):#012  File "/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/", line 2528, in wsgi_app#012    response = self.full_dispatch_requ>
Feb 27 10:29:11 box kernel: [265238.333680] [UFW BLOCK] IN=eth0 OUT= MAC=f2:3c:93:e6:f2:bb:fe:ff:ff:ff:ff:ff:08:00 SRC= DST=SERVER_IP LEN=40 TOS=0x08 PREC=0x20 TTL=240 ID=5381 PROTO=TCP SPT=59747 DPT=30213 WINDOW=1024 R>

Do you recognize this IP address?

No. Never saw it before.

Can you tell me what your “myname” and “” is? Or do you need to keep that private?

Hi again!

I think my problems were solved! :slight_smile:

I followed the suggestion by @eXTric on this thread, and now I think everything is going fine.

Well, I don’t understand why that problems happened just because I blocked SSH connections through IPv6 to SSH (this is part of a little “checklist” I have/do always when I pick a new server), but, who knows. :slight_smile:

This time I noticed that the installation process delayed a bit more. And now I was asked to enter the password for the admin user (this never happened before during the several installs I done). The installer also displayed some “DNS updated” messages.

Well, I think that now everything should really be going well, and I was also able to fix the reverse DNS (but MiAB is not “detecting” it yet).

I have some errors in the MiAB stats page (MTA-STS policy is missing: STSFetchResult.NONE, etc), but I am very happy now things start doing good. :slight_smile:

This should resolve itself within a few hours if you renew the certificate provisioning or rerun the installer.

That’s great! Thank you! :wink:

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