NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[Rspamd] Changes to ignore watchdog checks

fd3b2e5f
andryyy <[email protected]> 9 years ago
data/conf/rspamd/dynmaps/settings.php | 12 ++++++++++++
 data/conf/rspamd/lua/rspamd.local.lua |  6 +++---
 2 files changed, 15 insertions(+), 3 deletions(-)

Diff

diff --git a/data/conf/rspamd/dynmaps/settings.php b/data/conf/rspamd/dynmaps/settings.php
index 552918e1..335c0c66 100644
--- a/data/conf/rspamd/dynmaps/settings.php
+++ b/data/conf/rspamd/dynmaps/settings.php
@@ -97,6 +97,18 @@ function ucl_rcpts($object, $type) {
 }
 ?>
 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
 
 /*
diff --git a/data/conf/rspamd/lua/rspamd.local.lua b/data/conf/rspamd/lua/rspamd.local.lua
index d44f0feb..c1a8f48f 100644
--- a/data/conf/rspamd/lua/rspamd.local.lua
+++ b/data/conf/rspamd/lua/rspamd.local.lua
@@ -110,11 +110,11 @@ rspamd_config:register_symbol({
 })
 
 rspamd_config:register_symbol({
-  name = 'NO_LOG_STAT_MAILFLOW',
+  name = 'NO_LOG_STAT',
   type = 'postfilter',
   callback = function(task)
-    local sender = task:get_header('From')
-    if sender == '[email protected]' then
+    local from = task:get_header('From')
+    if from and (from == '[email protected]' or from == 'watchdog@localhost') then
       task:set_flag('no_log')
       task:set_flag('no_stat')
     end