diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index d7fe84cbf70e..3083141e77f6 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -983,8 +983,7 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2 [services.sitespeed-io](#opt-services.sitespeed-io.enable). - [stalwart-mail](https://stalw.art), an all-in-one email server (SMTP, IMAP, - JMAP). Available as - [services.stalwart-mail](#opt-services.stalwart-mail.enable). + JMAP). Available as `services.stalwart-mail`. - [tang](https://github.com/latchset/tang), a server for binding data to diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index 7f2e0f622c62..9f0bab8129af 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -741,7 +741,7 @@ Use `services.pipewire.extraConfig` or `services.pipewire.configPackages` for Pi - `services.soju` now has a wrapper for the `sojuctl` command, pointed at the service config file. It also has the new option `adminSocket.enable`, which creates a unix admin socket at `/run/soju/admin`. -- `services.stalwart-mail` uses the legacy version 0.6.X as default because newer `stalwart-mail` versions require a [manual upgrade process](https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md). Change [`services.stalwart-mail.package`](#opt-services.stalwart-mail.package) to `pkgs.stalwart-mail` if you wish to switch to the new version. +- `services.stalwart-mail` uses the legacy version 0.6.X as default because newer `stalwart-mail` versions require a [manual upgrade process](https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md). Change `services.stalwart-mail.package` to `pkgs.stalwart-mail` if you wish to switch to the new version. - `services.teeworlds` module now has a wealth of configuration options, including a new `package` option. diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 28cc21b77b4d..10392e1dea75 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -508,8 +508,7 @@ - Legacy package `stalwart-mail_0_6` was dropped, please note the [manual upgrade process](https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md) - before changing the package to `pkgs.stalwart-mail` in - [`services.stalwart-mail.package`](#opt-services.stalwart-mail.package). + before changing the package to `pkgs.stalwart-mail` in `services.stalwart-mail.package`. - `nomad_1_5` and `nomad_1_6` were dropped, as [they have reached end-of-life upstream](https://support.hashicorp.com/hc/en-us/articles/360021185113-Support-Period-and-End-of-Life-EOL-Policy). Evaluating them will throw an error. diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index a6913729e510..b6c19e8cc5de 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -778,7 +778,7 @@ ./services/mail/rss2email.nix ./services/mail/schleuder.nix ./services/mail/spamassassin.nix - ./services/mail/stalwart-mail.nix + ./services/mail/stalwart.nix ./services/mail/sympa.nix ./services/mail/tlsrpt.nix ./services/mail/zeyple.nix diff --git a/nixos/modules/services/mail/stalwart-mail.nix b/nixos/modules/services/mail/stalwart.nix similarity index 84% rename from nixos/modules/services/mail/stalwart-mail.nix rename to nixos/modules/services/mail/stalwart.nix index a0ea04e50a14..5d1263bd794d 100644 --- a/nixos/modules/services/mail/stalwart-mail.nix +++ b/nixos/modules/services/mail/stalwart.nix @@ -5,9 +5,9 @@ ... }: let - cfg = config.services.stalwart-mail; + cfg = config.services.stalwart; configFormat = pkgs.formats.toml { }; - configFile = configFormat.generate "stalwart-mail.toml" cfg.settings; + configFile = configFormat.generate "stalwart.toml" cfg.settings; useLegacyStorage = lib.versionOlder config.system.stateVersion "24.11"; parsePorts = @@ -21,17 +21,22 @@ let in { - options.services.stalwart-mail = { - enable = lib.mkEnableOption "the Stalwart all-in-one email server"; + imports = [ + # since 0.12.0 (2025-05-26) release, upstream re-branded project to 'stalwart' due to inclusion of collaboration features (CalDAV, CardDAV, and WebDAV) + # https://github.com/stalwartlabs/stalwart/releases/tag/v0.12.0 + (lib.mkRenamedOptionModule [ "services" "stalwart-mail" ] [ "services" "stalwart" ]) + ]; + options.services.stalwart = { + enable = lib.mkEnableOption "the all-in-one collaboration and mail server, Stalwart"; - package = lib.mkPackageOption pkgs "stalwart-mail" { }; + package = lib.mkPackageOption pkgs "stalwart" { }; openFirewall = lib.mkOption { type = lib.types.bool; default = false; description = '' Whether to open TCP firewall ports, which are specified in - {option}`services.stalwart-mail.settings.server.listener` on all interfaces. + {option}`services.stalwart.settings.server.listener` on all interfaces. ''; }; @@ -39,7 +44,7 @@ in inherit (configFormat) type; default = { }; description = '' - Configuration options for the Stalwart email server. + Configuration options for the Stalwart collaboration and e-mail server. See for available options. By default, the module is configured to store everything locally. @@ -48,7 +53,7 @@ in dataDir = lib.mkOption { type = lib.types.path; - default = "/var/lib/stalwart-mail"; + default = "/var/lib/stalwart"; description = '' Data directory for stalwart ''; @@ -56,10 +61,10 @@ in credentials = lib.mkOption { description = '' - Credentials envs used to configure Stalwart-Mail secrets. + Credentials envs used to configure Stalwart secrets. These secrets can be accessed in configuration values with the macros such as - `%{file:/run/credentials/stalwart-mail.service/VAR_NAME}%`. + `%{file:/run/credentials/stalwart.service/VAR_NAME}%`. ''; type = lib.types.attrsOf lib.types.str; default = { }; @@ -90,7 +95,7 @@ in ]; # Default config: all local - services.stalwart-mail.settings = { + services.stalwart.settings = { tracer.stdout = { type = lib.mkDefault "stdout"; level = lib.mkDefault "info"; @@ -132,7 +137,7 @@ in ); in { - path = "/var/cache/stalwart-mail"; + path = "/var/cache/stalwart"; resource = lib.mkIf hasHttpListener (lib.mkDefault "file://${cfg.package.webadmin}/webadmin.zip"); }; }; @@ -142,20 +147,20 @@ in # service is restarted on a potentially large number of files. # That would cause unnecessary and unwanted delays. users = { - groups.stalwart-mail = { }; - users.stalwart-mail = { + groups.stalwart = { }; + users.stalwart = { isSystemUser = true; - group = "stalwart-mail"; + group = "stalwart"; }; }; systemd.tmpfiles.rules = [ - "d '${cfg.dataDir}' - stalwart-mail stalwart-mail - -" + "d '${cfg.dataDir}' - stalwart stalwart - -" ]; systemd = { services.stalwart-mail = { - description = "Stalwart Mail Server"; + description = "Stalwart Server"; wantedBy = [ "multi-user.target" ]; after = [ "local-fs.target" @@ -170,7 +175,7 @@ in KillSignal = "SIGINT"; Restart = "on-failure"; RestartSec = 5; - SyslogIdentifier = "stalwart-mail"; + SyslogIdentifier = "stalwart"; ExecStartPre = if useLegacyStorage then @@ -190,12 +195,12 @@ in ReadWritePaths = [ cfg.dataDir ]; - CacheDirectory = "stalwart-mail"; - StateDirectory = "stalwart-mail"; + CacheDirectory = "stalwart"; + StateDirectory = "stalwart"; # Upstream uses "stalwart" as the username since 0.12.0 - User = "stalwart-mail"; - Group = "stalwart-mail"; + User = "stalwart"; + Group = "stalwart"; # Bind standard privileged ports AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ]; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 50c27ec6da79..ee3bf21b8211 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1477,7 +1477,7 @@ in sslh = handleTest ./sslh.nix { }; sssd-ldap = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./sssd-ldap.nix { }; sssd-legacy-config = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./sssd-legacy-config.nix { }; - stalwart-mail = runTest ./stalwart/stalwart-mail.nix; + stalwart = runTest ./stalwart/stalwart.nix; stargazer = runTest ./web-servers/stargazer.nix; starship = runTest ./starship.nix; startx = import ./startx.nix { inherit pkgs runTest; }; diff --git a/nixos/tests/stalwart/stalwart-mail-config.nix b/nixos/tests/stalwart/stalwart-config.nix similarity index 98% rename from nixos/tests/stalwart/stalwart-mail-config.nix rename to nixos/tests/stalwart/stalwart-config.nix index cb2989033763..343f7d9caab8 100644 --- a/nixos/tests/stalwart/stalwart-mail-config.nix +++ b/nixos/tests/stalwart/stalwart-config.nix @@ -7,7 +7,7 @@ in { security.pki.certificateFiles = [ certs.ca.cert ]; - services.stalwart-mail = { + services.stalwart = { enable = true; settings = { server.hostname = domain; diff --git a/nixos/tests/stalwart/stalwart-mail.nix b/nixos/tests/stalwart/stalwart.nix similarity index 86% rename from nixos/tests/stalwart/stalwart-mail.nix rename to nixos/tests/stalwart/stalwart.nix index 6466e648d626..79d1e3415c20 100644 --- a/nixos/tests/stalwart/stalwart-mail.nix +++ b/nixos/tests/stalwart/stalwart.nix @@ -1,4 +1,4 @@ -# Rudimentary test checking that the Stalwart email server can: +# Rudimentary test checking that the Stalwart collaboration server can: # - receive some message through SMTP submission, then # - serve this message through IMAP. @@ -8,13 +8,13 @@ let in { lib, ... }: { - name = "stalwart-mail"; + name = "stalwart"; nodes.main = { pkgs, ... }: { imports = [ - ./stalwart-mail-config.nix + ./stalwart-config.nix ]; environment.systemPackages = [ @@ -57,7 +57,7 @@ in testScript = # python '' - main.wait_for_unit("stalwart-mail.service") + main.wait_for_unit("stalwart.service") main.wait_for_open_port(587) main.wait_for_open_port(143) main.wait_for_open_port(80) @@ -65,14 +65,14 @@ in main.succeed("test-smtp-submission") # restart stalwart to test rocksdb compaction of existing database - main.succeed("systemctl restart stalwart-mail.service") + main.succeed("systemctl restart stalwart.service") main.wait_for_open_port(587) main.wait_for_open_port(143) main.wait_for_open_port(80) main.succeed("test-imap-read") - main.succeed("test -d /var/cache/stalwart-mail/STALWART_WEBADMIN") + main.succeed("test -d /var/cache/stalwart/STALWART_WEBADMIN") main.succeed("curl --fail http://localhost") ''; diff --git a/pkgs/by-name/st/stalwart-cli/package.nix b/pkgs/by-name/st/stalwart-cli/package.nix index 4c9d813e7a2f..4c03d8b3b512 100644 --- a/pkgs/by-name/st/stalwart-cli/package.nix +++ b/pkgs/by-name/st/stalwart-cli/package.nix @@ -2,11 +2,11 @@ lib, rustPlatform, versionCheckHook, - stalwart-mail, + stalwart, }: rustPlatform.buildRustPackage { - inherit (stalwart-mail) src version cargoDeps; + inherit (stalwart) src version cargoDeps; pname = "stalwart-cli"; cargoBuildFlags = [ @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage { dontVersionCheck = true; meta = { - inherit (stalwart-mail.meta) license homepage changelog; + inherit (stalwart.meta) license homepage changelog; description = "Stalwart Mail Server CLI"; mainProgram = "stalwart-cli"; maintainers = with lib.maintainers; [ diff --git a/pkgs/by-name/st/stalwart-mail/package.nix b/pkgs/by-name/st/stalwart/package.nix similarity index 93% rename from pkgs/by-name/st/stalwart-mail/package.nix rename to pkgs/by-name/st/stalwart/package.nix index 4be73405bd7e..84cbea33885f 100644 --- a/pkgs/by-name/st/stalwart-mail/package.nix +++ b/pkgs/by-name/st/stalwart/package.nix @@ -20,7 +20,7 @@ }: rustPlatform.buildRustPackage (finalAttrs: { - pname = "stalwart-mail" + (lib.optionalString stalwartEnterprise "-enterprise"); + pname = "stalwart" + (lib.optionalString stalwartEnterprise "-enterprise"); version = "0.15.4"; src = fetchFromGitHub { @@ -87,7 +87,7 @@ rustPlatform.buildRustPackage (finalAttrs: { mkdir -p $out/lib/systemd/system - substitute resources/systemd/stalwart-mail.service $out/lib/systemd/system/stalwart-mail.service \ + substitute resources/systemd/stalwart-mail.service $out/lib/systemd/system/stalwart.service \ --replace-fail "__PATH__" "$out" ''; @@ -185,20 +185,20 @@ rustPlatform.buildRustPackage (finalAttrs: { webadmin = buildPackages.callPackage ./webadmin.nix { }; spam-filter = callPackage ./spam-filter.nix { }; updateScript = nix-update-script { }; - tests.stalwart-mail = nixosTests.stalwart-mail; + tests.stalwart = nixosTests.stalwart; }; meta = { - description = "Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP)"; - homepage = "https://github.com/stalwartlabs/mail-server"; - changelog = "https://github.com/stalwartlabs/mail-server/blob/main/CHANGELOG.md"; + description = "Secure, modern, and all-in-one mail & collaboration server fluent in IMAP, JMAP, SMTP, CalDAV, CardDAV, and WebDAV"; + homepage = "https://github.com/stalwartlabs/stalwart"; + changelog = "https://github.com/stalwartlabs/stalwart/blob/main/CHANGELOG.md"; license = [ lib.licenses.agpl3Only ] ++ lib.optionals stalwartEnterprise [ { fullName = "Stalwart Enterprise License 1.0 (SELv1) Agreement"; - url = "https://github.com/stalwartlabs/mail-server/blob/main/LICENSES/LicenseRef-SEL.txt"; + url = "https://github.com/stalwartlabs/stalwart/blob/main/LICENSES/LicenseRef-SEL.txt"; free = false; redistributable = false; } diff --git a/pkgs/by-name/st/stalwart-mail/spam-filter.nix b/pkgs/by-name/st/stalwart/spam-filter.nix similarity index 82% rename from pkgs/by-name/st/stalwart-mail/spam-filter.nix rename to pkgs/by-name/st/stalwart/spam-filter.nix index 95fc5e43035c..68f638a11aa4 100644 --- a/pkgs/by-name/st/stalwart-mail/spam-filter.nix +++ b/pkgs/by-name/st/stalwart/spam-filter.nix @@ -2,7 +2,7 @@ lib, fetchFromGitHub, stdenv, - stalwart-mail, + stalwart, nix-update-script, }: @@ -31,13 +31,13 @@ stdenv.mkDerivation (finalAttrs: { }; meta = { - description = "Secure & modern all-in-one mail server Stalwart (spam-filter module)"; + description = "Secure, modern, and all-in-one mail & collaboration server, Stalwart (spam-filter module)"; homepage = "https://github.com/stalwartlabs/spam-filter"; changelog = "https://github.com/stalwartlabs/spam-filter/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = with lib.licenses; [ mit asl20 ]; - inherit (stalwart-mail.meta) maintainers; + inherit (stalwart.meta) maintainers; }; }) diff --git a/pkgs/by-name/st/stalwart-mail/webadmin.nix b/pkgs/by-name/st/stalwart/webadmin.nix similarity index 90% rename from pkgs/by-name/st/stalwart-mail/webadmin.nix rename to pkgs/by-name/st/stalwart/webadmin.nix index e77e8ba4c90d..a61847f30acb 100644 --- a/pkgs/by-name/st/stalwart-mail/webadmin.nix +++ b/pkgs/by-name/st/stalwart/webadmin.nix @@ -1,7 +1,7 @@ { lib, rustPlatform, - stalwart-mail, + stalwart, fetchFromGitHub, trunk, tailwindcss_3, @@ -68,10 +68,10 @@ rustPlatform.buildRustPackage (finalAttrs: { }; meta = { - description = "Secure & modern all-in-one mail server Stalwart (webadmin module)"; + description = "Secure, modern, and all-in-one mail & collaboration server, Stalwart (webadmin module)"; homepage = "https://github.com/stalwartlabs/webadmin"; changelog = "https://github.com/stalwartlabs/webadmin/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.agpl3Only; - inherit (stalwart-mail.meta) maintainers; + inherit (stalwart.meta) maintainers; }; }) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d394294c8125..7c9754b8ef01 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1662,6 +1662,7 @@ mapAliases { src = throw "The \"src\" package has been renamed to \"simple-revision-control\". If you encounter this error and did not intend to use that package you may have a falsely constructed overlay."; # Added 2025-11-19 ssm-agent = throw "'ssm-agent' has been renamed to/replaced by 'amazon-ssm-agent'"; # Converted to throw 2025-10-27 stacer = throw "'stacer' has been removed because it was abandoned upstream and relied upon vulnerable software"; # Added 2025-11-08 + stalwart-mail = warnAlias "'stalwart-mail' has been renamed to/replaced by 'stalwart'" stalwart; # Added 2026-01-19 starpls-bin = throw "'starpls-bin' has been renamed to/replaced by 'starpls'"; # Converted to throw 2025-10-27 station = throw "station has been removed from nixpkgs, as there were no committers among its maintainers to unblock security issues"; # Added 2025-06-16 steam-run-native = throw "'steam-run-native' has been renamed to/replaced by 'steam-run'"; # Converted to throw 2025-10-27 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7d3d396b73cc..1978829a973b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8982,10 +8982,10 @@ with pkgs; enableAirplay2 = true; }; - stalwart-mail-webadmin = stalwart-mail.webadmin; - stalwart-mail-spam-filter = stalwart-mail.spam-filter; + stalwart-webadmin = stalwart.webadmin; + stalwart-spam-filter = stalwart.spam-filter; - stalwart-mail-enterprise = stalwart-mail.override { + stalwart-enterprise = stalwart.override { stalwartEnterprise = true; };