Bug 7734 - Migrating DNSBL functions to using AskDNS
Summary: Migrating DNSBL functions to using AskDNS
Status: NEW
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: All All
: P2 enhancement
Target Milestone: Future
Assignee: SpamAssassin Developer Mailing List
: 7733 (view as bug list)
Depends on:
Reported: 2019-07-10 18:00 UTC by Henrik Krohns
Modified: 2020-07-17 04:39 UTC (History)
2 users (show)

Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Krohns 2019-07-10 18:00:50 UTC
I propose trying to deprecate as much legacy stuff as possible for 4.0.0, like DNSEval.pm, some URIDNSBL, HashBL functions etc and start preferring AskDNS and _TAGS_, which I've found quite intuitive to use.

I've already implemented locally some stuff like HEADER() support for AskDNS, so we can for example

askdns FOO_REPLYTO _HEADER(Reply-To:addr:domain)_.list.bar.com A /^127/

I added :host and :domain support to get(), but probably additionally something like this would be better:

askdns_flags FOO_REPLYTO tag_domain (tag_ip, tag_revip, tag_host...)

HashBL/URIDNSBL could be deprecated with with _URIS_, _SUBJECTURIS_, _BODYURIS_, _BODYEMAILS_, flags like tag_lc tag_sha1 tag_fulluri tag_schemelessuri etc.

Feel free to submit any ideas.
Comment 1 Henrik Krohns 2019-07-10 18:01:46 UTC
*** Bug 7733 has been marked as a duplicate of this bug. ***
Comment 2 Henrik Krohns 2019-07-10 19:16:47 UTC
- AskDNS _HEADER()_ support
- header :host :domain :ip :revip modifiers

Sending        trunk/UPGRADE
Sending        trunk/lib/Mail/SpamAssassin/Conf.pm
Sending        trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
Sending        trunk/lib/Mail/SpamAssassin/Plugin/AskDNS.pm
Transmitting file data ....done
Committing transaction...
Committed revision 1862893.
Comment 3 Henrik Krohns 2019-07-10 19:17:22 UTC
Oh yes and I pretty much rewrote the AskDNS code/logic, it was nightmare to understand. Now it's structures are per-rule based.
Comment 4 Henrik Krohns 2019-07-11 06:18:48 UTC
From users

On Thu, Jul 11, 2019 at 01:26:59AM +0100, RW wrote:
> There's a problem here that __HELO_RECORD looks to be only checking
> IPv4. The HELO has an AAAA record.

Heh, this is getting real hard..  so askdns would need to have the knowledge if resolver is even AAAA capable.  Or even A capable for that matter, on a IPv6 only server. Askdns can only return hit or not hit, and meta can only know whether subrule is run or not run. Too much mind bending for mornings..