From 3c8dcd902a4bb0d545681bd01a436f495c40cc04 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 3 Jun 2021 13:10:23 +0200 Subject: [PATCH] nixos/mail-exporter: add note about rspamd marking probe mails as spam (cherry picked from commit ba9768f3143c728a47515d0548025a103fca9013) --- .../monitoring/prometheus/exporters/mail.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nixos/modules/services/monitoring/prometheus/exporters/mail.nix b/nixos/modules/services/monitoring/prometheus/exporters/mail.nix index 18c5c4dd162..7e196149fbb 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/mail.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/mail.nix @@ -112,6 +112,24 @@ let ''; description = '' List of servers that should be probed. + + Note: if your mailserver has + rspamd8 configured, + it can happen that emails from this exporter are marked as spam. + + It's possible to work around the issue with a config like this: + + { + services.rspamd.locals."multimap.conf".text = ''' + ALLOWLIST_PROMETHEUS { + filter = "email:domain:tld"; + type = "from"; + map = "''${pkgs.writeText "allowmap" "domain.tld"}"; + score = -100.0; + } + '''; + } + ''; }; };