From fce8e7b96e865ea2c2a8f363f37543d1f97f289f Mon Sep 17 00:00:00 2001 From: Gonne Date: Tue, 25 Mar 2025 21:03:15 +0100 Subject: [PATCH] Fix DKIM config --- nixos/modules/mail.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/mail.nix b/nixos/modules/mail.nix index 7bfa96d..5ca57b3 100644 --- a/nixos/modules/mail.nix +++ b/nixos/modules/mail.nix @@ -66,6 +66,7 @@ in { openFirewall = true; settings = { server = { + tracer.stdout.level = "trace"; hostname = "fb04184.mathematik.tu-darmstadt.de"; # Because the DNS PTR of 130.83.2.184 is this and this should be used in SMTP EHLO. listener = { "smtp" = { @@ -240,7 +241,7 @@ in { private-key = "%{file:/run/secrets/dkim_rsa}%"; domain = "${domain}"; selector = "rsa-default"; - headers = ["From" "To" "Cc" "Date" "Subject" "Message-ID" "Organization" "MIME-Version" "Content-Type" "In-Reply-To" "References" "List-Id" "User-Agent" "Thread-Topic" "Thread-Index"]; # default from https://stalw.art/docs/smtp/authentication/dkim/sign#signatures + headers = ["From" "To" "Cc" "Date" "Subject" "Message-ID" "Organization" "MIME-Version" "Content-Type" "In-Reply-To" "References" "List-Id" "Thread-Topic" "Thread-Index"]; # default from https://stalw.art/docs/smtp/authentication/dkim/sign#signatures except "User-Agent" which somehow breaks algorithm = "rsa-sha256"; canonicalization = "relaxed/relaxed"; }; @@ -248,13 +249,13 @@ in { private-key = "%{file:/run/secrets/dkim_ed25519}%"; domain = "${domain}"; selector = "ed-default"; - headers = ["From" "To" "Cc" "Date" "Subject" "Message-ID" "Organization" "MIME-Version" "Content-Type" "In-Reply-To" "References" "List-Id" "User-Agent" "Thread-Topic" "Thread-Index"]; + headers = ["From" "To" "Cc" "Date" "Subject" "Message-ID" "Organization" "MIME-Version" "Content-Type" "In-Reply-To" "References" "List-Id" "Thread-Topic" "Thread-Index"]; # default from https://stalw.art/docs/smtp/authentication/dkim/sign#signatures except "User-Agent" which somehow breaks algorithm = "ed25519-sha256"; canonicalization = "relaxed/relaxed"; }; }; in - map signatureTemplate (["lists.mathebau.de"] ++ (map ({domain, ...}: domain) cfg.domains)); + lib.attrsets.mergeAttrsList (map signatureTemplate (["lists.mathebau.de"] ++ (map ({domain, ...}: domain) cfg.domains))); authentication.fallback-admin = { user = "admin";