]> SpamAssassin DNS and spam 🌐:aligrant.com

SpamAssassin DNS and spam

Alastair Grant | Friday 8 May 2015

I've been getting a lot of spam recently, which has annoyed me somewhat as I set up SpamAssassin a long time ago and it's been very good at filtering out the junk.

After some investigation it turned out that the DNS Spam lists (such as Spamhaus) were being skipped. These services are really, really good at filtering spam. After much digging through the utterly horrible Amavis configuration and log files I found vague reference to DNS.

After much Google-kung-fu, I came across this bug: Bug 7057 - Net::DNS 0.76 compatibility: available_nameservers: No DNS servers available!. This bug relates to a Perl module called Net::DNS - and as it happened, I updated my Perl modules the other week which meant the bug appeared in my installation.

The bug is marked as fixed, but in version of 3.4.1, which is the first release in a very long time and hasn't yet been picked up by my Linux distro (openSUSE).

So the workaround is to down-grade your Perl module. This is a bit of a pain as there is no easy way to do this. You'll need CPAN, but you'll probably have this already installed to have encountered the bug in the first place.

You can run the downgrade by running in CPAN:

install NLNETLABS/Net-DNS-0.75.tar.gz

Mine complained about a few dependencies that I needed to install first, in that situation you just need to do "install [package]" for each dependency and then restart CPAN.

My spam is once again being filtered. And I can now continue on to the next error to do with trusted networks - more to follow I hope!

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.