2019-09-27 20:57:15 +02:00
|
|
|
#!/bin/bash
|
2022-12-08 13:46:31 +02:00
|
|
|
RSPAMD_HOST="$(getent hosts {{ ANTISPAM_ADDRESS }}|cut -d\ -f1):11334"
|
2021-08-21 17:10:37 +02:00
|
|
|
if [[ $? -ne 0 ]]
|
|
|
|
then
|
2022-12-08 13:46:31 +02:00
|
|
|
echo "Failed to lookup {{ ANTISPAM_ADDRESS }}" >&2
|
2021-08-21 17:10:37 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-08-16 10:44:10 +02:00
|
|
|
tee >(rspamc -t 3 -h $RSPAMD_HOST -P mailu learn_ham /dev/stdin||true) \
|
2023-08-15 10:14:27 +02:00
|
|
|
>(rspamc -t 3 -h $RSPAMD_HOST -P mailu -f 11 fuzzy_del /dev/stdin||true) \
|
2023-08-15 19:32:41 +02:00
|
|
|
>(rspamc -t 3 -h $RSPAMD_HOST -P mailu -f 13 fuzzy_add /dev/stdin||true) > /dev/null
|
2023-08-16 10:44:10 +02:00
|
|
|
|
|
|
|
wait
|