浏览代码

[Rspamd] Changes to ignore watchdog checks

andryyy 8 年之前
父节点
当前提交
fd3b2e5f16
共有 2 个文件被更改,包括 15 次插入3 次删除
  1. 12 0
      data/conf/rspamd/dynmaps/settings.php
  2. 3 3
      data/conf/rspamd/lua/rspamd.local.lua

+ 12 - 0
data/conf/rspamd/dynmaps/settings.php

@@ -97,6 +97,18 @@ function ucl_rcpts($object, $type) {
 }
 }
 ?>
 ?>
 settings {
 settings {
+	watchdog {
+		priority = 10;
+		rcpt = "/null@localhost/i";
+		from = "/watchdog@localhost/i";
+		apply "default" {
+			actions {
+				reject = 9999.0;
+				greylist = 9998.0;
+				"add header" = 9997.0;
+			}
+		}
+	}
 <?php
 <?php
 
 
 /*
 /*

+ 3 - 3
data/conf/rspamd/lua/rspamd.local.lua

@@ -110,11 +110,11 @@ rspamd_config:register_symbol({
 })
 })
 
 
 rspamd_config:register_symbol({
 rspamd_config:register_symbol({
-  name = 'NO_LOG_STAT_MAILFLOW',
+  name = 'NO_LOG_STAT',
   type = 'postfilter',
   type = 'postfilter',
   callback = function(task)
   callback = function(task)
-    local sender = task:get_header('From')
-    if sender == 'monitoring-system@everycloudtech.us' then
+    local from = task:get_header('From')
+    if from and (from == 'monitoring-system@everycloudtech.us' or from == 'watchdog@localhost') then
       task:set_flag('no_log')
       task:set_flag('no_log')
       task:set_flag('no_stat')
       task:set_flag('no_stat')
     end
     end