Version 60 for Ubuntu 22.04 is released

Version 60 is the first release for Ubuntu 22.04. This post will collect notes about upgrading, and you are welcome to reply with your experience and tips for others.


You don’t have to be the first to upgrade. Bugs will probably be reported as more people try out this version, so you may want to wait to see people’s experiences in the replies before diving in.

Before upgrading, you must first upgrade your existing Ubuntu 18.04 box to Mail-in-a-Box v0.51 or later, if you haven’t already done so. That may not be possible after Ubuntu 18.04 reaches its end of life in April 2023, so please complete the upgrade of your existing box well before then. (If you are not using Nextcloud’s contacts or calendar, you can migrate to the latest version of Mail-in-a-Box from any previous version.)

Make sure your backups are up to date before attempting an upgrade, consider backing up your backup, keep your old server alive until you are really sure you don’t need it anymore, and backup to a different location when you set up your new box so that you don’t mangle old backups.

The only supported upgrade path is to create a new box running Ubuntu 22.04 and then migrate your user data from your old box to your new box. See the maintenance guide’s explanation on moving to a new box for tips. In-place upgrades have not been tested. You should keep your IP address and assign it to your new box if at all possible since your IP address is linked to your reputation in other people’s spam filters.

When installing Mail-in-a-Box on machines running Ubuntu 18.04, version 57a will be installed. It is the last version supporting Ubuntu 18.04. The version to install is automatically selected based on the version of Ubuntu on the machine.


No major features of Mail-in-a-Box have changed in this release, although some minor fixes were made. With the newer version of Ubuntu the following software packages we use are updated:

  • dovecot is upgraded to 2.3.16
  • postfix is upgraded to 3.6.4
  • spampd is upgraded to 2.53 (alleviating a mail delivery rate limiting bug).
  • Nextcloud is upgraded to 23.0.4.
  • Roundcube is upgraded to 1.6.0.

See the CHANGELOG for further details.


I may update this post with more or better information, so re-read this for changes before you begin.

Thanks to everyone that contributed at https://github.com/mail-in-a-box/mailinabox/pull/2083!

21 Likes

I just wanted to be the first to say Thank you @JoshData et al

2 Likes

Hi all, getting an unexpected error when running script:

ubuntu@ip-172-31-26-225:~$ sudo curl -s https://mailinabox.email/setup.sh | sudo -E bash

