I just want to share a little something I have learned today and maybe get some feedback if what I did is improper or something. I could not find any howto using the same very simple approach to fixing my issue.
I recently set up a new VPS instance with Ubuntu 18.04 and Plesk Onyx, for some Web- and Email-hosting. I noticed that most incoming mail had the tag URIBL_BLOCKED in their Spamassassin results, hinting that DNSBL was not working as expected. I quickly found the reason: DNS resolving was done through my Hosters DNS cache, which was exceeding the DNSBL providers fair use policy.
The generally proposed workaround is to setup dnsmasq as a caching DNS server. I did not like that idea, because there already was bind running by default on my server, which in its default configuration would handle dns requests comming from the localhost (on 127.0.0.1). However, /etc/resolv.conf pointed to systemd-resolved instead (running on 127.0.0.53), which would forward requests to my Hosters DNS cache.
So simpy by adding a file 65_dns.cf containing
to /etc/spamassassin, I managed to make spamassassin use bind to resolve DNSBL requests, bypassing my ISPs DNS cache and making DNSBL work properly.
I recently set up a new VPS instance with Ubuntu 18.04 and Plesk Onyx, for some Web- and Email-hosting. I noticed that most incoming mail had the tag URIBL_BLOCKED in their Spamassassin results, hinting that DNSBL was not working as expected. I quickly found the reason: DNS resolving was done through my Hosters DNS cache, which was exceeding the DNSBL providers fair use policy.
The generally proposed workaround is to setup dnsmasq as a caching DNS server. I did not like that idea, because there already was bind running by default on my server, which in its default configuration would handle dns requests comming from the localhost (on 127.0.0.1). However, /etc/resolv.conf pointed to systemd-resolved instead (running on 127.0.0.53), which would forward requests to my Hosters DNS cache.
So simpy by adding a file 65_dns.cf containing
Code:
dns_server 127.0.0.1
to /etc/spamassassin, I managed to make spamassassin use bind to resolve DNSBL requests, bypassing my ISPs DNS cache and making DNSBL work properly.