[Dovecot] sa-rules: escape non-regex in regex

master
andryyy 2019-10-30 14:39:25 +01:00
parent 59df735aa8
commit 2f3f70dd00
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 2 additions and 0 deletions

View File

@ -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 | \