[Rspamd] Do not quaratine if symbol is GLOBAL_X_BL

master
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
1 changed files with 10 additions and 1 deletions

View File

@ -2,7 +2,7 @@ rules {
QUARANTINE {
backend = "http";
url = "http://nginx:9081/pipe.php";
selector = "is_reject";
selector = "reject_no_global_bl";
formatter = "default";
meta_headers = true;
}
@ -22,5 +22,14 @@ return function(task)
end
return false
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;
}