1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-01-02 00:10:31 +02:00
Mailu/core/dovecot/conf/spam.script
2022-12-08 13:00:50 +01:00

13 lines
368 B
Bash
Executable File

#!/bin/bash
RSPAMD_HOST="$(getent hosts {{ ANTISPAM_ADDRESS }}|cut -d\ -f1):11334"
if [[ $? -ne 0 ]]
then
echo "Failed to lookup {{ ANTISPAM_ADDRESS }}" >&2
exit 1
fi
tee >(rspamc -h $RSPAMD_HOST -P mailu learn_spam /dev/stdin) \
>(rspamc -h $RSPAMD_HOST -P mailu -f 13 fuzzy_del /dev/stdin) \
| rspamc -h $RSPAMD_HOST -P mailu -f 11 fuzzy_add /dev/stdin