public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api] report: adapt to changes in SpamAssassin dns api
@ 2023-06-27  9:00 Stoiko Ivanov
  2023-06-27  9:15 ` Friedrich Weber
  2023-06-27  9:23 ` [pmg-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2023-06-27  9:00 UTC (permalink / raw)
  To: pmg-devel

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





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

end of thread, other threads:[~2023-07-07 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27  9:00 [pmg-devel] [PATCH pmg-api] report: adapt to changes in SpamAssassin dns api Stoiko Ivanov
2023-06-27  9:15 ` Friedrich Weber
2023-06-27  9:23 ` [pmg-devel] applied: " Thomas Lamprecht
2023-07-07 16:57   ` Stoiko Ivanov

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