From b600af4ff5d87f4976531ee1fa34294690bc5f2a Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Thu, 15 May 2025 00:44:17 +0100 Subject: [PATCH] feat: add the gateway ip to teh rspamd whitelist --- applications/email.nix | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/applications/email.nix b/applications/email.nix index ec5e2a6..9c972b4 100644 --- a/applications/email.nix +++ b/applications/email.nix @@ -563,14 +563,23 @@ in { }; # tune the spam filter - /* - services.rspamd.extraConfig = '' - actions { - reject = null; # Disable rejects, default is 15 - add_header = 7; # Add header when reaching this score - greylist = 4; # Apply greylisting when reaching this score - } - ''; - */ + services.rspamd.locals = { + "multimap.conf" = { + text = '' + IP_WHITELIST { + type = "ip"; + prefilter = true; + map = "/etc/rspamd/local.d/ip_whitelist.map"; + action = "accept"; + } + ''; + }; + + "ip_whitelist.map" = { + text = '' + 193.1.99.86 + ''; + }; + }; }; }