You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by OliverScott <ol...@fhsinternet.com> on 2007/08/27 01:35:30 UTC

How to query the AWL at an earlier stage for Short Circuit?

I am playing with the Short Circuit plugin to speed up scanning (by skipping
Network Tests on obviously good emails) and wanted to be able to query the
AWL as part of this as I don't want to Short Circuit on BAYES_00 alone.

i.e.

Short Circuit as HAM if both BAYES_00 & AWL fire.

I tried this:

priority USER_IN_WHITELIST     -1000
priority ALL_TRUSTED            -950
priority BAYES_00                   -400

shortcircuit USER_IN_WHITELIST       on
shortcircuit ALL_TRUSTED                on


# Add a high priority rule to check if the sender is in the AWL
header __MY_AWL             eval:check_from_in_auto_whitelist()
describe __MY_AWL           Sender has been seen before.
priority __MY_AWL            -300

meta MY_HAM_SC		(( BAYES_00 + __MY_AWL ) > 1)
describe MY_HAM_SC	Clearly not SPAM.
priority MY_HAM_SC	-200
tflags MY_HAM_SC		nice
score MY_HAM_SC		-50
shortcircuit MY_HAM_SC	on


However this does not work as messages which get BAYES_00 and AWL, do not
get Short Circuited...

I presume that this is because the AWL which normally runs at a priority of
1000 can't be accessed at an earlier stage?

I still want the AWL to do its normal job once the other scoring has
finished, so don't want to make its priority less than 1000, but was hoping
that there was a way to query its information earlier in the SpamAssasssin
process.....

Any ideas?

-- 
View this message in context: http://www.nabble.com/How-to-query-the-AWL-at-an-earlier-stage-for-Short-Circuit--tf4332696.html#a12339661
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: How to query the AWL at an earlier stage for Short Circuit?

Posted by Matt Kettler <mk...@verizon.net>.
OliverScott wrote:
> I am playing with the Short Circuit plugin to speed up scanning (by skipping
> Network Tests on obviously good emails) and wanted to be able to query the
> AWL as part of this as I don't want to Short Circuit on BAYES_00 alone.
>
>   
<snip>
> I presume that this is because the AWL which normally runs at a priority of
> 1000 can't be accessed at an earlier stage?
>   
That's done because AFAIK, right now there's a single "query and update"
operation, which both queries the AWL, and updates it with new score
information all at once.

And besides this unusual application, querying the AWL before all the
rules are done being scored is useless, as you won't get the right
results out of it.  The score assigned by the AWL rule is a function of
both the current pre-AWL score, and the history. If you check the AWL
before all the rules are done, that "current score" value isn't going to
be accurate.

However, in your case, you're not trying to query the AWL for scoring
purposes, merely determine if a given sender has been seen at all
before. Which isn't really what the AWL was designed to do.

> I still want the AWL to do its normal job once the other scoring has
> finished, so don't want to make its priority less than 1000, but was hoping
> that there was a way to query its information earlier in the SpamAssasssin
> process.....
>
> Any ideas?
>   
Modify the AWL plugin code? You'd essentially want a stripped-down
version of "check_from_in_auto_whitelist" which really only checks to
see if the address exists in the DB or not, and doesn't do any score
calculation/update.