Bug 8077 - HashBL "number" options
Summary: HashBL "number" options
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement
Target Milestone: 4.0.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-28 16:21 UTC by Giovanni Bechis
Modified: 2022-12-05 15:23 UTC (History)
3 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Num HashBL option patch None Giovanni Bechis [HasCLA]
Num HashBL option patch None Giovanni Bechis [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Bechis 2022-11-28 16:21:58 UTC
Created attachment 5859 [details]
Num HashBL option

In some cases, chars matched by check_hashbl_bodyre() are not clean and extraneous chars should be cleaned before sending the dns query.

When trying to match phone numbers, for example, the check_hashbl_bodyre() match may be of the form "+1 (123) 456-7890", the attached diff will remove non numbers chars from the match.
Comment 1 Henrik Krohns 2022-11-29 07:03:02 UTC
I think if it's ok if we check that empty results don't create unnecessary lookups (just in case someone does bad regexps).

push @matches, $match;
-->
push @matches, $match  if $match ne '';
Comment 2 Giovanni Bechis 2022-11-29 14:22:40 UTC
Created attachment 5860 [details]
Num HashBL option

Updated patch with hege@ suggestions.
Comment 3 Kevin A. McGrail 2022-11-29 22:24:53 UTC
I'm +1 on this and it should be safe for 4.0.  That gives us 3 +1s.
Comment 4 Henrik Krohns 2022-12-04 14:38:13 UTC
Yes +1 for fast commit so we can get on with 4.0.0
Comment 5 Giovanni Bechis 2022-12-05 15:23:20 UTC
Sending        lib/Mail/SpamAssassin/Plugin/HashBL.pm
Transmitting file data .done
Committing transaction...
Committed revision 1905766.