running Ubuntu 22.04 LTS
running version v61.1
Check the output of
sudo journalctl -u mailinabox
and report anything that looks interesting
Apr 12 22:44:24 gunicorn[306541]: Exception on /dns/dump [GET]
Traceback (most recent call last):
File “/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/app.py”, line 2528, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/app.py”, line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/app.py”, line 1823, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/app.py”, line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File “/root/mailinabox/management/daemon.py”, line 75, in newview
return viewfunc(*args, **kwargs)
File “/root/mailinabox/management/daemon.py”, line 397, in dns_get_dump
return json_response(build_recommended_dns(env))
File “/root/mailinabox/management/dns_update.py”, line 1084, in build_recommended_dns
for (domain, zonefile, records) in build_zones(env):
File “/root/mailinabox/management/dns_update.py”, line 175, in build_zones
records = build_zone(domain, domains, additional_records, env)
File “/root/mailinabox/management/dns_update.py”, line 224, in build_zone
subzone = build_zone(subdomain, domain_properties, additional_records, env, is_zone=False)
File “/root/mailinabox/management/dns_update.py”, line 215, in build_zone
for value in build_sshfp_records():
File “/root/mailinabox/management/dns_update.py”, line 468, in build_sshfp_records
keys = shell(“check_output”, [“ssh-keyscan”, “-t”, “rsa,dsa,ecdsa,ed25519”, “-p”, str(port), “localhost”])
File “/root/mailinabox/management/utils.py”, line 126, in shell
ret = getattr(subprocess, method)(cmd_args, **kwargs)
File “/usr/lib/python3.10/subprocess.py”, line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/usr/lib/python3.10/subprocess.py”, 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 st>
lines 1032-1080/1080 (END)
The log above is the last lines and the text is red. I guess that’s interesting
adding User also errors out.
Exception on /mail/users/add [POST]
Traceback (most recent call last):
File “/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/app.py”, line 2528, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/app.py”, line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/app.py”, line 1823, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/mailinabox/env/lib/python3.10/site-packages/flask/app.py”, line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File “/root/mailinabox/management/daemon.py”, line 75, in newview
return viewfunc(*args, **kwargs)
File “/root/mailinabox/management/daemon.py”, line 196, in mail_users_add
return add_mail_user(request.form.get(‘email’, ‘’), request.form.get(‘password’, ‘’), request.form.get(‘privileges’, ‘’), env)
File “/root/mailinabox/management/mailconfig.py”, line 316, in add_mail_user
return kick(env, “mail user added”)
File “/root/mailinabox/management/mailconfig.py”, line 601, in kick
results.append( do_dns_update(env) )
File “/root/mailinabox/management/dns_update.py”, line 68, in do_dns_update
for (domain, zonefile, records) in build_zones(env):
File “/root/mailinabox/management/dns_update.py”, line 175, in build_zones
records = build_zone(domain, domains, additional_records, env)
File “/root/mailinabox/management/dns_update.py”, line 224, in build_zone
subzone = build_zone(subdomain, domain_properties, additional_records, env, is_zone=False)
File “/root/mailinabox/management/dns_update.py”, line 215, in build_zone
for value in build_sshfp_records():
File “/root/mailinabox/management/dns_update.py”, line 468, in build_sshfp_records
keys = shell(“check_output”, [“ssh-keyscan”, “-t”, “rsa,dsa,ecdsa,ed25519”, “-p”, str(port), “localhost”])
File “/root/mailinabox/management/utils.py”, line 126, in shell
ret = getattr(subprocess, method)(cmd_args, **kwargs)
File “/usr/lib/python3.10/subprocess.py”, line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/usr/lib/python3.10/subprocess.py”, 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 st>
lines 1111-1159/1159 (END)
User is added but the error prompt throws an exception.
This looks like a bug with availability of ipv6. Did you explicitly disable ipv6 for ssh somehow?
Currently in /etc/ssh/sshd_config
#commnted out
#ListenAddress 0.0.0.0
#ListenAddress ::
AddressFamily inet
I think it will work when you use AddressFamily any
There is already a pull request on the development github which makes mailinabox only use ipv4 for this case.
Looks like it fixed it. Thank you!
AddressFamily any
In relation to my current setup. Do I have to install certificate for autoconfig?
[autoconfig.box.domain.com](https://autoconfig.box.domain.com/) No certificate installed. The domain name does not resolve to this machine: [Not Set] (A), [Not Set] (AAAA).
AddressFamily inet was one of the suggestions in securing server in Linode. Turning off IPV6 and using only IPV4. Its a conflict of setup for MIAB.