Mail-in-a-Box Installation error

Hi All,

When i install Ubuntu 22.04 on ethernet configuration i have disabled the IPv6. But when i installing Mail-in-a-Box i have noted it’s got a local IP V6 address.

So, when installing it’s trying to reach using IPv6, which is getting failed. So i have did following.


To force your Ubuntu 22.04 system to prefer IPv4 without completely disabling IPv6,
you need to modify the /etc/gai.conf file to change the address selection precedence.

1.Open the configuration file in a text editor with administrative privileges.
sudo nano /etc/gai.conf

  1. Locate the lines related to IPv4 preference. The file contains commented-out examples of how to prioritize IPv4 over IPv6.
    Look for a section that mentions “prefer IPv4” or “precedence ::ffff:0:0/96 100”.

  2. Uncomment the relevant line(s). You need to uncomment the line that sets a high precedence for IPv4-mapped addresses.
    Specifically, uncomment the following line by removing the # character from the beginning:

#precedence ::ffff:0:0/96 100
It should look like this after editing:
precedence ::ffff:0:0/96 100

You can also add a general precedence rule if it is not already present to ensure IPv6 has a lower default priority than the newly added IPv4 rule:

Precedence for IPv4-mapped addresses

precedence ::ffff:0:0/96 100

Default IPv6 precedence (optional, usually default)

precedence ::/0 40
The higher number (100) gives IPv4 addresses higher priority during the address sorting process specified by RFC 3484.


After this setting, I have abled to install the mail-in-a-Box mail server without having any issues.

Never try to disable IPv6, it will cause installation errors.

Thank you everyone for your suggestions and help.

1 Like