[pmg-devel] applied: [PATCH pmg-api] dkim: add QID in warnings
Stoiko Ivanov
s.ivanov at proxmox.com
Thu Feb 29 15:25:08 CET 2024
Thanks for addressing this so quickly - since I had my test-setup still
around I gave it a spin and checked it works. - applied
On Thu, 29 Feb 2024 14:47:53 +0100
Mira Limbeck <m.limbeck at proxmox.com> wrote:
> 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 at proxmox.com>
> ---
> src/PMG/RuleDB/Accept.pm | 8 ++++++--
> src/PMG/RuleDB/BCC.pm | 8 ++++++--
> 2 files changed, 12 insertions(+), 4 deletions(-)
>
> 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}) {
More information about the pmg-devel
mailing list