[Postfix] Add scripts to learn from spam/ham traps

[Dovecot] Learn fuzzy when moving mails from/to junk
This commit is contained in:
André
2018-07-29 00:35:54 +02:00
parent d8f86ae488
commit 15b80760b2
6 changed files with 39 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
#!/bin/bash
FILE=/tmp/mail$$
cat > $FILE
trap "/bin/rm -f $FILE" 0 1 2 3 13 15
cat ${FILE} | /usr/bin/curl -s --data-binary @- --unix-socket /rspamd-sock/rspamd.sock http://rspamd/learnham
cat ${FILE} | /usr/bin/curl -H "Flag: 13" -s --data-binary @- --unix-socket /rspamd-sock/rspamd.sock http://rspamd/fuzzyadd
exit 0