Commit 11d53c9a authored by Jesse Norell's avatar Jesse Norell
Browse files

filter Junk mail based on X-Spam* headers, not Subject

parent 509a4aa0
......@@ -4,7 +4,7 @@ if ($RETURNCODE==1)
{
if (!/^List-Unsubscribe:.*/:h )
{
if (!/^(X-Spam-Flag: YES|X-Spam: Yes|Subject: \*\*\*\s*SPAM\s*\*\*\*.*)/:h )
if (!/^(X-Spam-Flag: YES|X-Spam: Yes)/:h )
{
NOW=time
if ({start_date} lt $NOW && {end_date} gt $NOW)
......@@ -20,4 +20,4 @@ if ($RETURNCODE==1)
}
}
}
}
\ No newline at end of file
}
......@@ -7,7 +7,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
<tmpl_if name="move_junk" op="==" value="y">
# Move spam to spam folder
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") {
fileinto :create "Junk";
# Stop here so that we do not reply on spams
stop;
......@@ -33,7 +33,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
<tmpl_if name="move_junk" op="==" value="a">
# Move spam to spam folder
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") {
fileinto :create "Junk";
# Stop here so that we do not reply on spams
stop;
......@@ -46,7 +46,7 @@ if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes",
#################################################################
# Move spam to spam folder
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") {
# Stop here so that we do not reply on spams
stop;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment