all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api] dkim: add QID in warnings
@ 2024-02-29 13:47 Mira Limbeck
  2024-02-29 14:25 ` [pmg-devel] applied: " Stoiko Ivanov
  0 siblings, 1 reply; 2+ messages in thread
From: Mira Limbeck @ 2024-02-29 13:47 UTC (permalink / raw)
  To: pmg-devel

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 | 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}) {
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pmg-devel] applied: [PATCH pmg-api] dkim: add QID in warnings
  2024-02-29 13:47 [pmg-devel] [PATCH pmg-api] dkim: add QID in warnings Mira Limbeck
@ 2024-02-29 14:25 ` Stoiko Ivanov
  0 siblings, 0 replies; 2+ messages in thread
From: Stoiko Ivanov @ 2024-02-29 14:25 UTC (permalink / raw)
  To: Mira Limbeck; +Cc: pmg-devel

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@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@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}) {





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-29 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 13:47 [pmg-devel] [PATCH pmg-api] dkim: add QID in warnings Mira Limbeck
2024-02-29 14:25 ` [pmg-devel] applied: " Stoiko Ivanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal