From 5051e2f88d5268a04ae12989bfb4696030105382 Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Sat, 9 Nov 2024 12:26:08 -0600 Subject: [PATCH] Customize bounce template for mailserver The default template tells you to "please send mail to postmaster" which isn't very actionable (what's the postmaster?). This directs people to a place where they can actually get help. --- .../modules/mailserver/default.nix | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/non-critical-infra/modules/mailserver/default.nix b/non-critical-infra/modules/mailserver/default.nix index 4573440c..ddcc0ef9 100644 --- a/non-critical-infra/modules/mailserver/default.nix +++ b/non-critical-infra/modules/mailserver/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, pkgs, ... }: { imports = [ ./mailing-lists.nix ]; @@ -16,4 +16,50 @@ # TODO: change to `nixos.org` when ready domains = [ "mail-test.nixos.org" ]; }; + + services.postfix.config.bounce_template_file = "${pkgs.writeText "bounce-template.cf" '' + failure_template = <