HTTP 500 error when installing v73 due to lacking IPv6


I’m on a fresh Ubuntu 22.04 machine by racknerd and I keep getting this HTTP 500 error after entering my password the 2nd time. It would not be an issue except that the install script terminated and is incomplete, no idea exactly what is missing, but the an admin user account is definitely 1 of them

I ran sudo journalctl -u mailinabox -n 25 and it seems that not having IPv6 is the problem:

If IPv6 is mandatory, then it should be made known and terminated as early as possible

Primary Hostname: box.example.com
Public IP Address: x.x.x.x
Public IPv6 Address: xxxxxxxxxxx
Mail-in-a-Box Version: v73

Anything I can do about this?

UPDATE

I managed to resolve the problem by enabling IPv6, however, the answer I’m seeking is, how can I get mail-in-a-box to install fully WITHOUT IPv6?

It’s probably too late, but what did the Public IPv6 Address: xxxxxxxxxxx say? There are xxxxx so an ipv6 address was found? Also what was the output of sudo journalctl -u nsd?
Anyway, to completely disable ipv6 on your system, follow this https://linuxconfig.org/how-to-disable-ipv6-address-on-ubuntu-22-04-lts-jammy-jellyfish

I believe the IPv6 line did not show.

The VM came without IPv6 and MIAB failed to install because of that, I don’t think IPv6 is mandatory to deliver email right?

Thus, how can I install MIAB when there is only IPv4, no IPv6?

It is not.

It’s difficult. There are a number of more or less vague issues with this on the forum. Sometimes it helps to enable ipv6, sometimes it helps to disable ipv6.
For the specific case, we need to look into the exact issue you run into.

Also a little less radical solution to disable ipv6:
Edit /etc/sysctl.d/90-disable_ipv6.conf

net.ipv6.conf.all.disable_ipv6 = 1

Then reload

sudo systctl -p /etc/sysctl.d/90-disable_ipv6.conf

Ok, thanks, I confirm that the IPv6 line is missing, how do I get the exact issue I’m facing?

First question, to check your end-goal: you want to install and use Mail-in-a-Box without an ipv6 address, correct?

Do you want to start from scratch? Then it’s easy, rebuild the VPS image and try to install Mail-in-a-Box. You’ll encounter an error, and we’ll look at sudo journalctl -u nsd to see what it reports.

If you want to start working with the installation you have now:

  • Disable ipv6 (you said earlier you enabled it, how did you do that? Undo it)
  • Disable ipv6 using the sysctl method I outlined above, because it seems easiest.
  • Edit /etc/mailinabox.conf and clear the variables defining IPv6 addresses
  • Rerun the Mail-in-a-Box setup
  • Report the result, and we’ll work from there

My end goal is to actually improve MIAB, it is puzzling why the lack of IPv6 breaks the installer.

Great! And do you want to use a fresh racknerd instance?