[Rspamd] Do not quaratine if symbol is GLOBAL_X_BL
parent
d03e90d3c0
commit
0cfa056faa
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue