Skip to content

Commit 291e6ef

Browse files
committed
add RSPAMD_DISABLE_WEB_PASSWORD, closes #330
1 parent 1be033b commit 291e6ef

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ linux/arm64
177177

178178
* `RSPAMD_ENABLE`: Enable Rspamd service. (default `false`)
179179
* `RSPAMD_WEB_PASSWORD`: Rspamd web password (default `null`)
180+
* `RSPAMD_DISABLE_WEB_PASSWORD`: Disable Rspamd web password (default `false`)
180181
* `RSPAMD_NO_LOCAL_ADDRS`: Disable Rspamd local networks (default `false`)
181182
* `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`)
182183

rootfs/etc/cont-init.d/00-env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ POSTFIX_RELAYHOST_SSL_ENCRYPTION=${POSTFIX_RELAYHOST_SSL_ENCRYPTION:-false}
9393

9494
RSPAMD_ENABLE=${RSPAMD_ENABLE:-false}
9595
#RSPAMD_WEB_PASSWORD=${RSPAMD_WEB_PASSWORD:-null}
96+
RSPAMD_DISABLE_WEB_PASSWORD=${RSPAMD_DISABLE_WEB_PASSWORD:-false}
9697
RSPAMD_NO_LOCAL_ADDRS=${RSPAMD_NO_LOCAL_ADDRS:-false}
9798

9899
DKIM_PRIVATE_KEY=/data/dkim/${ANONADDY_DOMAIN}.private

rootfs/etc/cont-init.d/14-config-rspamd.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,15 @@ group "headers" {
8888
}
8989
EOL
9090

91-
if [ -n "$RSPAMD_WEB_PASSWORD" ]; then
91+
if [ -n "$RSPAMD_WEB_PASSWORD" ] || [ "$RSPAMD_DISABLE_WEB_PASSWORD" = "true" ]; then
9292
echo "Setting Rspamd worker-controller.inc"
93+
SECURE_IP="127.0.0.1/32"
94+
if [ "$RSPAMD_DISABLE_WEB_PASSWORD" = "true" ]; then
95+
SECURE_IP="0.0.0.0/0"
96+
fi
9397
cat >/etc/rspamd/local.d/worker-controller.inc <<EOL
9498
bind_socket = "*:11334";
95-
secure_ip = "127.0.0.1/32";
99+
secure_ip = "${SECURE_IP}";
96100
password = "${RSPAMD_WEB_PASSWORD}";
97101
enable_password = "${RSPAMD_WEB_PASSWORD}";
98102
EOL

0 commit comments

Comments
 (0)