You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2022/05/11 15:12:26 UTC
svn commit: r1900812 - /spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Shortcircuit.pm
Author: hege
Date: Wed May 11 15:12:25 2022
New Revision: 1900812
URL: http://svn.apache.org/viewvc?rev=1900812&view=rev
Log:
Don't override existing priority unless it's default 0
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Shortcircuit.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Shortcircuit.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Shortcircuit.pm?rev=1900812&r1=1900811&r2=1900812&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Shortcircuit.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Shortcircuit.pm Wed May 11 15:12:25 2022
@@ -89,9 +89,12 @@ To override a test that uses shortcircui
type to C<off>.
Note that DNS and other network lookups are launched when SA reaches
-priority -100. If you want to shortcircuit scanning before the network
+priority -100. If you want to shortcircuit scanning before any network
queries are sent, you need to set lower than -100 priority to any such rule,
-like -200 in the examples below.
+like -200 as in the examples below.
+
+Shortcircuited test will be automatically set to priority -200, but only if
+the original priority is unchanged at default 0.
=over 4
@@ -160,7 +163,8 @@ to:
# set the defaults:
$self->{shortcircuit}->{$rule} = $type;
- $self->{priority}->{$rule} = -200;
+ # don't override existing priority unless it's default 0
+ $self->{priority}->{$rule} ||= -200;
my $tf = $self->{tflags}->{$rule};
$self->{tflags}->{$rule} = ($tf ? $tf." " : "") .