Hi everyone,
Mail-in-a-Box officially supports Ubuntu 22.04, whose standard support ends in April 2027. On 22.04 it still runs PHP 8.0, which has been end-of-life since November 2023. Our own box was in the same position. We had put off a real upgrade for too long, because there
was no supported path to a newer Ubuntu.
The PHP remote code execution vulnerability disclosed in October 2026 was the push we needed. After patching around it by hand, we decided to finally upgrade the whole stack properly. We built and tested an unofficial fork for Ubuntu 26.04, based on v78 and on the
26.04 port in PR #2603. We think others may find it useful:
GitHub - LM1337/Mail-in-a-box-26: Unofficial Mail-in-a-Box fork for Ubuntu 26.04: current packages (PHP 8.5, Nextcloud 34, Dovecot 2.4, Roundcube 1.7), full-text search, adaptive fail2ban, in-place upgrade and migration tools · GitHub (current release: v78-r2604.1)
What it is
- Mail-in-a-Box v78 on Ubuntu 26.04: Dovecot 2.4, Postfix 3.10, PHP 8.5 from Ubuntu, Nextcloud 34, Roundcube 1.7, and Z-Push 2.7.7 with fixes for PHP 8.5.
- Three ways to get there:
- a fresh install;
- a migration tool that moves a 22.04 box to a new 26.04 server;
- an in-place upgrade tool for boxes on 22.04 or 24.04. It runs do-release-upgrade for you, resumes after the reboots, and keeps a fallback SSH server open while the release upgrade runs.
- A few additions: full-text search (fts_xapian), adaptive fail2ban with ActiveSync protection and its own control panel page, and an update-check tool that records the box’s state before and after an update and compares them.
How it was tested
- Every release went through a matrix of test runs from snapshots of seeded boxes: fresh install, migration, in-place upgrades from 22.04 and 24.04, and updates from earlier fork releases under client load.
- For the final release we also did a fresh install on the Internet, with real DNS, Let’s Encrypt certificates and mail to and from an external provider.
- Our own production box has run the fork since the release candidates. It was upgraded in place from 24.04 and then updated to each release.
What’s next: Punk-in-a-Box
This fork is the first step. It stays close to Mail-in-a-Box, so that it remains a drop-in way to get existing boxes onto 26.04, and we will keep maintaining it.
On top of it we are building Punk-in-a-Box, a fork of our fork with more features and a redesign. It will reuse the parts that this fork’s test matrix has already proven: the install, migration and upgrade paths, and the testing. What we are planning:
- a redesigned control panel;
- a modern webmail client as the main web interface;
- DMARC reporting and more admin tools;
- a path to newer Nextcloud versions without depending on user_external.
We will announce it here when there is something to try.
Please note
- This is not an official Mail-in-a-Box release and is not affiliated with the project.
- We spent many hours testing it: fresh installs, migrations, in-place upgrades and updates, across Ubuntu 22.04, 24.04 and 26.04 and many different situations. Even so, every box is different, so please make a full backup before you try it, and keep it somewhere
other than the box itself. - The README explains each path step by step, including how long an in-place upgrade takes. Plan 1–3 hours of mail downtime for it.