Ignore moves from junkmail to Junk (and from Junk to junkmail)

This commit is contained in:
Daniel Berteaud 2017-03-09 12:27:39 +01:00
parent 6e370105c5
commit 0b9afe56e2
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,9 @@ require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];
if environment :matches "imap.mailbox" "*" {
set "mailbox" "${1}";
}
if string "${mailbox}" "Trash" {
if anyof (string "${mailbox}" "Trash",
string "${mailbox}" "junkmail",
string "${mailbox}" "Junk") {
stop;
}
pipe :copy "learn-ham.sh";