public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
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] Fix quarantine and pushover notifications
cb599db6
data/conf/rspamd/meta_exporter/pipe.php | 11 +++++------
data/conf/rspamd/meta_exporter/pushover.php | 3 ++-
2 files changed, 7 insertions(+), 7 deletions(-)
Diff
diff --git a/data/conf/rspamd/meta_exporter/pipe.php b/data/conf/rspamd/meta_exporter/pipe.php
index 77c66419..f7fef484 100644
--- a/data/conf/rspamd/meta_exporter/pipe.php
+++ b/data/conf/rspamd/meta_exporter/pipe.php
@@ -204,7 +204,6 @@ foreach (json_decode($rcpts, true) as $rcpt) {
$loop_c++;
error_log("RCPT RESOVLER: http pipe: goto array count on loop #". $loop_c . " is " . count($gotos_array) . PHP_EOL);
}
- return $rcpt_final_mailboxes;
}
catch (PDOException $e) {
error_log("RCPT RESOVLER: " . $e->getMessage() . PHP_EOL);
@@ -213,8 +212,8 @@ foreach (json_decode($rcpts, true) as $rcpt) {
}
}
-foreach ($rcpt_final_mailboxes as $rcpt) {
- error_log("QUARANTINE: quarantine pipe: processing quarantine message for rcpt " . $rcpt . PHP_EOL);
+foreach ($rcpt_final_mailboxes as $rcpt_final) {
+ error_log("QUARANTINE: quarantine pipe: processing quarantine message for rcpt " . $rcpt_final . PHP_EOL);
try {
$stmt = $pdo->prepare("INSERT INTO `quarantine` (`qid`, `subject`, `score`, `sender`, `rcpt`, `symbols`, `user`, `ip`, `msg`, `action`)
VALUES (:qid, :subject, :score, :sender, :rcpt, :symbols, :user, :ip, :msg, :action)");
@@ -223,7 +222,7 @@ foreach ($rcpt_final_mailboxes as $rcpt) {
':subject' => $subject,
':score' => $score,
':sender' => $sender,
- ':rcpt' => $rcpt,
+ ':rcpt' => $rcpt_final,
':symbols' => $symbols,
':user' => $user,
':ip' => $ip,
@@ -241,8 +240,8 @@ foreach ($rcpt_final_mailboxes as $rcpt) {
) x
);');
$stmt->execute(array(
- ':rcpt' => $rcpt,
- ':rcpt2' => $rcpt,
+ ':rcpt' => $rcpt_final,
+ ':rcpt2' => $rcpt_final,
':retention_size' => $retention_size
));
}
diff --git a/data/conf/rspamd/meta_exporter/pushover.php b/data/conf/rspamd/meta_exporter/pushover.php
index 60a890cf..6461610c 100644
--- a/data/conf/rspamd/meta_exporter/pushover.php
+++ b/data/conf/rspamd/meta_exporter/pushover.php
@@ -177,10 +177,11 @@ foreach (json_decode($rcpts, true) as $rcpt) {
foreach ($rcpt_final_mailboxes as $rcpt_final) {
+ error_log("NOTIFY: pushover pipe: processing pushover message for rcpt " . $rcpt_final . PHP_EOL);
$stmt = $pdo->prepare("SELECT * FROM `pushover`
WHERE `username` = :username AND `active` = '1'");
$stmt->execute(array(
- ':username' => $rcpt
+ ':username' => $rcpt_final
));
$api_data = $stmt->fetch(PDO::FETCH_ASSOC);
if (isset($api_data['key']) && isset($api_data['token'])) {