services/mail: DMARC and domainkey TXT records

This commit is contained in:
kat witch 2021-04-26 17:42:15 +01:00
parent ffa8dcc8af
commit a81ee6c2e7
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72

View file

@ -1,10 +1,15 @@
{ config, lib, pkgs, witch, sources, ... }:
{ config, lib, tf, pkgs, witch, sources, ... }:
with lib;
{
imports = [ sources.nixos-mailserver.outPath ];
deploy.tf.variables.domainkey_kitty = {
type = "string";
value.shellCommand = "bitw get infra/domainkey-kitty";
};
deploy.tf.dns.records.kittywitch_mx = {
tld = "kittywit.ch.";
domain = "@";
@ -20,6 +25,18 @@ with lib;
txt.value = "v=spf1 ip4:168.119.126.111 ip6:${(head config.networking.interfaces.enp1s0.ipv6.addresses).address} -all";
};
deploy.tf.dns.records.kittywitch_dmarc = {
tld = "kittywit.ch.";
domain = "_dmarc";
txt.value = "v=DMARC1; p=none";
};
deploy.tf.dns.records.kittywitch_domainkey = {
tld = "kittywit.ch.";
domain = "mail._domainkey";
txt.value = tf.variables.domainkey_kitty.ref;
};
mailserver = {
enable = true;
fqdn = "athame.kittywit.ch";