Perl 5.16 issue with Mail::DKIM and Spamassassin spf: lookup failed: addr is not a string

In maillog spamd reports: spf: lookup failed: addr is not a string at /usr/share/perl5/vendor_perl/IO/Socket/ line 662.

Spam gets through.

This is the thread which describes the problem (perl outdated)




Howdy -- hmm, we're not seeing that issue in our testing, though what you're seeing there may unfortunately be a bug in either SpamAssassin, or a Perl module, provided by your distribution.

What you could try is to install a newer version of "Mail::DKIM", which can be done with this command:

cpan -i Mail::DKIM

Or, you may also want to try the BIND setting in this post here:

Seems to be a Bug in perl 5.16 and lower, not only dkim module:

Is it save to update perl on newest virtualmin? There are now newer perl packages in the virtualmin repo.

A bug in getnameinfo() in perl 5.16 and older. Fixed with perl 5.18 and later, which deal with pPOK vs. POK flags somewhat differently.


one possible workaround: