You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2006/04/11 14:37:52 UTC
svn commit: r393204 -
/spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Conf.pm
Author: jm
Date: Tue Apr 11 05:37:50 2006
New Revision: 393204
URL: http://svn.apache.org/viewcvs?rev=393204&view=rev
Log:
clean up shortcircuit doco; also, remove some redundancy in the config-parsing code
Modified:
spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Conf.pm
Modified: spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Conf.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Conf.pm?rev=393204&r1=393203&r2=393204&view=diff
==============================================================================
--- spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Conf.pm (original)
+++ spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Conf.pm Tue Apr 11 05:37:50 2006
@@ -2217,11 +2217,15 @@
=item shortcircuit SYMBOLIC_TEST_NAME {spam|ham|default|off}
-Short Circuiting a test will force all other pending rules to be skipped.
-Recomended usage would be in conjunction with priority to set rules with strong
-S/O values (ie 1.0) to be ran first and make instant spam or ham classification
-based on that. To override a test that uses shortcircuiting, you can set the
-classification type to off.
+Shortcircuiting a test will force all other pending rules to be skipped, if
+that test is hit.
+
+Recomended usage is to use C<priority> to set rules with strong S/O values (ie.
+1.0) to be run first, and make instant spam or ham classification based on
+that.
+
+To override a test that uses shortcircuiting, you can set the classification
+type to C<off>.
=over 4
@@ -2238,8 +2242,8 @@
=item default
Shortcircuits the rest of the tests, but does not make a strict classification
-of spam or ham. rather, it uses the default score for the rule being
-shortcircuited. this would allow you, for example, to define a rule such as
+of spam or ham. Rather, it uses the default score for the rule being
+shortcircuited. This would allow you, for example, to define a rule such as
=over 4
@@ -2251,12 +2255,12 @@
=back
-the result of a message hitting the above rule would be a final score of 5.5,
+The result of a message hitting the above rule would be a final score of 5.5,
as opposed to 100 (default) if it were classified as spam.
=item off
-disables shortcircuiting on said rule.
+Disables shortcircuiting on said rule.
=back
@@ -2278,9 +2282,9 @@
}
if ($type =~ m/^(?:spam|ham|default)$/) {
dbg("shortcircuit: adding $rule $type");
- $self->{main}->{conf}->{shortcircuit}->{$rule} = $type;
+ $self->{shortcircuit}->{$rule} = $type;
} elsif ($type eq "off") {
- undef $self->{main}->{conf}->{shortcircuit}->{$rule} if $self->{main}->{conf}->{shortcircuit}->{$rule};
+ delete $self->{shortcircuit}->{$rule};
} else {
return $INVALID_VALUE;
}
@@ -2289,7 +2293,7 @@
=item shortcircuit_spam_score n.nn (default: 100)
-when shortcircuit is used on a rule, and the shortcircuit classification type
+When shortcircuit is used on a rule, and the shortcircuit classification type
is set to C<spam>, this value should be applied in place of the default score
for that rule.
@@ -2303,7 +2307,7 @@
=item shortcircuit_ham_score n.nn (default: -100)
-when shortcircuit is used on a rule, and the shortcircuit classification type
+When shortcircuit is used on a rule, and the shortcircuit classification type
is set to C<ham>, this value should be applied in place of the default score
for that rule.