"DNS reply returned 'no error'" error in Rspamd
Symptoms
The Rspamd log file at /var/log/rspamd/rspamd.log contains multiple errors in the following format:
DNS reply returned 'no error' for zen.spamhaus.org while 'no records with this name' was expected when querying for '1.0.0.127.zen.spamhaus.org'(likely DNS spoofing or BL internal issues)
Cause
Public DNSBL services (such as Spamhaus, URIBL, or SendersScore) have blocked your server's IP address..
Solution
Set up a local DNS resolver. The following example uses the `unbound` utility.
Install unbound:
apt install unbound -y
yum install unbound -y
Configure the /etc/unbound/unbound.conf.d/rspamd.conf file as follows:
server:
interface: 127.0.0.1
port: 5353
do-ip4: yes
do-ip6: no
do-udp: yes
do-tcp: yes
prefetch: yes
cache-min-ttl: 300
num-threads: 2
Start the `unbound` service and enable it to launch automatically:
systemctl enable --now unbound
Configure Rspamd to use this resolver by adding the following lines to the /etc/rspamd/local.d/options.inc file:
dns {
nameserver = ["127.0.0.1:5353"];
}
Restart the Rspamd service:
systemctl restart rspamd
Check the Rspamd log for any remaining errors:
tail -f /var/log/rspamd/rspamd.log