Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spamhaus DNSBL AS Detection #5295

Merged
merged 7 commits into from
Jul 13, 2023
Merged

Spamhaus DNSBL AS Detection #5295

merged 7 commits into from
Jul 13, 2023

Conversation

DerLinkman
Copy link
Member

This PR will solve issue: #5293

It implements a check of the public IPv4 AS and reports if it is from AWS, Cloudflare or OVH as Spamhaus is blocking them to access the zen.spamhaus.org lists.

Therefore the DQS System of Spamhaus has been implemented within Postfix which uses a new variable called SPAMHAUS_DQS_KEY.

If the key is set it will use the DQS Lists for Postscreen if not it it will check if the IP is listed as a bad asn using curl to get a list from fuzzy.mailcow.email which is generated against bgpview.io API and deactivates (if necessary) the spamhaus.org list for postfix.

@milkmaker
Copy link
Collaborator

Thanks for contributing!

I noticed that you didn't select staging as your base branch. Please change the base branch to staging.
See the attached picture on how to change the base branch to staging:

check_prs_if_on_staging.png

@DerLinkman DerLinkman linked an issue Jun 23, 2023 that may be closed by this pull request
@DerLinkman DerLinkman changed the base branch from master to staging June 23, 2023 13:08
@MAGICCC
Copy link
Member

MAGICCC commented Jul 1, 2023

I dont't have an OVH VPS, would need to get one for testing, but it looks okish

@FingerlessGlov3s
Copy link

PBL is missing when using DQS. Is there a reason for this?

@DerLinkman
Copy link
Member Author

PBL is missing when using DQS. Is there a reason for this?

Don't understand exactly what you mean by that? Could you please be a bit more prercise?

@FingerlessGlov3s
Copy link

PBL is missing when using DQS. Is there a reason for this?

Don't understand exactly what you mean by that? Could you please be a bit more prercise?

You've added the following lists

I just had another read of the PBL https://www.spamhaus.org/pbl/ and on review, I'm not 100% sure if we should add this.

@DerLinkman
Copy link
Member Author

I just had another read of the PBL https://www.spamhaus.org/pbl/ and on review, I'm not 100% sure if we should add this.

Just readded the PBL if DQS is enabled.

Can you test it? New Postfix image version has been uploaded to docker hub!

@FingerlessGlov3s
Copy link

I haven't moved to the new way of doing the DQS yet, I manually changed my config file 😅.

I guess I'd have to move from stable to nightly too right to test? Which I don't really want to do.

my main.cf has the following enteries and it's working fine.

  redacted.zen.dq.spamhaus.net=127.0.0.[10;11]*8
  redacted.zen.dq.spamhaus.net=127.0.0.[4..7]*6
  redacted.zen.dq.spamhaus.net=127.0.0.3*4
  redacted.zen.dq.spamhaus.net=127.0.0.2*3

@DerLinkman
Copy link
Member Author

Yeah looks pretty much the same as i readded now :)

But good call on moving it to nightly!

@DerLinkman DerLinkman changed the base branch from staging to nightly July 13, 2023 14:51
@milkmaker
Copy link
Collaborator

Thanks for contributing!

I noticed that you didn't select staging as your base branch. Please change the base branch to staging.
See the attached picture on how to change the base branch to staging:

check_prs_if_on_staging.png

@DerLinkman DerLinkman merged commit 2d145ba into nightly Jul 13, 2023
1 of 2 checks passed
@FingerlessGlov3s
Copy link

When this does hit stable, I'll have to have a look what changes I need to make to my main.cf so I can go back to supported config 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spamhaus implement DQS
4 participants