Version 60 for Ubuntu 22.04 is released

Anyone successfully tried in-place upgrade?

1 Like

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

2 Likes

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.

HTH

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 https://mailinabox.email/setup.sh | 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/main.py”, line 9, in
from pip._internal.cli.autocompletion import autocomplete
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/cli/autocompletion.py”, 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/main_parser.py”, line 8, in
from pip._internal.cli import cmdoptions
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/cli/cmdoptions.py”, line 23, in
from pip._internal.cli.parser import ConfigOptionParser
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/cli/parser.py”, line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/configuration.py”, line 26, in
from pip._internal.utils.logging import getLogger
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/utils/logging.py”, 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/misc.py”, 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/init.py”, line 14, in
from . import _distutils, _sysconfig
File “/usr/local/lib/mailinabox/env/lib/python3.6/site-packages/pip/_internal/locations/_distutils.py”, line 9, in
from distutils.cmd import Command as DistutilsCommand
File “/usr/local/lib/mailinabox/env/lib/python3.6/distutils/init.py”, 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.

2 Likes

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 my.box.here systemd[1]: Starting A high performance web server and a reverse proxy server…
Oct 16 09:50:41 my.box.here 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 my.box.here nginx[9521]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 16 09:50:41 my.box.here systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Oct 16 09:50:41 my.box.here systemd[1]: nginx.service: Failed with result ‘exit-code’.
Oct 16 09:50:41 my.box.here systemd[1]: Failed to start A high performance web server and a reverse proxy server.

Any ideas what went wrong or how to correct?
Thanks.

@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

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

https://your-domain-here.tld/Microsoft-Server-ActiveSync

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 z-push.org 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 https://mailinabox.email/setup.sh | 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.

Migration went well for me. Only issue I had was with DNSSEC, I had to remove it temporarily in order to apply changes to the glue records. That was the reason my glue records showed up as “Not set” on MIAB. Felt like leaving this here in case someone has that same issue and happens to see this.

reviewing the code on github it seems these two lines were removed:

ln -s /usr/local/lib/z-push/z-push-admin.php /usr/sbin/z-push-admin
ln -s /usr/local/lib/z-push/z-push-top.php /usr/sbin/z-push-top

Adding that back manually fixes z-push-admin for me
Wondering if it does for you?

See for yourself:

Hi everybody,

I’am glad to discover there is an update, i have questions about the migration,
i use nextcloud contact and calendars features with MiaB.

is there any others additional migration process related to contact and calendars ?

thx

@JoshData So, the upgrade went great - no big issues I couldn’t figure out. Checked on my system after the upgrade and the z-push links were missing after the upgrade. So went ahead and added them. See there is a draft PR to update this for the next version.

Just wanted to add another confirmation, in place upgrade worked, had to run LTS upgrade twice to get to 22.04 and the above operation mentioned by Wherewolf before running setup script and it all went smoothly. Didn’t have to restore backup with duplicity or anything.

Full operation I performed

# backed up as mentioned in box migration instructions just incase
curl -s https://mailinabox.email/setup.sh | sudo bash
sudo apt update
sudo apt upgrade 
reboot 
sudo nano /etc/update-manager/release-upgrades
  - uncomment Prompt=lts , and comment Prompt=never
sudo do-release-upgrade
  - select no for every option on replacing configs and agree to remove outdated packages, confirm reboot
sudo do-release-upgrade
  - select no for every option on replacing configs and agree to remove outdated packages, confirm reboot
sudo mv /usr/local/lib/mailinabox/env/bin/pip3 /usr/local/lib/mailinabox/env/bin/pip3-old
sudo mv /usr/local/lib/mailinabox/env/bin/python3 /usr/local/lib/mailinabox/env/bin/python3-old
sudo ln -s /usr/bin/pip3 /usr/local/lib/mailinabox/env/bin/pip3
sudo ln -s /usr/bin/python3 /usr/local/lib/mailinabox/env/bin/python3
curl -s https://mailinabox.email/setup.sh | sudo bash
  - just smash that enter button
sudo nano /etc/update-manager/release-upgrades
  - uncomment Prompt=never , and comment Prompt=lts

Love this mail management service, thanks to all the people past and present who have contributed to the project.

6 Likes

Had no issue with NextCloud retaining files and contacts with in place upgrade risk I took, all seems to be there.