rspamd: whitelist tu networks

This commit is contained in:
Rouven Seifert 2023-11-01 22:45:21 +01:00
parent c038ea7ed9
commit a9d4543da7
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09

View file

@ -292,7 +292,18 @@ in
} }
''; '';
"multimap.conf".text = '' "multimap.conf".text =
let
local_ips = pkgs.writeText "localhost.map" ''
::1
127.0.0.1
'';
tud_ips = pkgs.writeText "tud.map" ''
141.30.0.0/16
141.76.0.0/16
'';
in
''
WHITELIST_SENDER_DOMAIN { WHITELIST_SENDER_DOMAIN {
type = "from"; type = "from";
filter = "email:domain"; filter = "email:domain";
@ -322,6 +333,15 @@ in
action = "reject"; action = "reject";
regexp = true; regexp = true;
} }
RECEIVED_LOCALHOST {
type = "ip";
action = "accept";
map = ${local_ips};
}
RECEIVED_TU_NETWORKS {
type = "ip";
map = ${tud_ips};
}
''; '';
}; };