From 356ac2e505d52604a69c976a1a1dfc58dde866f9 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Wed, 17 Jul 2024 00:52:55 +0100 Subject: [PATCH] fix: move the mailserver dns config to the proper file --- applications/dns/dns.nix | 5 ----- applications/email.nix | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/applications/dns/dns.nix b/applications/dns/dns.nix index 6c355e2..96dd70a 100644 --- a/applications/dns/dns.nix +++ b/applications/dns/dns.nix @@ -74,11 +74,6 @@ @ NS ns2.${domain}. ; @ stands for teh root domain so teh A record below is where ${domain} points to ;@ A 193.1.99.76 - ;@ MX 5 ${domain}. - - ; can have multiple mailserves - @ MX 10 mail.${domain}. - ; ------------------------------------------ ; Server Names (A Records) diff --git a/applications/email.nix b/applications/email.nix index f16a3e4..e988b0d 100644 --- a/applications/email.nix +++ b/applications/email.nix @@ -268,6 +268,14 @@ in { # set up dns record for it services.skynet.dns.records = [ + # core record + { + record = "@"; + r_type = "MX"; + # the number is the priority in teh case of multiple mailservers + value = "10 mail.${cfg.domain}."; + } + # basic one { record = "mail";