From 2cf0e2caa47e34b092249a628b0274effb1526d8 Mon Sep 17 00:00:00 2001 From: crimist Date: Tue, 18 Mar 2025 13:53:31 -0700 Subject: [PATCH] add RSPAMD_SECURE_IP environment variable, closes #330 Allows for direct control of the secure_ip rspamd parameter which can be used to disable the web password. --- README.md | 1 + rootfs/etc/cont-init.d/00-env | 1 + rootfs/etc/cont-init.d/14-config-rspamd.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 41dddb0..8ccc15a 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,7 @@ linux/arm64 * `RSPAMD_ENABLE`: Enable Rspamd service. (default `false`) * `RSPAMD_WEB_PASSWORD`: Rspamd web password (default `null`) +* `RSPAMD_SECURE_IP`: Bypass password for IPs in this CIDR. `0.0.0.0/0` to disable password (default `127.0.0.1/32`) * `RSPAMD_NO_LOCAL_ADDRS`: Disable Rspamd local networks (default `false`) * `RSPAMD_SMTPD_MILTERS`: A list of Milter (space or comma as separated) applications for new mail that arrives (default `inet:127.0.0.1:11332`) diff --git a/rootfs/etc/cont-init.d/00-env b/rootfs/etc/cont-init.d/00-env index 4f8848d..18d9df9 100755 --- a/rootfs/etc/cont-init.d/00-env +++ b/rootfs/etc/cont-init.d/00-env @@ -93,6 +93,7 @@ POSTFIX_RELAYHOST_SSL_ENCRYPTION=${POSTFIX_RELAYHOST_SSL_ENCRYPTION:-false} RSPAMD_ENABLE=${RSPAMD_ENABLE:-false} #RSPAMD_WEB_PASSWORD=${RSPAMD_WEB_PASSWORD:-null} +RSPAMD_SECURE_IP=${RSPAMD_SECURE_IP:-127.0.0.1/32} RSPAMD_NO_LOCAL_ADDRS=${RSPAMD_NO_LOCAL_ADDRS:-false} DKIM_PRIVATE_KEY=/data/dkim/${ANONADDY_DOMAIN}.private diff --git a/rootfs/etc/cont-init.d/14-config-rspamd.sh b/rootfs/etc/cont-init.d/14-config-rspamd.sh index 749cdb8..dfef2ea 100755 --- a/rootfs/etc/cont-init.d/14-config-rspamd.sh +++ b/rootfs/etc/cont-init.d/14-config-rspamd.sh @@ -92,7 +92,7 @@ if [ -n "$RSPAMD_WEB_PASSWORD" ]; then echo "Setting Rspamd worker-controller.inc" cat >/etc/rspamd/local.d/worker-controller.inc <