# Trouble with spamhaus marking any mail as spam

**URL:** https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814
**Category:** Discuss
**Tags:** english
**Created:** [February 25, 2023, 12:38pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814 "2023-02-25T12:38:07Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)
#### Post date: [February 25, 2023, 12:38pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/1 "2023-02-25T12:38:08Z")

</div>

Hi

I’ve recently noticed that I wasn’t receiving some emails from well known organizations, namely github and enedis, that I can’t suspect of being considered spam senders.

Looking to my mail log I’ve noticed that indeed the email was sent, but block by spamhaus.

```auto
Feb 25 12:11:46 postfix/smtpd[799447]: NOQUEUE: reject: RCPT from out-17.smtp.github.com[192.30.252.200]: 554 5.7.1 Service unavailable; Client host [192.30.252.200] blocked using cbl.abuseat.org; Error: open resolver; https://www.spamhaus.org/returnc/pub/66.185.123.232; from=<noreply@github.com> to=<mail@domain.tld> proto=ESMTP helo=<out-17.smtp.github.com>

```

Looking at it, I’ve discovered that github wasn’t the only service to be blocked, and I actually missed a lot of mails over time that never reached my mail box because of that.  
But hard to notice unless you’re actually waiting for a specific email that doesn’t come…

Investigating that, it appears that spamhaus changed its policy over its free service and [doesn’t allow to use open dns services](https://www.spamresource.com/2021/10/be-careful-using-spamhaus-with-open.html).

I’m not sure our usage of open dns resolver in dnsmasq is actually link to that issue.  
But I guess if the server is contacting spamhaus, it should do it using dnsmasq, and thus using an open resolver in the process.  
I can’t figure out though, why and how it would be an issue. This would be a server’s matter only.

Spamhaus talk about reverse dns set up correctly, which doesn’t seem to be an issue in my config, while other are just saying that spamhaus is getting rid of its free service.

I’d like to know if some of you have experienced any issue of that kind.  
A `sudo cat /var/log/mail.info | grep reject` would gives you a list of recently rejected mails. As far as I can see, that’s mostly legit mails in my case…

The question being, is it just an error on my side or would it be something we should really investigate and maybe consider removing spamhaus from postfix configuration.

---

<div class="post-metadata">

### Author: ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)
#### Post date: [March 2, 2023, 10:25pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/2 "2023-03-02T22:25:12Z")

</div>

Same just happened with abuseat, without spamhaus, when modifying my email address on OVH, I couldn’t receive a confirmation code because OVH mail was silently rejected as a spam.

```auto
postfix/smtpd[3229311]: NOQUEUE: reject: RCPT from mo401.mail-out.ovh.net[51.254.194.161]: 554 5.7.1 Service unavailable; Client host [51.254.194.161] blocked using cbl.abuseat.org; from=<ch9367-ovh@undelivered.ovh.com> to=<mail@domain.tld> proto=ESMTP helo=<mo401.mail-out.ovh.net>

```

That’s really an issue to consider, I’ve totally removed any spam filter from my postfix config, rather have spams in my spam box than having important emails silently rejected without any information !

---

<div class="post-metadata">

### Author: ![nouckey](https://forum.yunohost.org/user_avatar/forum.yunohost.org/nouckey/32/5270_2.png) [@nouckey](https://forum.yunohost.org/u/nouckey)
#### Post date: [March 19, 2023, 11:48am UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/3 "2023-03-19T11:48:41Z")

</div>

> [@Maniack\_Crudelis](#):
>
> The question being, is it just an error on my side or would it be something we should really investigate and maybe consider removing spamhaus from postfix configuration.

Hello, sorry I won’t be of any help unless to tell you that it is NOT just you, and it seems like an important thing to investigate ! This happens to me with various emails simply never showing up.  
When I did the command line you suggested it showed : postfix/smtpd[20526]: NOQUEUE: reject: RCPT from unknown[171.22.30.237]: 554 5.7.1 Service unavailable; Client host [171.22.30.237] blocked using [cbl.abuseat.org](http://cbl.abuseat.org); [https://www.spamhaus.org/query/ip/171.22.30.237](https://www.spamhaus.org/query/ip/171.22.30.237); from=[spameri@tiscali.it](mailto:spameri@tiscali.it) to=[spameri@tiscali.it](mailto:spameri@tiscali.it) proto=ESMTP helo=  
I know for a fact that just yesterday a personal email and a neocities email never showed up.

---

<div class="post-metadata">

### Author: ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)
#### Post date: [March 19, 2023, 1:50pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/4 "2023-03-19T13:50:36Z")

</div>

Hi @nouckey

Your answer does help actually by letting me know that I’m not the only one.  
Thank you for your feedback.

My point here was mainly to raise a concern about it and show how to investigate if you suspect it happened to you.

As I said previously though, I’ve commented out all 3 lines responsible for spam filtering, in `/etc/postfix/main.cf`

```auto
# reject_rbl_client bl.spamcop.net,
# reject_rbl_client cbl.abuseat.org,
# reject_rbl_client zen.spamhaus.org,

```

The result is that I have one spam every 2/3 days, but all the legit emails are back in my mail box.  
While waiting for the YNH team to get any interest in this matter, to not have any spam filtering is way better than the default and faulty setting.

---

<div class="post-metadata">

### Author: ![nouckey](https://forum.yunohost.org/user_avatar/forum.yunohost.org/nouckey/32/5270_2.png) [@nouckey](https://forum.yunohost.org/u/nouckey)
#### Post date: [March 19, 2023, 2:11pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/5 "2023-03-19T14:11:39Z")

</div>

Oh I didn’t understand that you actually did it ! Thank you for re-explaining that to me, I sudo nano the sh\*t out of that antispam hihi, hope that will work, that’s exactly what I wanted !

---

<div class="post-metadata">

### Author: ![Maknho](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maknho/32/3779_2.png) [@Maknho](https://forum.yunohost.org/u/Maknho)
#### Post date: [May 4, 2023, 7:25am UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/6 "2023-05-04T07:25:59Z")

</div>

I have the same difficulties with spamhaus

---

<div class="post-metadata">

### Author: ![djib](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/d/3e96dc/32.png) [@djib](https://forum.yunohost.org/u/djib)
#### Post date: [June 19, 2023, 6:59pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/7 "2023-06-19T18:59:42Z")

</div>

Awesome, thanks for sharing!

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [June 20, 2023, 2:30pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/8 "2023-06-20T14:30:29Z")

</div>

> [@Maniack\_Crudelis](#):
>
> `blocked using cbl.abuseat.org; Error: open resolver;`

The issue is stated there.

Some documentation about it: [DNSBL Error Code - Open/public resolver - The Spamhaus Project](https://www.spamhaus.org/returnc/pub/) and [Successfully accessing Spamhaus' free blocklists using a public DNS - Spamhaus Technology](https://www.spamhaus.com/resource-center/successfully-accessing-spamhauss-free-block-lists-using-a-public-dns/)

Basically your server uses an open resolver, and SpamHaus does not like that as it can be abused to circumvent their free tier.

In my case, my OVH VPS was automatically configured (in `/etc/resolv.conf` or `/etc/network/interfaces.d/` I think) with their own DNS servers. Removing that and making sure our own `dnsmasq` was used fixed the issue.

---

<div class="post-metadata">

### Author: ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)
#### Post date: [June 20, 2023, 6:39pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/9 "2023-06-20T18:39:49Z")

</div>

> [@tituspijean](#):
>
> Basically your server uses an open resolver, and SpamHaus does not like that as it can be abused to circumvent their free tier.

YunoHost is configured to use open resolvers for privacy concern. So it seems we have a problem here…  
Anyway, for what I’m concern, without spam filtering, everything is fine.

---

<div class="post-metadata">

### Author: ![djib](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/d/3e96dc/32.png) [@djib](https://forum.yunohost.org/u/djib)
#### Post date: [June 22, 2023, 5:24pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/10 "2023-06-22T17:24:37Z")

</div>

Is this issue tracked somewhere in the Yunohost project? Where could we report the issue? It feels rather serious as I understand it impacts any user with the default configuration.

---

<div class="post-metadata">

### Author: ![navanchauhan](https://forum.yunohost.org/user_avatar/forum.yunohost.org/navanchauhan/32/3867_2.png) [@navanchauhan](https://forum.yunohost.org/u/navanchauhan)
#### Post date: [September 22, 2023, 7:37pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/11 "2023-09-22T19:37:25Z")

</div>

Had this same issue where all incoming email was being marked as spam, commented out the spam lists for now.

There should be an option to configure whether emails marked spam should be rejected or tagged as such

---

<div class="post-metadata">

### Author: ![stepcellwolf](https://forum.yunohost.org/user_avatar/forum.yunohost.org/stepcellwolf/32/9366_2.png) [@stepcellwolf](https://forum.yunohost.org/u/stepcellwolf)
#### Post date: [January 18, 2024, 7:17am UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/12 "2024-01-18T07:17:27Z")

</div>

Hi, what was the solution to fix this? I’m facing this issue now with my bear-host server from [OHV issue with receiving emails](https://forum.yunohost.org/t/after-migration-from-contato-to-ovhcloud-vps-receiving-email-fails/28086/2). Can you redirect me to the right direction.

---

<div class="post-metadata">

### Author: ![notplants](https://forum.yunohost.org/user_avatar/forum.yunohost.org/notplants/32/4875_2.png) [@notplants](https://forum.yunohost.org/u/notplants)
#### Post date: [September 20, 2024, 7:36pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/14 "2024-09-20T19:36:10Z")

</div>

I have also been facing a similar issue:  
– a couple times even emails from friends who I have corresponded with in the past via email have been marked as Spam and moved to the Spam folder without me realizing.

I haven’t yet looked into logs of why they were marked as spam, but this thread has helpful leads, and I will try turning off the spam filter for now.

---

<div class="post-metadata">

### Author: ![nouckey](https://forum.yunohost.org/user_avatar/forum.yunohost.org/nouckey/32/5270_2.png) [@nouckey](https://forum.yunohost.org/u/nouckey)
#### Post date: [September 20, 2024, 8:12pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/15 "2024-09-20T20:12:59Z")

</div>

more than a year later I can say that I’m very happy with this fix commenting out anti-spam filters ! (my issue was the non-delivery period, and not the mail arriving in spam folder)

In a year I’ve had about 60 spam emails, usually caught in the “spam” folder of thunderbird, so that causes very little inconvenience.  
And I now actually get better email reception than with professional providers (I’m looking at you infomaniak, but frankly gmail was not better and the source of many headaches for email providers)

(my self-hosted adress is not my main adress, but is linked with my public domain name)

---

<div class="post-metadata">

### Author: ![yekibud](https://forum.yunohost.org/user_avatar/forum.yunohost.org/yekibud/32/4925_2.png) [@yekibud](https://forum.yunohost.org/u/yekibud)
#### Post date: [January 5, 2025, 5:38pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/16 "2025-01-05T17:38:45Z")

</div>

Can anybody on the Yunohost dev team explain why removing these over-aggressive spam filters isn’t the default, or at least an opt-out/in during installation? Receiving a bit more spam can be annoying (although, like others, I’ve faced zero impact to my spam filtering after commenting out the filters due to Thunderbird filtering), but _not_ receiving important mail from legitimate sources can be a show-stopper for using Yunohost as a mail server.

And if there are no plans to change the default, would an opt-in/out install/config option be welcome as a contribution?

---

<div class="post-metadata">

### Author: ![JfmbLinux](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jfmblinux/32/11238_2.png) [@JfmbLinux](https://forum.yunohost.org/u/JfmbLinux)
#### Post date: [January 5, 2025, 6:33pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/17 "2025-01-05T18:33:45Z")

</div>

And if you deactivate in:

```auto
/usr/share/yunohost/dnsbl_list.yml

```

```auto
- name: Spamhaus ZEN
  dns_server: zen.spamhaus.org
  website: https://www.spamhaus.org/zen/
  ipv4: true
  ipv6: true
  domain: false
  non_blacklisted_return_code: []

```

---

<div class="post-metadata">

### Author: ![m4lvin](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@m4lvin](https://forum.yunohost.org/u/m4lvin)
#### Post date: [February 13, 2025, 8:40pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/18 "2025-02-13T20:40:48Z")

</div>

What is the situation and recommendation to deal with this? I noticed that enabling the RBL is still the default, and also the use of public resolvers. So it is a matter of being lucky until I will run into this problem?

As for the `/usr/share/yunohost/dnsbl_list.yml` file: is that even used by postfix? It seems unrelated and rather to be the source of the diagnostics check for whether the IP of my server itself is on any blocklists - not about which blocklists the server should ask/use. Correct?

Edit/addition: the current default configuration is also not using “error codes” as recommended here by Spamhaus itself:  
[https://docs.spamhaus.com/datasets/docs/source/40-real-world-usage/PublicMirrors/MTAs/020-Postfix.html#configuration](https://docs.spamhaus.com/datasets/docs/source/40-real-world-usage/PublicMirrors/MTAs/020-Postfix.html#configuration)  
🤔

---

<div class="post-metadata">

### Author: ![paquiteau](https://forum.yunohost.org/user_avatar/forum.yunohost.org/paquiteau/32/8445_2.png) [@paquiteau](https://forum.yunohost.org/u/paquiteau)
#### Post date: [May 21, 2025, 2:18pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/19 "2025-05-21T14:18:33Z")

</div>

Hello there,  
I had a similar issue (VPS from OVH, sending mail from my server was fine, but receiving always failed)

For me the solution was to modify `/etc/network/interfaces.d/50-cloud-init` (as hinted by @tituspijean) as such, and reboot

```auto
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback
    # dns-nameservers 213.186.33.99 # this is an OVH IP 

auto ens3
iface ens3 inet dhcp
    accept_ra 0
    mtu 1500

# control-alias ens3
#iface ens3 inet6 static
# address <IPv6>/56
# post-up route add -A inet6 default gw <IPv6 gateway > || true
# pre-down route del -A inet6 default gw <IPv6 gateway > || true

iface ens3 inet6 static
address <Your IPv6>
netmask 128 
post-up /sbin/ip -6 route add <Your IPv6 gateway> dev ens3 
post-up /sbin/ip -6 route add default via <Your IPv6 gateway> dev ens3
pre-down /sbin/ip -6 route del default via <Your IPv6 Your IPv6 gateway> dev ens3
pre-down /sbin/ip -6 route del <Your IPv6 gateway> dev ens3

```

Commented lines was the previous configuration,and I redacted the IPv6 addresses. If I understood everything correctly, this:

- remove the custom DNS imposed by OVH
- setup IPv6 properly (disabled by default for OVH VPS): [Setting up IPv6 | Yunohost](https://doc.yunohost.org/admin/troubleshooting/ipv6/#with-a-vps-from-ovh)

I also configured reverse DNS on OVH web interface (for both IPv6 and IPv4)

---

<div class="post-metadata">

### Author: ![tierce](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tierce/32/9675_2.png) [@tierce](https://forum.yunohost.org/u/tierce)
#### Post date: [August 22, 2025, 4:21pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/20 "2025-08-22T16:21:00Z")

</div>

With Yunohost 12.1.x it is now possible to deactivate spamhaus,cop,abuse checks for incomming mails.

 ![image](https://forum.yunohost.org/uploads/default/original/2X/4/410c027ac973bc81f213643a91b4c7e06be19840.png)

Thanks folks. ❤

---

<div class="post-metadata">

### Author: ![nouckey](https://forum.yunohost.org/user_avatar/forum.yunohost.org/nouckey/32/5270_2.png) [@nouckey](https://forum.yunohost.org/u/nouckey)
#### Post date: [August 22, 2025, 5:06pm UTC](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814/21 "2025-08-22T17:06:48Z")

</div>

Thanks to the YNHST team !!

[Next page](https://forum.yunohost.org/t/trouble-with-spamhaus-marking-any-mail-as-spam/23814.md?page=2)
