Skip to content

Commit d0d5415

Browse files
author
Marius Burkard
committed
Merge branch '6051-trigger-junk-move-by-subject-line-impacts-forwarded-emails' into 'develop'
Resolve "Trigger junk move by Subject line impacts forwarded emails" Closes #6051 See merge request ispconfig/ispconfig3!1409
2 parents 509a4aa + 1157b9b commit d0d5415

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
use = ["x-spamd-bar", "x-spam-level", "authentication-results"];
2-
authenticated_headers = ["authentication-results"];
1+
use = ["x-spamd-bar", "x-spam-level", "x-spam-status", "authentication-results"];
2+
authenticated_headers = ["authentication-results"];
3+
routines {
4+
remove-headers {
5+
"X-Spam" = 0;
6+
"X-Spamd-Bar" = 0;
7+
"X-Spam-Level" = 0;
8+
"X-Spam-Status" = 0;
9+
}
10+
}

server/conf/autoresponder.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if ($RETURNCODE==1)
44
{
55
if (!/^List-Unsubscribe:.*/:h )
66
{
7-
if (!/^(X-Spam-Flag: YES|X-Spam: Yes|Subject: \*\*\*\s*SPAM\s*\*\*\*.*)/:h )
7+
if (!/^(X-Spam-Flag: YES|X-Spam: Yes|X-Spam-Status: Yes)/:h )
88
{
99
NOW=time
1010
if ({start_date} lt $NOW && {end_date} gt $NOW)
@@ -20,4 +20,4 @@ if ($RETURNCODE==1)
2020
}
2121
}
2222
}
23-
}
23+
}

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" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
10+
if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "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" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
36+
if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "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" "Yes",
4646
#################################################################
4747

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

0 commit comments

Comments
 (0)