From 6dd628403c2836d194ba123c48f991adee3f3d0f Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Fri, 1 Sep 2023 10:42:22 +0200 Subject: [PATCH] networking: introduce rdns option --- hosts/quitte/network.nix | 1 + modules/mail.nix | 3 ++- modules/options.nix | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hosts/quitte/network.nix b/hosts/quitte/network.nix index 85d477f..e75e9ad 100644 --- a/hosts/quitte/network.nix +++ b/hosts/quitte/network.nix @@ -11,6 +11,7 @@ in networking = { hostId = "a71c81fc"; + rdns = "x8d1e1ea9.agdsn.tu-dresden.de"; enableIPv6 = true; useDHCP = true; interfaces.ens18.useDHCP = true; diff --git a/modules/mail.nix b/modules/mail.nix index d5c3ebf..2256ffe 100644 --- a/modules/mail.nix +++ b/modules/mail.nix @@ -72,7 +72,8 @@ in config = { home_mailbox = "Maildir/"; # hostname used in helo command. It is recommended to have this match the reverse dns entry - smtp_helo_name = "x8d1e1ea9.agdsn.tu-dresden.de"; + # smtp_helo_name = "x8d1e1ea9.agdsn.tu-dresden.de"; + smtp_helo_name = config.networking.rdns; smtp_use_tls = true; # smtp_tls_security_level = "encrypt"; smtpd_use_tls = true; diff --git a/modules/options.nix b/modules/options.nix index dc8f4d5..afe02eb 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -11,4 +11,9 @@ description = "under which top level domain the services should run"; }; }; + options.networking.rdns = mkOption { + type = types.str; + default = networking.fqdn; + description = "The reverse dns record known to be set for this host."; + }; }