Bug 7032 - Disable awl when some other rule hit
Summary: Disable awl when some other rule hit
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-07 13:13 UTC by Nuno Fernandes
Modified: 2014-04-07 14:34 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
patch to disable awl on some rules patch None Nuno Fernandes [NoCLA]
patch to disable awl on some rules - docs included patch None Nuno Fernandes [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Nuno Fernandes 2014-04-07 13:13:54 UTC
I would like to have awl completely disabled when some other rule hit so that the awl working against sysadmin could be disabled.

To that purpose i've implemented the attached patch that allows that if a specific rule hits, awl gets disabled. It doesn't compute the average and add it to it's database. The only thing that is required is that the rule has score  != 0 and the tflag stating "noawl".

With the attached patch and the following example, i can make sure awl is disabled:

# Rule to disable awl
header  AWL_OFF  From =~ /me\@home\.com/i
tflags  AWL_OFF  noawl
score   AWL_OFF  0.001
Comment 1 Nuno Fernandes 2014-04-07 13:14:38 UTC
Created attachment 5200 [details]
patch to disable awl on some rules
Comment 2 Kevin A. McGrail 2014-04-07 13:18:03 UTC
Beyond dealing with the issue of functionality, the patch needs to be includive of more comments and documentation.  Will not commit without more documentation, sorry.

See autolearn_force in lib/Mail/SpamAssassin/Conf.pm as a minimum starting point example.
Comment 3 Nuno Fernandes 2014-04-07 13:38:29 UTC
Created attachment 5201 [details]
patch to disable awl on some rules - docs included

Added the doc part to it.

############

=item  noawl

This flag is specific when using AWL plugin.

Normally, AWL plugin normalizes scores via auto-whitelist. In some scenarios
it works against the system administrator when trying to add some rules to
correct miss-classified email. When AWL plugin searches the email and finds 
the noawl flag it will exit without normalizing the score nor storing the
value in db.

############

Let me know if you need anything else.
Comment 4 Kevin A. McGrail 2014-04-07 14:34:41 UTC
It's a trivial patch so you don't need a CLA.

svn commit -m 'Adding tflag for noawl thanks to Nuno Fernandes - Bug 7032'
Sending        lib/Mail/SpamAssassin/Conf.pm
Sending        lib/Mail/SpamAssassin/Plugin/AWL.pm
Transmitting file data ..
Committed revision 1585485.
Comment 5 Kevin A. McGrail 2014-04-07 14:34:53 UTC
Marking resolved