mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2026-11-21 03:26:29 +03:00
Since the Dovecot 2.4 migration (v16), `imapsieve_from Junk` fires for every copy out of `Junk`, and `learn-ham.sieve` piped each one to `rspamc learn_ham`. Deleting a message from `Junk` therefore trained the classifier to treat it as ham. The script now stops when the destination is `Junk` itself or a mailbox with the `\Trash` special-use attribute, as in the upstream Dovecot 2.4 spam reporting example. Ham is learned for moves to any other folder. Fixes #4831 Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>