Fix some postfix startup issues after reboot
Some checks failed
/ dev-shell (push) Successful in 40s
/ rust-packages (push) Successful in 45s
/ check (push) Failing after 54s
/ terraform-providers (push) Successful in 1m7s
/ systems (push) Successful in 3m49s

And enable ARC signing of emails
This commit is contained in:
Kaare Hoff Skovgaard 2025-07-29 11:55:55 +02:00
parent 343c87b279
commit d62c0a32ec
Signed by: khs
GPG key ID: C7D890804F01E9F0
2 changed files with 24 additions and 13 deletions

View file

@ -170,6 +170,15 @@ in
}
'';
};
services.rspamd.locals."arc.conf" = lib.mkForce {
text = ''
enabled = true;
allow_username_mismatch = true;
domain {
${lib.strings.concatStringsSep "\n " (lib.lists.map dkimSigningForDomain cfg.domains)}
}
'';
};
services.postfix.config = {
# Need to include this as I disabled the in built support for dkim signing
# without this postfix won't forward the mails to rspamd to be signed.
@ -183,10 +192,5 @@ in
ReadOnlyPaths = domainKeyPaths;
};
};
systemd.services.postfix = {
unitConfig = {
ConditionPathExists = domainKeyPaths;
};
};
};
}

View file

@ -40,17 +40,24 @@ in
uidAttribute = "uid";
};
};
systemd.services.dovecot2 = {
unitConfig = {
ConditionPathExists = [ secretFile ];
systemd.services = {
dovecot2 = {
unitConfig = {
ConditionPathExists = [ secretFile ];
};
};
postfix = {
unitConfig = {
ConditionPathExists = [ secretFile ];
};
};
postfix-setup = {
unitConfig = {
ConditionPathExists = [ secretFile ];
};
};
};
systemd.services.postfix = {
unitConfig = {
ConditionPathExists = [ secretFile ];
};
};
khscodes.services.vault-agent.templates = [
{
contents = ''