bash: line 80: unexpected EOF while looking for matching `"’

bash: line 89: syntax error: unexpected end of file

1 Like

There is a stray " at end of line 22 which needs to be removed…

Yep, experiencing the same issue here.

I have a warning that packages need to updated but there is nothing available to update. A reboot doesn’t fix it either.

Thank you. It’s fixed now.

I have downloaded the installer to go from 57a to the new version and it keeps showing me that it was succesful, but the GUI and the cmd line both show that I am still running 57a

@tsim

Did you install a new server with Ubuntu 22.04?

When installing Mail-in-a-Box on machines running Ubuntu 18.04, version 57a will be installed. It is the last version supporting Ubuntu 18.04. The version to install is automatically selected based on the version of Ubuntu on the machine.

Hey,

Has anyone encountered any problems with Z-Push ? I can login to xxx.xxx/Microsoft-Server-ActiveSync from a browser, but from mobile or desktop apps i get this error:

12/10/2022 19:38:15 [32828] [FATAL] [xxxx@xxxx.xxx] Fatal error: /usr/local/lib/z-push/backend/ipcsharedmemory/ipcsharedmemoryprovider.php:45 - Uncaught Error: Object of class SysvSemaphore could not be converted to string in /usr/local/lib/z-push/backend/ipcsharedmemory/ipcsharedmemoryprovider.php:45
Stack trace:
#0 /usr/local/lib/z-push/backend/ipcsharedmemory/ipcsharedmemoryprovider.php(45): sprintf()
#1 /usr/local/lib/z-push/lib/core/interprocessdata.php(93): IpcSharedMemoryProvider->__construct()
#2 /usr/local/lib/z-push/lib/core/topcollector.php(49): InterProcessData->__construct()
#3 /usr/local/lib/z-push/lib/core/zpush.php(534): TopCollector->__construct()
#4 /usr/local/lib/z-push/lib/core/devicemanager.php(87): ZPush::GetTopCollector()
#5 /usr/local/lib/z-push/lib/core/zpush.php(506): DeviceManager->__construct()
#6 /usr/local/lib/z-push/index.php(100): ZPush::GetDeviceManager()
#7 {main}
  thrown (1)

just fired up a U22.04 and copied over the /home/user-data directory then ran the sudo—bash command.

Seem everything is installed (no error from the below during installation)

Installing Z-Push (Exchange/ActiveSync server)…

However:

root@mail:~/mailinabox# z-push-admin
Command 'z-push-admin' not found, but can be installed with:
apt install z-push-common
root@mail:~/mailinabox#

is Z-Push-Admin installed?

If you install → apt install z-push-common
then:

apt install z-push-common
root@mail:~# z-push-admin -a lastsync

FatalMisconfigurationException: No Backend provider can be found. Check your installation and/or configuration!
root@mail:~#

I found a fix for this on kopano forums.

  1. Edit /usr/local/lib/z-push/backend/ipcsharedmemory/ipcsharedmemoryprovider.php and replace line 45 with this:
if ($this->initSharedMem())
          ZLog::Write(LOGLEVEL_DEBUG, sprintf("%s(): Initialized %s and %s.", $class, $this->mutexid::class, $this->memid::class));
  1. Edit /usr/local/lib/z-push/policies.ini and set:
maxattsize = '-1'
1 Like

still get

root@mail:~# z-push-admin -a lastsync

FatalMisconfigurationException: No Backend provider can be found. Check your installation and/or configuration!
root@mail:~#

That’s because Mail-in-a-box uses apt-get -qq -s upgrade to get a list of what packages would be upgraded if you would run apt-get upgrade. Usually the output of this command would be empty when there are no packages to upgrade, but since Canonical decided to add advertisements to it, the output looks like this:

apt-get -qq -s upgrade
Try Ubuntu Pro beta with a free personal subscription on up to 5 machines.
Learn more at https://ubuntu.com/pro

…so Mail-in-a-Box assumes that the two lines are referring to packages that should be updated, when they are in fact just advertisements for Ubuntu Pro.

3 Likes

Just deployed coming from v57a and Backblaze. Really had minimal issues.

  • Launched a new 22.04 instance on Linode, updated and upgraded.
  • Ran fresh installation of MIAB v60
  • Downloaded the b2-linux all-in-one tool from Backblaze, chmod +x ./b2-linux
  • mkdir /root/backup
  • ./b2-linux authorize-account ####### #########
  • ./b2-linux sync b2://bucketname/* /root/backup/
  • duplicity restore --force file:///root/restore/ /home/user-data/

On the duplicity command, I did encounter an error, even with the --force option, where it wouldn’t overwrite a pem file. Once I manually deleted it and ran it again, the restore succeeded.

Overall, a good experience, although some more documentation on how to restore from a backup is sorely needed, especially for those doing this upgrade from 57a. I’m sure it will come with time.

does

z-push-admin -a  lastsync

work for you?

root@box:~# z-push-admin -a lastsync
Command ‘z-push-admin’ not found, but can be installed with:
apt install z-push-common

So, I’ve upgraded my mail server to MIAB v0.60. Not everything went smoothly, but part of it was my fault.

First I tried to update Ubuntu from 18 to 22, which went fine, but MIAB didn’t install. I got some python error when the the MIAB control interface tried to install.

I have my mail server on a VPS, so I made a copy of /home/user-data, re-initialised my VPS with Ubuntu 22, restored user-data and re-installed MIAB v0.60.

It went rather well, and MIAB correctly saw my old data and all my domains, users and aliases came over just fine.

The only glitch was that Nextcloud somehow ended up without the contacts and calendar apps correctly activated. NC claimed they were activated, but the didn’t appear. I used ‘occ’ to disable both apps, and then enable them, and that fixed the problem.

I wasted a couple of hours updating ubuntu for nothing, so don’t even try that route. It won’t work.

3 Likes

do you use ActiveSync / Z-Push – can you confirm it is working? do you have any phones actively connecting to it?