From affa52edcf3ce6e41e90e5126d5eb179b2973a78 Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Sat, 22 Apr 2017 18:34:49 +0200 Subject: [PATCH] =?UTF-8?q?Forwarding=20hosts:=20don=E2=80=99t=20add=20con?= =?UTF-8?q?figuration=20if=20none=20are=20defined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/conf/rspamd/dynmaps/settings.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/data/conf/rspamd/dynmaps/settings.php b/data/conf/rspamd/dynmaps/settings.php index 176389db..098ffbd9 100644 --- a/data/conf/rspamd/dynmaps/settings.php +++ b/data/conf/rspamd/dynmaps/settings.php @@ -31,8 +31,6 @@ catch (PDOException $e) { ?> settings { - whitelist_forwarding_hosts { - priority = high; query("SELECT `host` FROM `forwarding_hosts`"); @@ -42,6 +40,12 @@ catch (PDOException $e) { $rows = array(); } +if ($rows) +{ +?> + whitelist_forwarding_hosts { + priority = high; +query("SELECT DISTINCT `object` FROM `filterconf` WHERE `option` = 'highspamlevel' OR `option` = 'lowspamlevel'"); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);