Jessie exim4 spf madness
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/Server.pm line 225
The solution to all this madness, /etc/resolv.conf had an entry nameserver localhost. Changing that to 127.0.0.1 made the perl script and SPF checking work again. /etc/hosts does list 127.0.0.1 localhost, no idea why this broke.