@ -43,6 +43,9 @@ HEALTHCHECK --interval=1m --timeout=5s --start-period=10s \
|
|||||||
|
|
||||||
# Run Rspamd
|
# Run Rspamd
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
CMD ["/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"]
|
CMD ["/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"]
|
||||||
|
|
||||||
# Setup Labels
|
# Setup Labels
|
||||||
@ -60,4 +63,4 @@ LABEL org.label-schema.name="Rspamd" \
|
|||||||
org.label-schema.version=$VERSION \
|
org.label-schema.version=$VERSION \
|
||||||
org.label-schema.vcs-url="https://github.com/rspamd/rspamd/" \
|
org.label-schema.vcs-url="https://github.com/rspamd/rspamd/" \
|
||||||
org.label-schema.vcs-ref=$COMMIT \
|
org.label-schema.vcs-ref=$COMMIT \
|
||||||
org.label-schema.build-date=$DATE \
|
org.label-schema.build-date=$DATE \
|
@ -1,19 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# mkdir -p /etc/rspamd/plugins.d \
|
|
||||||
# /etc/rspamd/custom
|
|
||||||
|
|
||||||
# touch /etc/rspamd/rspamd.conf.local \
|
|
||||||
# /etc/rspamd/rspamd.conf.override
|
|
||||||
|
|
||||||
chmod 755 /var/lib/rspamd
|
chmod 755 /var/lib/rspamd
|
||||||
|
|
||||||
|
|
||||||
[[ ! -f /etc/rspamd/override.d/worker-controller-password.inc ]] && echo '# Autogenerated' > /etc/rspamd/override.d/worker-controller-password.inc
|
[[ ! -f /etc/rspamd/override.d/worker-controller-password.inc ]] && echo '# Autogenerated' > /etc/rspamd/override.d/worker-controller-password.inc
|
||||||
|
|
||||||
# Provide additional lua modules
|
|
||||||
ln -s /usr/lib/$(uname -m)-linux-gnu/liblua5.1-cjson.so.0.0.0 /usr/lib/rspamd/cjson.so
|
|
||||||
|
|
||||||
chown -R _rspamd:_rspamd /var/lib/rspamd \
|
chown -R _rspamd:_rspamd /var/lib/rspamd \
|
||||||
/etc/rspamd/local.d \
|
/etc/rspamd/local.d \
|
||||||
/etc/rspamd/custom \
|
/etc/rspamd/custom \
|
||||||
@ -43,19 +34,10 @@ touch /etc/rspamd/custom/global_mime_from_blacklist.map \
|
|||||||
/etc/rspamd/custom/bulk_header.map \
|
/etc/rspamd/custom/bulk_header.map \
|
||||||
/etc/rspamd/custom/bad_header.map
|
/etc/rspamd/custom/bad_header.map
|
||||||
|
|
||||||
# www-data (82) group needs to write to these files
|
|
||||||
chown _rspamd:_rspamd /etc/rspamd/custom/
|
chown _rspamd:_rspamd /etc/rspamd/custom/
|
||||||
chmod 0755 /etc/rspamd/custom/.
|
chmod 0755 /etc/rspamd/custom/.
|
||||||
chmod 644 -R /etc/rspamd/custom/*
|
chmod 644 -R /etc/rspamd/custom/*
|
||||||
|
|
||||||
# Run hooks
|
|
||||||
for file in /hooks/*; do
|
|
||||||
if [ -x "${file}" ]; then
|
|
||||||
echo "Running hook ${file}"
|
|
||||||
"${file}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# If DQS KEY is set in mailcow.conf add Spamhaus DQS RBLs
|
# If DQS KEY is set in mailcow.conf add Spamhaus DQS RBLs
|
||||||
if [[ ! -z ${SPAMHAUS_DQS_KEY} ]]; then
|
if [[ ! -z ${SPAMHAUS_DQS_KEY} ]]; then
|
||||||
cat <<EOF > /etc/rspamd/custom/dqs-rbl.conf
|
cat <<EOF > /etc/rspamd/custom/dqs-rbl.conf
|
||||||
|
Reference in New Issue
Block a user