Skip to content

Commit 38c7515

Browse files
committed
sieve: case insensitive move to junk test matched 'BAYES' for 'Yes'
1 parent f9c22b4 commit 38c7515

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/conf/sieve_filter.master

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
77

88
<tmpl_if name="move_junk" op="==" value="y">
99
# Move spam to spam folder
10-
if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
10+
if anyof (header :is ["X-Spam", "X-Spam-Flag"] "Yes", header :matches "X-Spam-Status" "Yes, *") {
1111
fileinto :create "Junk";
1212
# Stop here so that we do not reply on spams
1313
stop;
@@ -33,7 +33,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
3333

3434
<tmpl_if name="move_junk" op="==" value="a">
3535
# Move spam to spam folder
36-
if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
36+
if anyof (header :is ["X-Spam", "X-Spam-Flag"] "Yes", header :matches "X-Spam-Status" "Yes, *") {
3737
fileinto :create "Junk";
3838
# Stop here so that we do not reply on spams
3939
stop;
@@ -46,7 +46,7 @@ if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-S
4646
#################################################################
4747

4848
# Move spam to spam folder
49-
if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
49+
if anyof (header :is ["X-Spam", "X-Spam-Flag"] "Yes", header :matches "X-Spam-Status" "Yes, *") {
5050
# Stop here so that we do not reply on spams
5151
stop;
5252
}

0 commit comments

Comments
 (0)