From: Mira Limbeck Date: Thu, 29 Feb 2024 13:47:53 +0000 (+0100) Subject: dkim: add QID in warnings X-Git-Url: https://git.proxmox.com/?p=pmg-api.git;a=commitdiff_plain;h=HEAD dkim: add QID in warnings 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 --- diff --git a/src/PMG/RuleDB/Accept.pm b/src/PMG/RuleDB/Accept.pm index d14c2fb..e3e39a7 100644 --- a/src/PMG/RuleDB/Accept.pm +++ b/src/PMG/RuleDB/Accept.pm @@ -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} + ); + } } diff --git a/src/PMG/RuleDB/BCC.pm b/src/PMG/RuleDB/BCC.pm index 65b6fb5..81301cf 100644 --- a/src/PMG/RuleDB/BCC.pm +++ b/src/PMG/RuleDB/BCC.pm @@ -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}) {