Repository navigation
In progress
Labels
milestone goal 👑This describes an announced milestone goalverifiedAll test cases were verified successfully
Milestone
Description
The Mail application runs Dovecot 2.3, which is no longer developed: new features and fixes go into Dovecot 2.4. Dovecot 2.4 configuration is not compatible with 2.3, so the upgrade needs a migration of every existing mail server, which must happen during the normal application update, without manual steps and without losing messages or settings.
Proposed solution
- Build the Mail application image with Dovecot 2.4 and rewrite its configuration for the new syntax.
- Migrate existing installations during the application update: generated configuration, admin customizations where supported, Sieve filters, quotas, shared folders, and the master user used by other applications.
- Keep mailbox data in place: no conversion of mail storage is expected, but indexes may be rebuilt.
- Check every integration that talks to Dovecot: Postfix SASL authentication, Rspamd spam training, Imapsync, WebTop, Roundcube, backup and restore, cloning and moving the application, and restore of a Dovecot 2.3 backup on the new version.
- Review features removed in 2.4 that we may use, and document any change of behavior in the release notes.
Alternative solutions
- Stay on Dovecot 2.3 until a new major Mail version that requires a manual migration: not acceptable, as the upgrade must be automatic for existing installations.
Additional context
SSO support for webmail clients (#8264) should be implemented after this upgrade.
Before changing defaults, PhoneHome data can tell how many installations run the Mail application and which versions.
See also
- Upgrading Dovecot 2.3 to 2.4: https://doc.dovecot.org/latest/installation/upgrade/2.3-to-2.4.html
- https://github.com/NethServer/ns8-mail
Metadata
Metadata
Assignees
Labels
milestone goal 👑This describes an announced milestone goalverifiedAll test cases were verified successfully
Type
Projects
- StatusShow more project fieldsVerified
Activity
DavidePrincipi commentedon Nov 10, 2026
Build:
ghcr.io/nethserver/mail:2.0.0-beta.1(NethServer/ns8-mail#335). It ships as Mail 2.0: going back to 1.x after the update is not supported, so test on a cluster that can be thrown away, or take a backup first.Install it from the testing repository, or update an existing instance on the cluster leader, replacing the instance name:
Test cases
Before the update, on Mail 1.9.x, prepare some users with messages, a folder shared with another user, a public mailbox, a custom quota for one user, a Sieve filter and a file in
local.conf.d(for example aplugin { }block).local.conf.dfile with the 2.3 syntax is renamed to.<name>.<timestamp>.errand a warning is logged, but Dovecot still starts. Thedovecot_custom_config_rejected_countfact counts the rejections.Cases 1-7 were checked on a test cluster updated from 1.9.3. The Robot test suite passes in both the install and the update scenarios.
Merge pull request #341 from NethServer/facts-process-limit
Merge pull request #344 from NethServer/fix-mailboxes-quota-off
DavidePrincipi commentedon Nov 11, 2026
QA on a cluster where a Mail 1.9 backup of a production system was restored, then updated from 1.9.3 to
2.0.0-beta.1. WebTop and Roundcube were restored from the same backup.Old
local.conf.d/myoverride.conf(service imap-login { process_limit = 500 }): kept, not renamed to.err, and applied:doveconf -h service/imap-login/process_limitreturns 500 (default 400). No rejected snippets.8. Spam training ✅ The spam folder of this system is
junkmail(migrated from NS7).junkmail: Rspamdlearned message as spam.junkmail→ INBOX: Rspamdlearned message as ham(unlearn=true, the spam training is reversed).9. Master users and disabled mailboxes ✅ New IMAP (143) and SMTP submission (587) logins after each action:
useruser*masterset-master-usersadds the userset-master-usersremoves the userset-mailbox-enabledfalseset-mailbox-enabledtrueDovecot and Postfix MainPIDs did not change: the reload is enough.
10. Integrations (partial)
<user>*vmail.bad_user_credentials, the right one creates the task.messagesandunseencounts on both sides. Names with dots (Liste/Samba.org) are kept, andShared/is not copied.--maxage=1): a new message is copied once. A second run copies nothing.--sievedelivery2): a new message is filed into the folder chosen by the local user's Sieve script.1m): a new message is copied by the timer within a minute.--maxagesearches bySENTSINCE, so a message without aDate:header is never picked up by an incremental run. Dovecot answersSENTSINCEcorrectly: this is Imapsync behavior, not a regression.127.0.1.1in/etc/hosts, so using the node's own FQDN as remote host fails inside the container withCheck_hostname_or_tcp_port. I used the node IP instead.Side notes:
get-factshung for more than 90s on this system; to be investigated.vmail(WebTop) are logged asimap-postlogin: Error: <5>impersonated login .... It also happens with 1.9, not a regression.DavidePrincipi commentedon Nov 11, 2026
The testing image
ghcr.io/nethserver/mail:2.0.0-beta.2is available. It adds two changes for this issue:dovecot_default_process_limit), so we can see how many installations change the default value (400).DOVECOT_QUOTA_MB). Before, the action crashed and the facts reported a mailbox error.Test cases for verification:
api-cli run module/mail1/get-facts:dovecot_default_process_limitis400. SetDOVECOT_DEFAULT_PROCESS_LIMIT=1000in the moduledovecot.env, restart Dovecot and run it again: the value is1000.runagent -m mail1 python3 -c 'import agent ; agent.set_env("DOVECOT_QUOTA_MB", "")'andrunagent -m mail1 systemctl --user reload dovecot. The Mailboxes page andlist-user-mailboxesload and show no quota, and the facts report no mailbox error.Automated coverage:
tests/40__api/90__facts.robot(Collect facts) andtests/40__api/30__mailboxes.robot(List user mailboxes with the quota plugin disabled).Merge pull request #356 from NethServer/bug-8185
DavidePrincipi commentedon Nov 26, 2026
NethServer/ns8-mail#356 changes how disabled mailboxes are stored and applied in Mail 2.0. It is available in Mail
2.0.0-beta.5from the testing repository.Test cases
Cases marked with ✋ are not covered by the automated test suite, or only in part: they need a manual check.
journalctl --since -5minshows no reload). ✋set-mailbox-enabledwith{"user":"alice","enabled":false,"udesc":"Printer account"};list-user-mailboxesreturnsalicewithenabled: falseand thatudesc.alice*vmail. ✋DOVECOT_DISABLED_USERSvariable is removed from the module environment. ✋systemctl --user status pcdb-initshows that the configuration database was initialized. (covered implicitly: the suite installs Mail and starts the services)pcdb-initloads the backup dump before Postfix and Dovecot start, and the mailbox stays disabled during and after the restore. ✋DavidePrincipi commentedon Nov 27, 2026
QA of Mail
2.0.0-beta.6on Rocky Linux 9.8, core 3.25.1, OpenLDAP user domain. Only the cases marked ✋ in the beta.5 comment were checked by hand.Update from 1.9.3 ✅ All containers running, Dovecot
2.4.5. Disabled mailboxes and the public folders quota are migrated without manual steps (details in #8185 and #8305).Disabled mailboxes (
2.0.0-beta.5test cases)set-mailbox-enabledAPI action, which the UI calls; the UI page itself was not clicked.enabled: false, its description and its custom quota (100 MB). Its message is still in the mailbox (doveadm mailbox status).qa1*qa3) with IMAP, POP3 and SMTP, whileqa1itself cannot.DOVECOT_DISABLED_USERSis removed from the module environment.pcdb-initfinishes before Postfix and Dovecot start, and the mailbox stays disabled during and after the restore. A login loop for the disabled user never succeeded.Still to do
Note: after the restore with "replace", Rspamd of the new instance did not listen on its ports (still held by the replaced instance), and Postfix answered
421 Service unavailableuntil Rspamd was restarted. It is an old limitation of the restore with "replace", not a regression of 2.0.DavidePrincipi commentedon Nov 27, 2026
QA of clone and move, Mail
2.0.0-beta.6updated from 1.9.3, on a two-node cluster (Rocky Linux 9.8, core 3.25.1). The source instance had a mailbox disabled during the update (DOVECOT_DISABLED_USERS), a public mailbox with an address, a 1 MB default quota and messages in the public folders.Clone to node 2 ✅
2.4.5, Rspamd listening on its ports.pcdb-initis skipped by its start condition, as designed.vmailwithout quota limit (2035 KB), users with the 1 MB default.Move to node 2 ✅ (clone with "replace")
Still to do: import from NethServer 7.
DavidePrincipi commentedon Nov 27, 2026
VERIFIED
Import from NethServer 7 (case 8 of the
2.0.0-beta.5test cases) ✅ NethServer 7.9 Enterprise with local LDAP and the mail server, migrated with nethserver-ns8-migration 1.5.0 to Mail2.0.0-beta.6on Rocky Linux 9.8, core 3.25.1. Before the migration:first.userwith 5 messages in INBOX (one with an attachment, one with a non-ASCII subject), a folderArchive.2026with 2 messages, and a forward with a kept copy;second.userwith 3 messages and the mail service disabled; an aliasinfo@with both users as destinations.2.4.5, all containers running.second.useris imported disabled, with the description "Imported from NethServer 7: mail service disabled". Its 3 messages are kept. IMAP, POP3 and SMTP logins fail, and RCPT is rejected with550 5.1.1 ... User unknown in virtual alias table.rootis disabled with the description "Imported from NethServer 7: protects the root mailbox".first.user: same message counts and sizes as on NethServer 7,Archive.2026keeps its name, full-text search and the non-ASCII subject work. IMAP, POP3 and SMTP logins work.info@is imported with both destinations. A message to it reachesfirst.user, and the copy for the disabledsecond.useris dropped with no bounce.With the previous comments, all the test cases of this issue are checked: update from 1.9.3, logins, delivery and Sieve, quota, folders, full-text search, custom configuration, spam training, master users and disabled mailboxes, Imapsync, WebTop and Roundcube, backup and restore, clone and move, and import from NethServer 7.