• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

How to patch spamassassin ( DnsResolver.pm )

U

UFHH01

Guest
At the moment, there is a tiny bug with spamassassin, that results in some (error)-info-messages like:
Code:
Feb 27 00:00:00 XXXXX spamd[XXXXX]: plugin: eval failed: available_nameservers: No DNS servers available!

Feb 27 00:00:00 XXXXX spamd[XXXXX]: rules: failed to run NO_DNS_FOR_FROM RBL test, skipping:
Feb 27 00:00:00 XXXXX spamd[XXXXX]:  (available_nameservers: [...] No DNS servers available!)
Feb 27 00:00:00 XXXXX spamd[XXXXX]: spf: lookup failed: available_nameservers: No DNS servers available!
Feb 27 00:00:00 XXXXX spamd[XXXXX]: rules: failed to run DKIM_ADSP_NXDOMAIN test, skipping:
Feb 27 00:00:00 XXXXX spamd[XXXXX]:  (available_nameservers: [...] No DNS servers available!)
Feb 27 00:00:00 XXXXX spamd[XXXXX]: spf: lookup failed: available_nameservers: No DNS servers available!

Because of some changes to the PERL module "Net :: DNS version 0.76", there are some changes for the object "nameserver", which has been changed to "nameserver4" "and "nameserver6", but these changes were not yet transported to all vendors spamassassin versions ( depending file: "DnsResolver.pm" ). To solve this issue, you could apply the suggested patch and don't have to wait any longer to solve the issue:


1. Locate your DnsResolver.pm - file on your system with:

locate DnsResolver.pm
2. Create a file with the suggested patch ( reference: https://svn.apache.org/viewvc/spama...lver.pm?r1=1603518&r2=1603517&pathrev=1603518 ) on your system with the command:

touch /root/DnsResolver.pm.patch

and edit the patch - file with the content:
PHP:
--- spamassassin/trunk/lib/Mail/SpamAssassin/DnsResolver.pm    2014/06/18 16:47:04    1603517
+++ spamassassin/trunk/lib/Mail/SpamAssassin/DnsResolver.pm    2014/06/18 16:48:04    1603518
@@ -204,8 +204,10 @@
     @ns_addr_port = @{$self->{conf}->{dns_servers}};
     dbg("dns: servers set by config to: %s", join(', ',@ns_addr_port));
   } elsif ($res) {  # default as provided by Net::DNS, e.g. /etc/resolv.conf
-    @ns_addr_port = map(untaint_var("[$_]:" . $res->{port}),
-                        @{$res->{nameservers}});
+    my @ns = $res->UNIVERSAL::can('nameservers') ? $res->nameservers
+                                                 : @{$res->{nameservers}};
+    my $port = $res->UNIVERSAL::can('port') ? $res->port : $res->{port};
+    @ns_addr_port = map(untaint_var("[$_]:" . $port), @ns);
     dbg("dns: servers obtained from Net::DNS : %s", join(', ',@ns_addr_port));
   }
   return @ns_addr_port;

Please note, that the path "spamassassin/trunk/lib/Mail/SpamAssassin/" can vary to your system configuration, so please make sure, that the path matches your "locate" - command in the first step.


3. To patch the located file "DnsResolver.pm" now, you would use the command:

patch < /root/DnsResolver.pm.patch

4. Restart spamassassin with the command:

/etc/init.d/spamassassin restart
( or service spamassassin restart )


--------------------------------------------------
Please be aware that Plesk updates/upgrades/patches may overright your changes without any notice and you might have to check and re-apply the whole patch as described untill Parallels patches spamassassin as well.

If you have questions to this "How to", or experience any issues, please be so kind to include error messages, depending ( configuration ) files and mention as well your operating system, please.
 
Last edited by a moderator:
We are grateful to you, UFHH01, for this “How to”.
Thanks a lot from our team!
 
Hello,
I changed my DnsResolver.pm ad described above.
The DNS found is now gone.
But i now receive the following warnings in de mail.log

plesk spamd[16155]: Use of uninitialized value $rr_type in string eq at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/AskDNS.pm line 592

And these lines are there since i update de DnsResolver.pm.

Can you help me how to solve this??

Henk
 
Back
Top