1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-18 17:40:38 +02:00
Mailu/core/dovecot/conf/spam.script
Florent Daigniere 368b40b4fd doh
2021-08-24 09:24:14 +02:00

14 lines
375 B
Bash
Executable File

#!/bin/bash
RSPAMD_HOST="$(getent hosts {{ ANTISPAM_WEBUI_ADDRESS }}|cut -d\ -f1)"
if [[ $? -ne 0 ]]
then
echo "Failed to lookup {{ ANTISPAM_WEBUI_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