From: Friedrich Weber <f.weber@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: Re: [pmg-devel] [PATCH pmg-api] report: adapt to changes in SpamAssassin dns api
Date: Tue, 27 Jun 2023 11:15:56 +0200 [thread overview]
Message-ID: <4a44787b-ce0d-1398-6c6d-bd70f1fed392@proxmox.com> (raw)
In-Reply-To: <20230627090027.5384-1-s.ivanov@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
Tested by manually patching my PMG 7.3.
Without this patch, the PMG system report contains:
# resolve www.proxmox.com
NXDOMAIN
With this patch applied, it contains:
# resolve www.proxmox.com
www.proxmox.com. 74817 IN A 212.224.123.69
On 27/06/2023 11:00, Stoiko Ivanov wrote:
> SpamAssassin 4.0 changed the way it does DNS-lookups a bit (switched
> to asynchronous lookups) - this broke pmg-system-report, since
> we use the SpamAssassin API to check that DNS-resolution works.
> The reason for this is that SA used to take only the first entry from
> /etc/resolv.conf - and SA being able to do correct resolution is
> critical for it to work.
>
> This patch fixes the incompatible use of the DNS-API, but does not
> change to the asynchronous model.
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> tested on my pmg installation - a quick verification that it works
> indeed would be appreciated
>
> src/PMG/Report.pm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/PMG/Report.pm b/src/PMG/Report.pm
> index aeda802..027c882 100644
> --- a/src/PMG/Report.pm
> +++ b/src/PMG/Report.pm
> @@ -125,6 +125,7 @@ sub check_dns_resolution {
> stop_at_threshold => 0,
> });
> $sa->init();
> + $sa->{resolver}->load_resolver();
>
> my $packet = $sa->{resolver}->send('www.proxmox.com');
> my $answer = $packet->{answer}->[0];
next prev parent reply other threads:[~2023-06-27 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 9:00 Stoiko Ivanov
2023-06-27 9:15 ` Friedrich Weber [this message]
2023-06-27 9:23 ` [pmg-devel] applied: " Thomas Lamprecht
2023-07-07 16:57 ` Stoiko Ivanov
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=4a44787b-ce0d-1398-6c6d-bd70f1fed392@proxmox.com \
--to=f.weber@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
--cc=s.ivanov@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