瀏覽代碼

Merge pull request #623 from mkuron/rspamd-mailflow

rspamd: exclude Mail Flow monitoring from logs and stats
André Peters 8 年之前
父節點
當前提交
19767f31a1
共有 1 個文件被更改,包括 13 次插入1 次删除
  1. 13 1
      data/conf/rspamd/lua/rspamd.local.lua

+ 13 - 1
data/conf/rspamd/lua/rspamd.local.lua

@@ -107,4 +107,16 @@ rspamd_config:register_symbol({
     return true
   end,
   priority = 20
-})
+})
+
+rspamd_config:register_symbol({
+  name = 'NO_LOG_STAT_MAILFLOW',
+  type = 'postfilter',
+  callback = function(task)
+    local sender = task:get_header('From')
+    if sender == 'monitoring-system@everycloudtech.us' then
+      task:set_flag('no_log')
+      task:set_flag('no_stat')
+    end
+  end
+})