public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: Mira Limbeck <m.limbeck@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH pmg-api] dkim: add QID in warnings
Date: Thu, 29 Feb 2024 15:25:08 +0100	[thread overview]
Message-ID: <20240229152508.6095b85f@rosa.proxmox.com> (raw)
In-Reply-To: <20240229134752.170724-1-m.limbeck@proxmox.com>

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





      reply	other threads:[~2024-02-29 14:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 13:47 [pmg-devel] " Mira Limbeck
2024-02-29 14:25 ` Stoiko Ivanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240229152508.6095b85f@rosa.proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=m.limbeck@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal