Version 60 for Ubuntu 22.04 is released

I use non of those modules.

I wasn’t aware that z-push was a beta feature. Apparently I missed that verbiage on the main page. Sorry for the confusion. I guess I will sit on standby waiting to see if whoever maintains that piece is able to resolve the issue with v60 and z-push-admin not working. If someone needs me to test it, let me know. I think this is the only piece that isn’t working on my upgraded VM.

Thanks! Worked great for me.

Only fail2ban is not working.

ERROR Failed to access socket path: /var/run/fail2ban/fail2ban.sock. Is fail2ban running?

/var/run/fail2ban$ ls -l

total 0


sudo systemctl enable --now fail2ban

solved the problem :slight_smile:

I’m experiencing problems installing MiaB on a fresh Ubuntu 22.04 vServer.

I deployed Ubuntu 22.04, updated the system and created my user.
The MiaB install shows some errors and ended without creating the admin user.

There is no “mailinabox” folder in the user directory. It is created in the root directory.
I started the installation with the non-root user with the command “curl -s | sudo bash”

What could be the reason for this?

Installing nsd (DNS server)...
Generating DNSSEC signing keys...
Installing Postfix (SMTP server)...
***mv: cannot stat '/var/lib/postgrey/*': No such file or directory***
Installing Dovecot (IMAP server)...
Creating new user database: /home/user-data/mail/users.sqlite
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...

Upgrading to Nextcloud version 23.0.8

Nextcloud is already latest version
photos 1.5.0 disabled
dashboard 7.3.0 disabled
activity 2.15.0 disabled
Installing Z-Push (Exchange/ActiveSync server)...
Installing Mail-in-a-Box system management daemon...
Installing Munin (system monitoring)...
***Command '['/usr/sbin/nsd-control', 'reload']' returned non-zero exit status 1.web updated***

Okay. I'm about to set up admin@domain.tld for you. This account will also
have access to the box's control panel.
***<!doctype html>***
***<html lang=en>***
***<title>500 Internal Server Error</title>***
***<h1>Internal Server Error</h1>***
***<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>***

Migrated to a fresh & clean Ubuntu 22.04 box and restored from backup. All went smoothly.

Thanks @JoshData (and other contributors) for all your efforts! I’m a very happy user of MailInABox for years now!

1 Like

Anyone successfully tried in-place upgrade?

I’ve tried on a cloned VM just to see how it would behave. It doesn’t work. Deleted the VM.


Same here. All smoothly!

Thank you, it worked for me!

I did see a few errors on restore. The first time I ran it, it was the pem file. I deleted this, reran it, and saw the pem file again and owncloud/config.php. I then just removed ~user-data/ssl and ~user-data/owncloud, and ran it again. I STILL saw the file exists error on owncloud/config.php, but everything seems to be working fine, including calendar and contacts.

It would be really good to revise the restore docs to explain what’s going on with this pem file.

1 Like

Just a heads-up for anyone trying to install under Ubuntu 22.04 64bit on one of the Racknerd servers images. The groups sudo and adm are currently missing from the base install and MiAB install fails.

After adding these groups manually everything installs and runs correctly.


Kudos on all the hard work Josh and all the contributors!

I just did an inplace upgrade from Ubuntu 18.04 to 20.04
and then from 20.04 to 22.04. ( I know - not recommended, but…)

When the upgrades asks if you want to keep each configuration file (there are many) - I just accepted the default (keep file as is)
Once I was all the way to 22.04, I ran “curl -s | sudo bash”

All went well until the last part when I got this:

FAILED: /usr/local/lib/mailinabox/env/bin/pip install --upgrade pip

Traceback (most recent call last):
File “/usr/local/lib/mailinabox/env/bin/pip”, line 6, in
from pip._internal.cli.main import main
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/cli/”, line 9, in
from pip._internal.cli.autocompletion import autocomplete
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/cli/”, line 10, in
from pip._internal.cli.main_parser import create_main_parser
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/cli/”, line 8, in
from pip._internal.cli import cmdoptions
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/cli/”, line 23, in
from pip._internal.cli.parser import ConfigOptionParser
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/cli/”, line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/”, line 26, in
from pip._internal.utils.logging import getLogger
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/utils/”, line 13, in
from pip._internal.utils.misc import ensure_dir
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/utils/”, line 40, in
from pip._internal.locations import get_major_minor_version, site_packages, user_site
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/locations/”, line 14, in
from . import _distutils, _sysconfig
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/locations/”, line 9, in
from distutils.cmd import Command as DistutilsCommand
File “/usr/local/lib/mailinabox/env/lib/python3.6/distutils/”, line 25, in
from distutils import dist, sysconfig
ImportError: cannot import name ‘dist’

