After setting up mailinabox successfully, I attempted to move the server to an nfs mount so I would have more disk space for emails than what I allocated for the vm. As suggested by https://discourse.mailinabox.email/t/mailboxes-storage-location-and-quota/3704 I copied the data at /home/user-data
to the nfs drive, made a symbolic link, then restarted the nginx service just to make sure things were still working. Now I get an http 500 “Something went wrong, sorry” error when I go to System → Status Checks.
When I run the status_checks.py script manually, I get the following output
System
======
✓ All system services are running.
✓ SSH disallows password-based login.
✓ System software is up to date.
? You are running version Mail-in-a-Box v63. Mail-in-a-Box version check disabled by privacy setting.
✓ System administrator address exists as a mail alias. [administrator@mail.mydomain.com ↦ user1@mail.mydomain.com,user2@mail.mydomain.com]
✓ The disk has 5928.04 GB space remaining.
✓ System memory is 75% free.
Network
=======
✓ Firewall is active.
✖ Outbound mail (SMTP port 25) seems to be blocked by your network. You will not be able to send any mail. Many residential networks block port 25 to prevent hijacked machines from being able to send spam. A quick connection test to
Google's mail server on port 25 failed.
✖ The IP address of this machine xx.xx.xx.xx is listed in the Spamhaus Block List (code 127.0.0.11), which may prevent recipients from receiving your email. See [link here].
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.10/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/home/myuser/mailinabox/management/./status_checks.py", line 398, in run_domain_checks_on_domain
check_dns_zone_suggestions(domain, env, output, dns_zonefiles, domains_with_a_records)
File "/home/myuser/mailinabox/management/./status_checks.py", line 579, in check_dns_zone_suggestions
check_dnssec(domain, env, output, dns_zonefiles)
File "/home/myuser/mailinabox/management/./status_checks.py", line 604, in check_dnssec
with open(os.path.join(env['STORAGE_ROOT'], 'dns/dnssec/' + dnssec_keys['KSK'] + '.key'), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/user-data/dns/dnssec/K_domain_.+013+13578.key'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/myuser/mailinabox/management/./status_checks.py", line 1114, in <module>
run_checks(False, env, ConsoleOutput(), pool)
File "/home/myuser/mailinabox/management/./status_checks.py", line 67, in run_checks
run_domain_checks(rounded_values, env, output, pool, domains_to_check=domains_to_check)
File "/home/myuser/mailinabox/management/./status_checks.py", line 360, in run_domain_checks
ret = pool.starmap(run_domain_checks_on_domain, args, chunksize=1)
File "/usr/lib/python3.10/multiprocessing/pool.py", line 375, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "/usr/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
FileNotFoundError: [Errno 2] No such file or directory: '/home/user-data/dns/dnssec/K_domain_.+013+13578.key'
The warning and two status failures are expected, but the Python error is not. After seeing this, I assumed running mailinabox setup would generate this “K_domain” file but it doesn’t, instead I get a similar error at the end of the output:
Primary Hostname: mail.mydomain.com
Public IP Address: xx.xx.xx.xx
Private IP Address: 10.xx.xx.xx
Mail-in-a-Box Version: v63
Updating system packages...
Installing system packages...
Initializing system random number generator...
Firewall is active and enabled on system startup
Synchronizing state of fail2ban.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable fail2ban
Installing nsd (DNS server)...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
wal
Installing Nextcloud (contacts/calendar)...
Nextcloud is already latest version
Installing Z-Push (Exchange/ActiveSync server)...
Installing Mail-in-a-Box system management daemon...
Installing Munin (system monitoring)...
[Errno 2] No such file or directory: '/home/user-data/dns/dnssec/K_domain_.+008+34724.private'
-----------------------------------------------
Your Mail-in-a-Box is running.
Please log in to the control panel for further instructions at:
[link here]
If you have a DNS problem put the box's IP address in the URL
([link here]) but then check the TLS fingerprint:
At this point I am able to login to /admin and /mail, however Status Check still fails.
How can I regenerate this file so status check can work again? I’m not sure how I lost it in the first place or if it was ever created since I never configured dnssec.