From 2b3800b9c7776b674a29959f18dfc09b9c4a00c3 Mon Sep 17 00:00:00 2001 From: talyz Date: Thu, 18 Feb 2021 17:26:20 +0100 Subject: [PATCH] nixos/gitlab: Change default SMTP port, enable postfix only if used Change the default SMTP port to `25`, to better match the default address `localhost`. This gets rid of some error outputs in the test, where it fails to connect to localhost:465. Also, don't enable postfix by default unless it's actually useful to us. --- nixos/doc/manual/release-notes/rl-2105.xml | 7 +++++++ nixos/modules/services/misc/gitlab.nix | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2105.xml b/nixos/doc/manual/release-notes/rl-2105.xml index 302a6d3f3749..6868cea4a77c 100644 --- a/nixos/doc/manual/release-notes/rl-2105.xml +++ b/nixos/doc/manual/release-notes/rl-2105.xml @@ -523,6 +523,13 @@ self: super: as an hardware RNG, as it will automatically run the krngd task to periodically collect random data from the device and mix it into the kernel's RNG. + + The default SMTP port for GitLab has been changed to + 25 from its previous default of + 465. If you depended on this default, you + should now set the + option. + diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 91a6cd90064c..0f01e36e6912 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -424,7 +424,7 @@ in { port = mkOption { type = types.int; - default = 465; + default = 25; description = "Port of the SMTP server for Gitlab."; }; @@ -684,7 +684,7 @@ in { }; # Use postfix to send out mails. - services.postfix.enable = mkDefault true; + services.postfix.enable = mkDefault (cfg.smtp.enable && cfg.smtp.address == "localhost"); users.users.${cfg.user} = { group = cfg.group;