Commit 1157b9b2 authored by Jesse Norell's avatar Jesse Norell
Browse files

rpsamd: use x-spam-status

parent 11d53c9a
Pipeline #7599 passed with stage
in 8 minutes and 14 seconds
use = ["x-spamd-bar", "x-spam-level", "authentication-results"]; use = ["x-spamd-bar", "x-spam-level", "x-spam-status", "authentication-results"];
authenticated_headers = ["authentication-results"]; authenticated_headers = ["authentication-results"];
\ No newline at end of file routines {
remove-headers {
"X-Spam" = 0;
"X-Spamd-Bar" = 0;
"X-Spam-Level" = 0;
"X-Spam-Status" = 0;
}
}
...@@ -4,7 +4,7 @@ if ($RETURNCODE==1) ...@@ -4,7 +4,7 @@ if ($RETURNCODE==1)
{ {
if (!/^List-Unsubscribe:.*/:h ) if (!/^List-Unsubscribe:.*/:h )
{ {
if (!/^(X-Spam-Flag: YES|X-Spam: Yes)/:h ) if (!/^(X-Spam-Flag: YES|X-Spam: Yes|X-Spam-Status: Yes)/:h )
{ {
NOW=time NOW=time
if ({start_date} lt $NOW && {end_date} gt $NOW) if ({start_date} lt $NOW && {end_date} gt $NOW)
......
...@@ -7,7 +7,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap ...@@ -7,7 +7,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
<tmpl_if name="move_junk" op="==" value="y"> <tmpl_if name="move_junk" op="==" value="y">
# Move spam to spam folder # Move spam to spam folder
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") { if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
fileinto :create "Junk"; fileinto :create "Junk";
# Stop here so that we do not reply on spams # Stop here so that we do not reply on spams
stop; stop;
...@@ -33,7 +33,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap ...@@ -33,7 +33,7 @@ require ["fileinto", "mailbox", "regex", "date", "relational", "vacation", "imap
<tmpl_if name="move_junk" op="==" value="a"> <tmpl_if name="move_junk" op="==" value="a">
# Move spam to spam folder # Move spam to spam folder
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") { if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
fileinto :create "Junk"; fileinto :create "Junk";
# Stop here so that we do not reply on spams # Stop here so that we do not reply on spams
stop; stop;
...@@ -46,7 +46,7 @@ if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") ...@@ -46,7 +46,7 @@ if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes")
################################################################# #################################################################
# Move spam to spam folder # Move spam to spam folder
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes") { if anyof (header :contains "X-Spam-Flag" "YES", header :contains ["X-Spam", "X-Spam-Status"] "Yes") {
# Stop here so that we do not reply on spams # Stop here so that we do not reply on spams
stop; 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