Jessie exim4 spf madness

29 December 2015 in Random Code

Here's a strange thing. Seems like spf-tools-perl in jessie have some strange bugs. I never noticed, but after the update from wheezy SPF silently stopped working and the log was spammed with Warning: Unexpected error in SPF check. I traced this down to the invocation of /usr/bin/spfquery.mail-spf-perl which would abort with an error: unresolvable name: localhost at /usr/share/perl5/Mail/SPF/ line 225

The solution to all this madness, /etc/resolv.conf had an entry nameserver localhost. Changing that to made the perl script and SPF checking work again. /etc/hosts does list localhost, no idea why this broke.