From 2f3f70dd004e94ac80f5ea1704113d90d7f922a5 Mon Sep 17 00:00:00 2001 From: andryyy Date: Wed, 30 Oct 2019 14:39:25 +0100 Subject: [PATCH] [Dovecot] sa-rules: escape non-regex in regex --- data/Dockerfiles/dovecot/sa-rules.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/Dockerfiles/dovecot/sa-rules.sh b/data/Dockerfiles/dovecot/sa-rules.sh index d208722a..54b0d4ab 100755 --- a/data/Dockerfiles/dovecot/sa-rules.sh +++ b/data/Dockerfiles/dovecot/sa-rules.sh @@ -26,6 +26,8 @@ if gzip -t /tmp/sa-rules-schaal.tar.gz; then cat /tmp/sa-rules-schaal/*cf >> /etc/rspamd/custom/sa-rules fi +sed -i -e 's/\([^\\]\)\$\([^\/]\)/\1\\$\2/g' /etc/rspamd/custom/sa-rules + if [[ "$(cat /etc/rspamd/custom/sa-rules | md5sum | cut -d' ' -f1)" != "${HASH_SA_RULES}" ]]; then CONTAINER_NAME=rspamd-mailcow CONTAINER_ID=$(curl --silent --insecure https://dockerapi/containers/json | \