feat: support setting spamd port and debug
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dominik Meyer 2025-02-06 17:58:06 +01:00
parent 81d88ab648
commit 6164e2ef5c
Signed by: byterazor
GPG Key ID: EABDA0FD5981BC97

View File

@ -1,5 +1,8 @@
#!/bin/bash
SPAMD_FLAGS=""
if [ -z ${SPAMD_ALLOWED_IPS} ]; then
echo "No SPAMD_ALLOWED_IPS set, exiting..."
exit 1
@ -9,4 +12,14 @@ if [ -z ${SPAMD_MAX_CHILDREN} ]; then
SPAMD_MAX_CHILDREN=5
fi
spamd -x --listen '*' --max-children ${SPAMD_MAX_CHILDREN} -D -A ${SPAMD_ALLOWED_IPS}
if [ -z ${SPAMD_PORT} ]; then
SPAMD_PORT=9783
fi
if [ -n ${SPAMD_DEBUG} ]; then
SPAMD_FLAGS="${SPAMD_FLAGS} -D"
fi
spamd -x --listen '*' -p ${SPAMD_PORT} --max-children ${SPAMD_MAX_CHILDREN} -A ${SPAMD_ALLOWED_IPS} ${SPAMD_FLAGS}