beautified the file and added opendkim

This commit is contained in:
Rouven Seifert 2022-12-17 12:58:27 +01:00
parent ffae1bc8c5
commit 14ad30e65d
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09

View file

@ -1,15 +1,17 @@
{ config, pkgs, ... }:
let hostname = "mail.test.stramke.com";
let
hostname = "mail.test.stramke.com";
domain = "test.stramke.com";
in {
networking.firewall.allowedTCPPorts = [ 25 587 143 ];
services = {
postfix = {
enable = true;
hostname = "${hostname}";
domain = "test.stramke.com";
domain = "${domain}";
relayHost = "";
origin = "test.stramke.com";
destination = ["mail.test.stramke.com" "test.stramke.com" "localhost"];
origin = "${domain}";
destination = ["${hostname}" "${domain}" "localhost"];
config = {
mynetworks = "168.119.135.69/32 10.0.0.0/24 0.0.0.0/0 127.0.0.1";
smtpd_recipient_restrictions = [
@ -62,6 +64,14 @@
}
'';
};
rspamd = {
enable = true;
};
opendkim = {
enable = true;
selector = "mail";
domains = "csl:${domain}";
};
};
}