2016-12-13 19:26:10 +08:00
|
|
|
#!/bin/bash
|
2016-12-13 20:38:45 +08:00
|
|
|
if [[ ${2} == "learn_spam" ]]; then
|
2016-12-13 19:26:10 +08:00
|
|
|
/usr/bin/curl --data-binary @- http://rspamd:11334/learnspam < /dev/stdin
|
2016-12-13 20:38:45 +08:00
|
|
|
elif [[ ${2} == "learn_ham" ]]; then
|
2016-12-13 19:26:10 +08:00
|
|
|
/usr/bin/curl --data-binary @- http://rspamd:11334/learnham < /dev/stdin
|
|
|
|
fi
|
2016-12-13 20:38:45 +08:00
|
|
|
# Always return 0 to satisfy Dovecot...
|
|
|
|
exit 0
|