On 7/19/2020 9:29 PM, John Hardin wrote:
>
>>
>> What do you think of this change along with removing the score from
>> 50_scores.cf?  I think it will work back to 3.3.x:
>>
>> if can(Mail::SpamAssassin::Conf::feature_blocklist_welcomelist)
>>   #bz7826 renames whitelist to welcomelist
>>   header USER_IN_WELCOMELIST_TO         eval:check_to_in_welcomelist()
>>   describe USER_IN_WELCOMELIST_TO       User is listed in
>> 'welcomelist_to'
>>   tflags USER_IN_WELCOMELIST_TO         userconf nice noautolearn
>>   score USER_IN_WELCOMELIST_TO          -6.0
>> else
>>   header USER_IN_WELCOMELIST_TO         eval:check_to_in_whitelist()
>>   describe USER_IN_WELCOMELIST_TO       User is listed in
>> 'welcomelist_to'
>>   tflags USER_IN_WELCOMELIST_TO         userconf nice noautolearn
>>   score USER_IN_WELCOMELIST_TO          -0.01
>>
>>   meta USER_IN_WHITELIST_TO             (USER_IN_WELCOMELIST_TO)
>>   describe USER_IN_WHITELIST_TO         DEPRECATED: See
>> USER_IN_WELCOMELIST_TO
>>   tflags USER_IN_WHITELIST_TO           userconf nice noautolearn
>>   score USER_IN_WHITELIST_TO            -6.0
>> endif
>
>
> That seems a better approach to me. +1

svn commit -m 'More Tweaking to USER_IN_WELCOMELIST_TO' 60_whitelist.cf
50_scores.cf
Sending        50_scores.cf
Sending        60_whitelist.cf
Transmitting file data ..
Committed revision 1880056.

>
> I was mulling the utility of a new config directive in 4.0 to address
> backwards compatibility of rule names:
>    alias  RULENAME  RULENAME_2
>
> ...which would recognize any config-file directives for RULENAME and
> apply them as if they'd been written for RULENAME_2.
>
> This would discard any existing definition of RULENAME_2 (e.g. header
> RULENAME_2 ...), and a definition of RULENAME_2 subsequent to that
> alias would be ignored and a lint warning emitted.

That would work well, yes.  How big a lift for that alias idea do you
think? 


> There is the use case of post-SA message processing looking for
> specific rule name hits - I can see custom post-SA message processing
> looking for a hit on "USER_IN_WHITELIST_TO" et al. To avoid breaking
> that we could add a "report" option to the alias command:
>
>   alias  RULENAME  RULENAME_2 report
this seems over complicated.  Do you know of anyone doing this use case
that wouldn't just add a meta rule and be done?

-- 
Kevin A. McGrail
[email protected]

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171

Reply via email to