[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

@@ -4,10 +4,11 @@ trap "postfix stop" EXIT
[[ ! -d /opt/postfix/conf/sql/ ]] && mkdir -p /opt/postfix/conf/sql/
cat /dev/null > /etc/aliases;
echo 'null: /dev/null' >> /etc/aliases;
echo '"ham: "|/usr/bin/curl -s --data-binary @- --unix-socket /rspamd-sock/rspamd.sock http://rspamd/learnham"' >> /etc/aliases;
echo 'spam: "|/usr/bin/curl -s --data-binary @- --unix-socket /rspamd-sock/rspamd.sock http://rspamd/learnspam"' >> /etc/aliases;
cat <<EOF > /etc/aliases
null: /dev/null
ham: "|/usr/local/bin/rspamd-pipe-ham"
spam: "|/usr/local/bin/rspamd-pipe-spam"
EOF
newaliases;
cat <<EOF > /opt/postfix/conf/sql/mysql_relay_recipient_maps.cf