Pipe to rspamd
parent
b93c4e4102
commit
36b09f339b
|
@ -14,6 +14,7 @@ RUN apt-get update \
|
||||||
dovecot-pop3d \
|
dovecot-pop3d \
|
||||||
dovecot-dev \
|
dovecot-dev \
|
||||||
wget \
|
wget \
|
||||||
|
curl \
|
||||||
build-essential \
|
build-essential \
|
||||||
autotools-dev \
|
autotools-dev \
|
||||||
automake
|
automake
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [[ ${1} == "learn_spam" ]]; then
|
if [[ ${2} == "learn_spam" ]]; then
|
||||||
/usr/bin/curl --data-binary @- http://rspamd:11334/learnspam < /dev/stdin
|
/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
|
/usr/bin/curl --data-binary @- http://rspamd:11334/learnham < /dev/stdin
|
||||||
fi
|
fi
|
||||||
|
# Always return 0 to satisfy Dovecot...
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue