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] Moore Pushover fixes

6efe0d5a
andryyy <[email protected]> 6 years ago
data/conf/rspamd/local.d/metadata_exporter.conf | 9 ++++-----
 data/conf/rspamd/meta_exporter/pushover.php     | 1 -
 2 files changed, 4 insertions(+), 6 deletions(-)

Diff

diff --git a/data/conf/rspamd/local.d/metadata_exporter.conf b/data/conf/rspamd/local.d/metadata_exporter.conf
index 4ce07df0..32a1b514 100644
--- a/data/conf/rspamd/local.d/metadata_exporter.conf
+++ b/data/conf/rspamd/local.d/metadata_exporter.conf
@@ -12,10 +12,10 @@ rules {
 		selector = "ratelimited";
 		formatter = "json";
 	}
-  UNAUTHMAIL {
+  PUSHOVERMAIL {
     backend = "http";
     url = "http://nginx:9081/pushover.php";
-    selector = "unauth_mail";
+    selector = "mailcow_rcpt";
     # Only return msgid, do not parse the full message
     formatter = "msgid";
     meta_headers = true;
@@ -23,14 +23,13 @@ rules {
 }
 
 custom_select {
-  unauth_mail = <<EOD
+  mailcow_rcpt = <<EOD
 return function(task)
   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
     return false
   else
-    local uname = task:get_user()
-    if not uname then
+    if task:get_symbol("RCPT_MAILCOW_DOMAIN") then
       return true
     end
     return false
diff --git a/data/conf/rspamd/meta_exporter/pushover.php b/data/conf/rspamd/meta_exporter/pushover.php
index 35369c27..637b103a 100644
--- a/data/conf/rspamd/meta_exporter/pushover.php
+++ b/data/conf/rspamd/meta_exporter/pushover.php
@@ -46,7 +46,6 @@ if (!function_exists('getallheaders'))  {
   }
 }
 
-
 $headers = getallheaders();
 
 $qid      = $headers['X-Rspamd-Qid'];