From 8559de7ae6a2dea2c737b5a1205c18b2c75baad9 Mon Sep 17 00:00:00 2001 From: andryyy Date: Fri, 16 Dec 2016 08:15:20 +0100 Subject: [PATCH] Fix rspamd settings and dynamic configuration --- data/Dockerfiles/rspamd/Dockerfile | 2 ++ data/conf/rspamd/dynmaps/settings.php | 6 +++--- data/conf/rspamd/local.d/rspamd.conf.local | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/data/Dockerfiles/rspamd/Dockerfile b/data/Dockerfiles/rspamd/Dockerfile index ae1a273f..ed43ef34 100644 --- a/data/Dockerfiles/rspamd/Dockerfile +++ b/data/Dockerfiles/rspamd/Dockerfile @@ -12,6 +12,8 @@ RUN apt-get update \ && apt-get --no-install-recommends -y --force-yes install rspamd RUN echo '.include $LOCAL_CONFDIR/local.d/rspamd.conf.local' > /etc/rspamd/rspamd.conf.local +# "Hardcoded" - we need them +RUN echo 'settings = "http://nginx:8081/settings.php";' > /etc/rspamd/modules.d/settings.conf CMD ["/usr/bin/rspamd","-f", "-u", "_rspamd", "-g", "_rspamd"] diff --git a/data/conf/rspamd/dynmaps/settings.php b/data/conf/rspamd/dynmaps/settings.php index 5fbc66b2..cced89c6 100644 --- a/data/conf/rspamd/dynmaps/settings.php +++ b/data/conf/rspamd/dynmaps/settings.php @@ -55,7 +55,7 @@ while ($row = array_shift($rows)) { WHERE `mailbox`.`username` = :object"); $stmt->execute(array(':object' => $row['object'])); $rows_aliases_2 = $stmt->fetchAll(PDO::FETCH_ASSOC); - while ($row_aliases_2 = array_shift($rows_aliases_2)) { + while ($row_aliases_2 = array_filter(array_shift($rows_aliases_2))) { ?> rcpt = ""; execute(array(':object' => $row['object'])); $rows_aliases_wl_2 = $stmt->fetchAll(PDO::FETCH_ASSOC); - while ($row_aliases_wl_2 = array_shift($rows_aliases_wl_2)) { + while ($row_aliases_wl_2 = array_filter(array_shift($rows_aliases_wl_2))) { ?> rcpt = ""; execute(array(':object' => $row['object'])); $rows_aliases_wl_2 = $stmt->fetchAll(PDO::FETCH_ASSOC); - while ($row_aliases_wl_2 = array_shift($rows_aliases_wl_2)) { + while ($row_aliases_wl_2 = array_filter(array_shift($rows_aliases_wl_2))) { ?> rcpt = "";