Mail-in-a-Box Installation error

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??

Thank you in advance

Check if dns is functioning sudo systemctl status named

Yes, it’s status is active running. There is no internet connectivity issue.Just to check i have tried downloading iredmail using below link.

wget https://github.com/iredmail/iRedMail/archive/refs/tags/1.6.3.tar.gz

that also worked.

Maybe it’s bad luck with the specific server. Does
add-apt-repository -y ppa:duplicity-team/duplicity-release-git work?

Could be something to do with duplicity breaking MIAB

You could try downloading and installing a working duplicity, before the MIAB install. I’d try:

wget https://launchpad.net/~duplicity-team/+archive/ubuntu/duplicity-release-git/+build/30958892/+files/duplicity_3.0.5.1-ppa202506251611~ubuntu22.04.1_amd64.deb
apt install ./duplicity_3.0.5.1-ppa202506251611~ubuntu22.04.1_amd64.deb
apt-get hold duplicity

keep an eye on https://discourse.mailinabox.email/t/duplicity-oops-they-did-it-again/16051 … something will appear when a working duplicity update is available.

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

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.