diff --git a/Dockerfile b/Dockerfile index ee7f8e3..be44a48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG ANONADDY_VERSION=1.5.0 +ARG ANONADDY_VERSION=1.6.0 ARG ALPINE_VERSION=3.23 FROM tianon/gosu:latest AS gosu @@ -101,7 +101,6 @@ RUN apk --no-cache add -t build-dependencies \ && git fetch --depth 1 origin "v${ANONADDY_VERSION}" && git checkout -q FETCH_HEAD \ && composer install --optimize-autoloader --no-dev --no-interaction --no-ansi --ignore-platform-req=php-64bit \ && chown -R anonaddy:anonaddy /var/www/anonaddy \ - && npm install --package-lock-only --ignore-scripts --no-audit --no-fund \ && npm ci --ignore-scripts --no-audit --no-fund \ && APP_URL=https://addy-sh.test npm run production \ && chown -R nobody:nogroup /var/www/anonaddy \ diff --git a/rootfs/etc/cont-init.d/14-config-rspamd.sh b/rootfs/etc/cont-init.d/14-config-rspamd.sh index ff1cc40..56bbeb4 100755 --- a/rootfs/etc/cont-init.d/14-config-rspamd.sh +++ b/rootfs/etc/cont-init.d/14-config-rspamd.sh @@ -147,9 +147,14 @@ actions = { } EOL +echo "Setting Rspamd actions.conf" +cat >/etc/rspamd/local.d/actions.conf </etc/rspamd/local.d/milter_headers.conf <= reject_threshold then + should_quarantine = true + quarantine_reason = quarantine_reason or '5.7.1 Spam message rejected' + end + + if should_quarantine then + return nil, + { + ['X-AnonAddy-Should-Quarantine'] = 'Yes', + ['X-AnonAddy-Quarantine-Reason'] = quarantine_reason or '5.7.1 Spam message rejected' + }, + { + ['X-AnonAddy-Should-Quarantine'] = 0, + ['X-AnonAddy-Quarantine-Reason'] = 0 + }, + {} + end + + return nil, + {}, + { + ['X-AnonAddy-Should-Quarantine'] = 0, + ['X-AnonAddy-Quarantine-Reason'] = 0 + }, + {} +end EOD; } EOL