diff --git a/core/dovecot/conf/dovecot.conf b/core/dovecot/conf/dovecot.conf index 38ceb015..35280d21 100644 --- a/core/dovecot/conf/dovecot.conf +++ b/core/dovecot/conf/dovecot.conf @@ -180,7 +180,7 @@ plugin { # Learn from spam imapsieve_mailbox1_name = Junk - imapsieve_mailbox1_causes = COPY + imapsieve_mailbox1_causes = COPY APPEND imapsieve_mailbox1_before = file:/conf/report-spam.sieve imapsieve_mailbox2_name = * imapsieve_mailbox2_from = Junk diff --git a/core/dovecot/conf/ham.script b/core/dovecot/conf/ham.script index 7066d170..ebe92c55 100755 --- a/core/dovecot/conf/ham.script +++ b/core/dovecot/conf/ham.script @@ -6,6 +6,6 @@ then exit 1 fi -tee >(rspamc -h $RSPAMD_HOST -P mailu learn_ham /dev/stdin) \ - >(rspamc -h $RSPAMD_HOST -P mailu -f 11 fuzzy_del /dev/stdin) \ - | rspamc -h $RSPAMD_HOST -P mailu -f 13 fuzzy_add /dev/stdin +exec tee >(rspamc -t 3 -h $RSPAMD_HOST -P mailu learn_ham /dev/stdin||true) \ + >(rspamc -t 3 -h $RSPAMD_HOST -P mailu -f 11 fuzzy_del /dev/stdin||true) \ + >(rspamc -t 3 -h $RSPAMD_HOST -P mailu -f 13 fuzzy_add /dev/stdin||true) > /dev/null diff --git a/core/dovecot/conf/spam.script b/core/dovecot/conf/spam.script index 94d664ae..dab819d7 100755 --- a/core/dovecot/conf/spam.script +++ b/core/dovecot/conf/spam.script @@ -7,6 +7,6 @@ then fi -tee >(rspamc -h $RSPAMD_HOST -P mailu learn_spam /dev/stdin) \ - >(rspamc -h $RSPAMD_HOST -P mailu -f 13 fuzzy_del /dev/stdin) \ - | rspamc -h $RSPAMD_HOST -P mailu -f 11 fuzzy_add /dev/stdin +exec tee >(rspamc -t 3 -h $RSPAMD_HOST -P mailu learn_spam /dev/stdin||true) \ + >(rspamc -t 3 -h $RSPAMD_HOST -P mailu -f 13 fuzzy_del /dev/stdin||true) \ + >(rspamc -t 3 -h $RSPAMD_HOST -P mailu -f 11 fuzzy_add /dev/stdin||true) > /dev/null diff --git a/towncrier/newsfragments/2908.bugfix b/towncrier/newsfragments/2908.bugfix new file mode 100644 index 00000000..601969c8 --- /dev/null +++ b/towncrier/newsfragments/2908.bugfix @@ -0,0 +1,2 @@ +Moving emails to the Junk folder may have created zombies (rspamc) +Ensure that the spam reporting works even if the email isn't COPYed to the mailbox