From 8822eb57c88d6e2ae8077d704bcb0ba5d9e030bb Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Mon, 17 Apr 2017 15:11:36 +0200 Subject: [PATCH] Forwarding hosts in rspamd --- data/conf/rspamd/dynmaps/settings.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/data/conf/rspamd/dynmaps/settings.php b/data/conf/rspamd/dynmaps/settings.php index 9be1f696..80b046df 100644 --- a/data/conf/rspamd/dynmaps/settings.php +++ b/data/conf/rspamd/dynmaps/settings.php @@ -31,6 +31,30 @@ catch (PDOException $e) { ?> settings { + whitelist_forwarding_hosts { + priority = high; +query("SELECT `host` FROM `forwarding_hosts`"); + $rows = $stmt->fetchAll(PDO::FETCH_COLUMN); +} +catch (PDOException $e) { + $rows = array(); +} + +foreach ($rows as $host) { + echo "\t\t" . 'ip = "' . $host . '";' . "\n"; +} +?> + apply "default" { + actions { + reject = 999.9; + } + } + symbols [ + "WHITELIST_FORWARDING_HOST" + ] + } query("SELECT DISTINCT `object` FROM `filterconf` WHERE `option` = 'highspamlevel' OR `option` = 'lowspamlevel'"); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);