[Rspamd] Do not quaratine if symbol is GLOBAL_X_BL

This commit is contained in:
andryyy 2019-10-10 12:38:24 +02:00
parent d03e90d3c0
commit 0cfa056faa
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF

View File

@ -2,7 +2,7 @@ rules {
QUARANTINE { QUARANTINE {
backend = "http"; backend = "http";
url = "http://nginx:9081/pipe.php"; url = "http://nginx:9081/pipe.php";
selector = "is_reject"; selector = "reject_no_global_bl";
formatter = "default"; formatter = "default";
meta_headers = true; meta_headers = true;
} }
@ -22,5 +22,14 @@ return function(task)
end end
return false return false
end end
EOD;
reject_no_global_bl = <<EOD
return function(task)
if not task:has_symbol('GLOBAL_SMTP_FROM_BL') and not task:has_symbol('GLOBAL_MIME_FROM_BL') then
local action = task:get_metric_action('default')
return (action == 'reject')
end
return false
end
EOD; EOD;
} }