[Watchdog] Fix for Rspamd 2.0

master
andryyy 2019-10-12 13:15:36 +02:00
parent ee57b5921f
commit 0089f72f3d
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
3 changed files with 8 additions and 11 deletions

View File

@ -1,4 +1,4 @@
FROM debian:stretch-slim
FROM debian:buster-slim
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
ARG DEBIAN_FRONTEND=noninteractive
@ -69,20 +69,16 @@ RUN groupadd -g 5000 vmail \
libunicode-string-perl \
liburi-perl \
libwww-perl \
mysql-client \
mariadb-client \
procps \
python3 \
python3-html2text \
python3-jinja2 \
python3-mysql.connector \
python3-redis \
python3-pip \
redis-server \
supervisor \
syslog-ng \
syslog-ng-core \
syslog-ng-mod-redis \
&& apt-key adv --fetch-keys https://repo.dovecot.org/DOVECOT-REPO-GPG \
&& echo 'deb https://repo.dovecot.org/ce-2.3-latest/debian/stretch stretch main' > /etc/apt/sources.list.d/dovecot.list \
&& echo 'deb https://repo.dovecot.org/ce-2.3-latest/debian/buster buster main' > /etc/apt/sources.list.d/dovecot.list \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
dovecot-lua \
@ -95,10 +91,11 @@ RUN groupadd -g 5000 vmail \
dovecot-pop3d \
dovecot-imapd \
dovecot-solr \
&& pip3 install mysql-connector-python html2text jinja2 redis \
&& apt-get autoremove --purge -y \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/* /etc/cron.daily/*
&& rm -rf /tmp/* /var/tmp/* /etc/cron.daily/* /root/.cache/
COPY trim_logs.sh /usr/local/bin/trim_logs.sh
COPY clean_q_aged.sh /usr/local/bin/clean_q_aged.sh

View File

@ -1,4 +1,4 @@
@version: 3.8
@version: 3.19
@include "scl.conf"
options {
chain_hostnames(off);

View File

@ -518,7 +518,7 @@ rspamd_checks() {
From: watchdog@localhost
Empty
' | usr/bin/curl -s --data-binary @- --unix-socket /var/lib/rspamd/rspamd.sock http://rspamd/scan | jq -rc .required_score)
' | usr/bin/curl -s --data-binary @- --unix-socket /var/lib/rspamd/rspamd.sock http://rspamd/scan | jq -rc .default.required_score)
if [[ ${SCORE} != "9999" ]]; then
echo "Rspamd settings check failed" 2>> /tmp/rspamd-mailcow 1>&2
err_count=$(( ${err_count} + 1))