From 3b59947673cc6ce482b67951b8e22c209afa76eb Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Thu, 21 Sep 2023 21:20:48 +0200 Subject: [PATCH] rspamd: configure dynamic blacklisting --- modules/mail/default.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/mail/default.nix b/modules/mail/default.nix index 54983eb..a71a9d5 100644 --- a/modules/mail/default.nix +++ b/modules/mail/default.nix @@ -260,6 +260,31 @@ in "milter_headers.conf".text = '' use = ["x-spam-level", "x-spam-status"]; ''; + "multimap.conf".text = '' + WHITELIST_SENDER_DOMAIN { + type = "from"; + filter = "email:domain"; + map = "/var/lib/rspamd/whitelist.sender.domain.map"; + action = "accept"; + } + WHITELIST_SENDER_EMAIL { + type = "from"; + map = "/var/lib/rspamd/whitelist.sender.email.map"; + action = "accept"; + } + BLACKLIST_SENDER_DOMAIN { + type = "from"; + filter = "email:domain"; + map = "/var/lib/rspamd/blacklist.sender.domain.map"; + action = "reject"; + } + BLACKLIST_SENDER_EMAIL { + type = "from"; + map = "/var/lib/rspamd/blacklist.sender.email.map"; + action = "reject"; + } + + ''; }; }; redis = {