From 124c3f4850e97a03db39bdf61331eea150ea0676 Mon Sep 17 00:00:00 2001 From: "@norpol" <2230917+norpol@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:33:12 +0100 Subject: [PATCH] stalwart-mail: add v0.13.x breaking change notice --- doc/release-notes/rl-2511.section.md | 2 ++ nixos/modules/services/mail/stalwart-mail.nix | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index c7cfe224b1a5..26a4ff2e5f0f 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -33,6 +33,8 @@ - `conftest` since `0.60.0` has moved to use rego `v1` as default. To continue using `v0` use `--rego-version v0`. For more information about upgrading to Rego v1 syntax, see the [upstream docs](https://www.openpolicyagent.org/docs/latest/v0-upgrade/). +- `stalwart-mail` since `0.13.0` "introduces a significant redesign of the MTA’s delivery and queueing subsystem". See [the upgrading announcement for the `0.13.0` release](https://github.com/stalwartlabs/stalwart/blob/89b561b5ca1c5a11f2a768b4a2cfef0f473b7a01/UPGRADING.md#upgrading-from-v012x-and-v011x-to-v013x). + - The `archipelago-minecraft` package was removed, as upstream no longer provides support for the Minecraft APWorld. - `tooling-language-server` has been renamed to `deputy` (both the package and binary), following the rename of the upstream project. diff --git a/nixos/modules/services/mail/stalwart-mail.nix b/nixos/modules/services/mail/stalwart-mail.nix index 9975bcc56672..d9d6e119d9f3 100644 --- a/nixos/modules/services/mail/stalwart-mail.nix +++ b/nixos/modules/services/mail/stalwart-mail.nix @@ -71,6 +71,23 @@ in }; config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = + !( + (lib.hasAttrByPath [ "settings" "queue" ] cfg) + && (builtins.any (lib.hasAttrByPath [ + "value" + "next-hop" + ]) (lib.attrsToList cfg.settings.queue)) + ); + message = '' + Stalwart deprecated `next-hop` in favor of "virtual queues" `queue.strategy.route` \ + with v0.13.0 see [Outbound Strategy](https://stalw.art/docs/mta/outbound/strategy/#configuration) \ + and [release announcement](https://github.com/stalwartlabs/stalwart/blob/main/UPGRADING.md#upgrading-from-v012x-and-v011x-to-v013x). + ''; + } + ]; # Default config: all local services.stalwart-mail.settings = {