Pipe to rspamd

This commit is contained in:
andryyy committed 2016-12-13 13:38:45 +01:00
1 parent b93c4e4102
commit 36b09f339b
2 files changed
+5 -2

No files matched your search

+1
View File
@@ -14,6 +14,7 @@ RUN apt-get update \
dovecot-pop3d \
dovecot-dev \
wget \
curl \
build-essential \
autotools-dev \
automake
+4 -2
View File
@@ -1,6 +1,8 @@
#!/bin/bash
if [[ ${1} == "learn_spam" ]]; then
if [[ ${2} == "learn_spam" ]]; then
/usr/bin/curl --data-binary @- http://rspamd:11334/learnspam < /dev/stdin
elif [[ ${1} == "learn_ham" ]]; then
elif [[ ${2} == "learn_ham" ]]; then
/usr/bin/curl --data-binary @- http://rspamd:11334/learnham < /dev/stdin
fi
# Always return 0 to satisfy Dovecot...
exit 0