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

Consistently use $self->{'main'}->{'registryboundaries'}->uri_to_domain where appropriate #31

Closed robertmathews closed 3 years ago

robertmathews commented 3 years ago

In several places, the code does lookups against ZRD and DBL for subdomains rather than the domain name itself, causing unnecessary extra queries.

In addition, the code compares subdomains to $skip_domains in several places, instead of comparing the domain name. This results in unnecessary ZRD and DBL queries for "sub.example.com..." even if example.com is in skip_domains.

These changes should fix both problems.

ricalfieri commented 3 years ago

I'm not sure if merging this would be a good idea, as probably DBL and ZRD will support lookups to full hostnames.

For the time being I'm leaving the pull request open as I discuss this with the rest of the team, but thanks for pointing this out