spamhaus / spamassassin-dqs

Spamhaus code for the Spamassassin plugin. See https://docs.spamhaustech.com/40-real-world-usage/SpamAssassin/000-intro.html
Apache License 2.0
54 stars 15 forks source link

Multiple issues with SH_BODYURI_* rules #55

Closed dwhitemv25 closed 10 months ago

dwhitemv25 commented 1 year ago

I have found 2 issues with the SH_BODYURIREVERSE* rules in sh.cf.

  1. The rule definitions for the SH_BODYURIREVERSE* rules use the wrong URIDNSBL method. They are defined to use urirhssub, but query ZEN, which is a DNSBL list; they should use uridnssub instead, so the hostname is resolved to an IP first and that IP is looked up in ZEN.

The offending lines are in this block: https://github.com/spamhaus/spamassassin-dqs/blob/b9ba6e4823c9e2dc4c27b1d167a751e6ad5d0f7d/4.0.0%2B/sh.cf#LL71C1-L95C1

  1. I spotted a copy-paste error here: https://github.com/spamhaus/spamassassin-dqs/blob/b9ba6e4823c9e2dc4c27b1d167a751e6ad5d0f7d/4.0.0%2B/sh.cf#L90 The body line should read:
    body      SH_BODYURI_REVERSE_XBL  eval:check_uridnsbl('SH_BODYURI_REVERSE_XBL')

This is on:

SpamAssassin version 4.0.0
  running on Perl version 5.32.1
FreeBSD spamassasin-dqs port version 1.4.0

I can generate a pull request if it is helpful.

Update: Found source of the first issue.

ricalfieri commented 11 months ago

Yes please do a pull request and I'll merge

dwhitemv25 commented 11 months ago

PR #61 opened as requested.