from another post, I saw someone figured you needed to put in new symlinks for pip3 and python3 in /usr/local/lib/mailinabox/env/bin/

sudo mv pip3 pip3-old
sudo mv python3 python3-old

sudo ln -s /usr/bin/pip3 pip3
sudo ln -s /usr/bin/python3 python3

then I did a reinstall:
sudo mailinabox

All seems to be working well! I post again if I find anything amiss.


Problem with nginx and pem files.
I created a fresh Ubuntu 22.04 instance and followed the setup instructions for a new box.
I then restored from backup. When I finally run the mailinabox command at the end, I see the following:

Mail-in-a-Box Version: v60

Updating system packages…
Installing system packages…
Initializing system random number generator…
Firewall is active and enabled on system startup
Installing nsd (DNS server)…
Installing Postfix (SMTP server)…
Installing Dovecot (IMAP server)…
Installing OpenDKIM/OpenDMARC…
Installing SpamAssassin…
Installing Nginx (web server)…

FAILED: service nginx restart

Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xeu nginx.service” for details.

Service status shows the following:
× nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-10-16 09:50:41 EDT; 1min 0s ago
Docs: man:nginx(8)
Process: 9521 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 47ms

Oct 16 09:50:41 systemd[1]: Starting A high performance web server and a reverse proxy server…
Oct 16 09:50:41 nginx[9521]: nginx: [emerg] SSL_CTX_use_PrivateKey("/home/user-data/ssl/ssl_private_key.pem") failed (SSL: error:05800074:x509 certificate routines::key values mismatch)
Oct 16 09:50:41 nginx[9521]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 16 09:50:41 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Oct 16 09:50:41 systemd[1]: nginx.service: Failed with result ‘exit-code’.
Oct 16 09:50:41 systemd[1]: Failed to start A high performance web server and a reverse proxy server.

Any ideas what went wrong or how to correct?

@thenlec: I had the same problem initially. It didn’t restore the SSL ceritifcates preventing nginx to start in my case. I just manually copied over /home/user-data/ssl from the old box and tried again.

What’s the consensus on Z-push? There are reports above that it’s not working after the upgrade. Can anyone confirm whether it’s working for them? This is essential for my use case.


Thanks @beunhoas , that worked! Nginx started now after I copied the files from the old box and created the soft link. Continuing to troubleshoot a few things.
Thank you for the help.

I dont know, I think it possible it is working but you can’t see any of the details if it works or not.

When you go to your domain


You get an authentication window. (use your credentials [Full Emai] for any mail account on your system)

then you will get this status page:

Z-Push - Open Source ActiveSync
GET not supported
This is the Z-Push location and can only be accessed by Microsoft ActiveSync-capable devices

That is the best I can “test” with because my server isn’t “LIVE”, I haven’t tried seeing if a phone or device can connect and pull down mail.

Personally I was waiting to see what z-push-admin said with you run commands like “-a lastsync”

I’m not sure who maintains Z-Push in MiaB maybe but its not Josh. Sadly I didn’t realize this was a beta feature and I depend on it pretty heavily.

based on Update z-push to 2.3.5 on the upstream repository of by yodax · Pull Request #1153 · mail-in-a-box/mailinabox · GitHub it seems the last person to touch it was “yodax”

opened an issue here: z-push-admin broken in v60 · Issue #2178 · mail-in-a-box/mailinabox · GitHub

Thanks @stylnchris. When I run the z-push-admin command on MIAB v56, it correctly reports the synced clients. If that’s not the case in v60, I’d say there’s indeed an issue. I will wait for now and follow the issue you opened.

I have run curl -s | sudo bash but System Status Checks still says You are running version v57a. The latest version is v60. For upgrade
I have rebooted my vm and update are runned successful

You need to move to Ubuntu 22.04 to be successful.