Hi, today 08th Nov. 25, I tried to install Mail-in-a-Box on fresh ubuntu 22.04 server using the installation command from the home page. But installation stuck showing error,
Failed: add-apt-repository -y ppa:duplicity-team/duplicity-release-git
There are traceback for the error and the final one shows like below.
File “/usr/lib/python3/dist-packages/httplib2/_ init _.py”, line 1153, in connect sock.connect((self.host, self.port))
TimeoutError: [error 110] connection timed out
This error even comes if run sudo mailinabox command from the terminal
Is this error just for me or is it something globally??
is there a soultion for me to run the installation from the begining or from the command??
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
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”.
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.