• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Spamassasin with DNSBL, avoiding URIBL_BLOCKED

Sunday87

New Pleskian
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

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.
 
Thank you for this proposition as a for plesk systems clean and astonishingly simple fix. After a reboot, plesk did not eliminate this change.

I confirm that in email headers this URIBL_BLOCKED and RCVD_IN_DNSWL_BLOCKED and surely others similar do not appear again.
Personal experiense: An email account has noticeable less spam.

For search engines I write the correct word SpamAssassin.

For others reading this post:
This proposal of @Sunday87 should work for almost all using Spamassassin as Spamfiltersystem. This fix does not require plesk as server management. And the preconfigured dns resolver like bind or other can not be messed up as this is possible in proposals by other websites for avoiding URIBL_BLOCKED and RCVD_IN_DNSWL_BLOCKED and surely others, too. Therefore I also recommend this proposition.

I repeat what has to be done for the realization of the proposition:
Take care: all as root or with
Bash:
sudo
beforehand for every command


-
Type
Bash:
touch /etc/spamassassin/65_dns.cf
.
- Then
Bash:
vim /etc/spamassassin/65_dns.cf
- Type
Code:
i
on keyboard to get in edit mode of vim for adding
Code:
dns_server 127.0.0.1
. Then to exit editing mode of vim, type
Code:
[button ESC]
.

- For saving and quitting vim, type
Code:
:wq
.
- I do not know if following is needed, but to be sure this change will be considered in the future, restart spamfilter (hopefully this is sufficient with typing
Code:
/etc/init.d/spamassassin restart
or
Code:
service spamassassin restart
, but to be sure, just reboot whole server with
Code:
reboot
, if you do not mind that uptime will be reset).

for sake of completeness: practically using: Ubuntu 22.04 LTS with Plesk 18.0.49, which runs SpamAssassin 3.4.6
 
Back
Top