From c7fd30ebab18e30aa55301640d5f4dec422b3a94 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Tue, 27 Jun 2023 11:00:27 +0200 Subject: [PATCH] report: adapt to changes in SpamAssassin DNS api 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 Tested-by: Friedrich Weber --- 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.39.2