From ca26264d0119261da6c37f95bce5ad3572de02cd Mon Sep 17 00:00:00 2001 From: hoellen Date: Fri, 29 Jun 2018 13:47:55 +0200 Subject: [PATCH] Dont flag spam as ham if moved to trash (fix #474) --- core/dovecot/sieve/report-ham.sieve | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/dovecot/sieve/report-ham.sieve b/core/dovecot/sieve/report-ham.sieve index 89962067..1ad8abdf 100644 --- a/core/dovecot/sieve/report-ham.sieve +++ b/core/dovecot/sieve/report-ham.sieve @@ -1,3 +1,11 @@ -require "vnd.dovecot.execute"; +require ["vnd.dovecot.execute", "copy", "imapsieve", "environment", "variables"]; + +if environment :matches "imap.mailbox" "*" { + set "mailbox" "${1}"; +} + +if string "${mailbox}" "Trash" { + stop; +} execute :pipe "mailtrain" "ham";