[Rspamd] Moore Pushover fixes
parent
fec0f688b1
commit
6efe0d5aab
|
@ -12,10 +12,10 @@ rules {
|
||||||
selector = "ratelimited";
|
selector = "ratelimited";
|
||||||
formatter = "json";
|
formatter = "json";
|
||||||
}
|
}
|
||||||
UNAUTHMAIL {
|
PUSHOVERMAIL {
|
||||||
backend = "http";
|
backend = "http";
|
||||||
url = "http://nginx:9081/pushover.php";
|
url = "http://nginx:9081/pushover.php";
|
||||||
selector = "unauth_mail";
|
selector = "mailcow_rcpt";
|
||||||
# Only return msgid, do not parse the full message
|
# Only return msgid, do not parse the full message
|
||||||
formatter = "msgid";
|
formatter = "msgid";
|
||||||
meta_headers = true;
|
meta_headers = true;
|
||||||
|
@ -23,14 +23,13 @@ rules {
|
||||||
}
|
}
|
||||||
|
|
||||||
custom_select {
|
custom_select {
|
||||||
unauth_mail = <<EOD
|
mailcow_rcpt = <<EOD
|
||||||
return function(task)
|
return function(task)
|
||||||
local action = task:get_metric_action('default')
|
local action = task:get_metric_action('default')
|
||||||
if task:has_symbol('NO_LOG_STAT') or (action == 'reject' or action == 'add header' or action == 'rewrite subject') then
|
if task:has_symbol('NO_LOG_STAT') or (action == 'reject' or action == 'add header' or action == 'rewrite subject') then
|
||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
local uname = task:get_user()
|
if task:get_symbol("RCPT_MAILCOW_DOMAIN") then
|
||||||
if not uname then
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -46,7 +46,6 @@ if (!function_exists('getallheaders')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$headers = getallheaders();
|
$headers = getallheaders();
|
||||||
|
|
||||||
$qid = $headers['X-Rspamd-Qid'];
|
$qid = $headers['X-Rspamd-Qid'];
|
||||||
|
|
Loading…
Reference in New Issue