From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api] report: adapt to changes in SpamAssassin dns api
Date: Tue, 27 Jun 2023 11:00:27 +0200 [thread overview]
Message-ID: <20230627090027.5384-1-s.ivanov@proxmox.com> (raw)
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];
--
2.30.2
next reply other threads:[~2023-06-27 9:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 9:00 Stoiko Ivanov [this message]
2023-06-27 9:15 ` Friedrich Weber
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=20230627090027.5384-1-s.ivanov@proxmox.com \
--to=s.ivanov@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