1 (edited by AGI 2024-04-28 18:15:51)

Topic: Upgrading to Ubuntu 22.04 and PHP 8.1

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.8
- Deployed with iRedMail Easy or the downloadable installer? Yes
- Linux/BSD distribution name and version: Ubuntu Server 22.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

With the additional helpful information posted by ZhangHuangbin and dave.opc in upgrading to Ubuntu 22.04 and PHP 8.1 is there any unforeseen issues, I made a second attempt to upgrade from Ubuntu Server 20.04 LTS to 22.04 LTS.

Commenting out the Metric {} block in /etc/dovecot/dovecot.conf solved the errors seen during the upgrade regarding dovecot and after restarting the service, dovecot was happy.

During the upgrade from 20.04 LTS to 22.04 LTS (where you always have to chose 'N' when asked whether the keep the existing config file or whether to overwrite it with the new version), sogo and sogo activesync were uninstalled and the repository commented out in /etc/apt/sources.list.

After the upgrade, I uncommented the repository in /etc/apt/sourced.list and changed the line to

deb https://packages.sogo.nu/nightly/5/ubuntu/ jammy jammy

At this stage, you will get an error for that repository when doing

sudo apt update

I solved this by following method 1 in this post

After having done that

sudo apt update

was error-free, and I reinstalled sogo and sogo activesync. Luckily, the /etc/sogo directory and the sogo.config file had not been erased during the upgrade.

Don't also forget to enable the new php version by:

cp /etc/php/7.4/fpm/pool.d/www.conf /etc/php/8.1/fpm/pool.d/www.conf
systemctl restart php8.1-fpm.service

I then checked my database via adminer and I saw in all the tables the following error in red:

cannot load from mysql.proc. the table is probably corrupted

After having forced an upgrade of the database by:

$ mysql_upgrade --force --force -u root -p

those errors were also gone.

I think my iRedmail server is happy again, time will tell. In any case, not an entirely pain-free exercise and backing up your system before upgrading is highly highly recommended ...

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.