]> git.proxmox.com Git - pmg-api.git/commitdiff
dkim: add QID in warnings master
authorMira Limbeck <m.limbeck@proxmox.com>
Thu, 29 Feb 2024 13:47:53 +0000 (14:47 +0100)
committerStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 29 Feb 2024 14:09:44 +0000 (15:09 +0100)
adding the QID in warnings allows those log lines to be picked up by the
pmg-log-tracker. this way the warnings show up in the tracking center.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
src/PMG/RuleDB/Accept.pm
src/PMG/RuleDB/BCC.pm

index d14c2fbd512442e53d1a03b99fbd464a6fe9b911..e3e39a71b40d89176bc445d1426351beeeff33f3 100644 (file)
@@ -104,8 +104,12 @@ sub execute {
            eval {
                $entity = PMG::DKIMSign::sign_entity($entity, $dkim, $msginfo->{sender});
            };
-           syslog('warning',
-               "Could not create DKIM-Signature - disabling Signing: $@") if $@;
+           if ($@) {
+               syslog('warning',
+                   "%s: Could not create DKIM-Signature - disabling Signing: $@",
+                   $queue->{logid}
+               );
+           }
        }
 
 
index 65b6fb55a95b3ec8dc09a41fd27ee41dfacba603..81301cfd0abeeae51c1420946cc04b5bece8748e 100644 (file)
@@ -144,8 +144,12 @@ sub execute {
            eval {
                $entity = PMG::DKIMSign::sign_entity($entity, $dkim, $msginfo->{sender});
            };
-           syslog('warning',
-               "Could not create DKIM-Signature - disabling Signing: $@") if $@;
+           if ($@) {
+               syslog('warning',
+                   "%s: Could not create DKIM-Signature - disabling Signing: $@",
+                   $queue->{logid}
+               );
+           }
        }
 
        if ($msginfo->{testmode}) {