spamassassin/scripts/entryPoint.sh

25 lines
438 B
Bash
Raw Normal View History

2025-02-06 16:57:07 +01:00
#!/bin/bash
SPAMD_FLAGS=""
2025-02-06 16:57:07 +01:00
if [ -z ${SPAMD_ALLOWED_IPS} ]; then
echo "No SPAMD_ALLOWED_IPS set, exiting..."
exit 1
fi
if [ -z ${SPAMD_MAX_CHILDREN} ]; then
SPAMD_MAX_CHILDREN=5
fi
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}