Pārlūkot izejas kodu

[Rspamd] Quarantine, Pushover: Respect active = 2 while processing

andryyy 5 gadi atpakaļ
vecāks
revīzija
520056a489

+ 1 - 1
data/conf/rspamd/meta_exporter/pipe.php

@@ -153,7 +153,7 @@ foreach (json_decode($rcpts, true) as $rcpt) {
       // Loop through all found gotos
       // Loop through all found gotos
       foreach ($gotos_array as $index => &$goto) {
       foreach ($gotos_array as $index => &$goto) {
         error_log("RCPT RESOVLER: http pipe: query " . $goto . " as username from mailbox" . PHP_EOL);
         error_log("RCPT RESOVLER: http pipe: query " . $goto . " as username from mailbox" . PHP_EOL);
-        $stmt = $pdo->prepare("SELECT `username` FROM `mailbox` WHERE `username` = :goto AND `active`= '1';");
+        $stmt = $pdo->prepare("SELECT `username` FROM `mailbox` WHERE `username` = :goto AND (`active`= '1' OR `active`= '2');");
         $stmt->execute(array(':goto' => $goto));
         $stmt->execute(array(':goto' => $goto));
         $username = $stmt->fetch(PDO::FETCH_ASSOC)['username'];
         $username = $stmt->fetch(PDO::FETCH_ASSOC)['username'];
         if (!empty($username)) {
         if (!empty($username)) {

+ 1 - 1
data/conf/rspamd/meta_exporter/pushover.php

@@ -127,7 +127,7 @@ foreach (json_decode($rcpts, true) as $rcpt) {
       // Loop through all found gotos
       // Loop through all found gotos
       foreach ($gotos_array as $index => &$goto) {
       foreach ($gotos_array as $index => &$goto) {
         error_log("RCPT RESOVLER: http pipe: query " . $goto . " as username from mailbox" . PHP_EOL);
         error_log("RCPT RESOVLER: http pipe: query " . $goto . " as username from mailbox" . PHP_EOL);
-        $stmt = $pdo->prepare("SELECT `username` FROM `mailbox` WHERE `username` = :goto AND `active`= '1';");
+        $stmt = $pdo->prepare("SELECT `username` FROM `mailbox` WHERE `username` = :goto AND (`active`= '1' OR `active`= '2');");
         $stmt->execute(array(':goto' => $goto));
         $stmt->execute(array(':goto' => $goto));
         $username = $stmt->fetch(PDO::FETCH_ASSOC)['username'];
         $username = $stmt->fetch(PDO::FETCH_ASSOC)['username'];
         if (!empty($username)) {
         if (!empty($username)) {