mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-14 10:53:30 +02:00
13 lines
423 B
Bash
Executable File
13 lines
423 B
Bash
Executable File
#!/bin/bash
|
|
{% set hostname,port = ANTISPAM_WEBUI_ADDRESS.split(':') %}
|
|
RSPAMD_HOST="$(getent hosts {{ hostname }}|cut -d\ -f1):{{ port }}"
|
|
if [[ $? -ne 0 ]]
|
|
then
|
|
echo "Failed to lookup {{ ANTISPAM_WEBUI_ADDRESS }}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
tee >(rspamc -h $RSPAMD_HOST -P mailu learn_ham /dev/stdin) \
|
|
>(rspamc -h $RSPAMD_HOST -P mailu -f 11 fuzzy_del /dev/stdin) \
|
|
| rspamc -h $RSPAMD_HOST -P mailu -f 13 fuzzy_add /dev/stdin
|