Version 60 for Ubuntu 22.04 is released

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?

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

Ok,

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 https://mailinabox.email/setup.sh | 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.
password: 
 (again): 
***<!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?