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 2018/10/09 19:23:20 UTC
svn commit: r1843333 - in /spamassassin/trunk: UPGRADE
lib/Mail/SpamAssassin/Plugin/DCC.pm
Author: hege
Date: Tue Oct 9 19:23:20 2018
New Revision: 1843333
URL: http://svn.apache.org/viewvc?rev=1843333&view=rev
Log:
Add use_dcc_rep option to DCC
Modified:
spamassassin/trunk/UPGRADE
spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DCC.pm
Modified: spamassassin/trunk/UPGRADE
URL: http://svn.apache.org/viewvc/spamassassin/trunk/UPGRADE?rev=1843333&r1=1843332&r2=1843333&view=diff
==============================================================================
--- spamassassin/trunk/UPGRADE (original)
+++ spamassassin/trunk/UPGRADE Tue Oct 9 19:23:20 2018
@@ -33,7 +33,9 @@ Note for Users Upgrading to SpamAssassin
- Razor2 razor_fork option added. It will fork separate Razor2 process and
read in the results later asynchronously, increasing throughput.
-- DCC check is now done asynchronously if using dccifd, improving throughput
+- DCC check is now done asynchronously if using dccifd, improving throughput.
+ Commercial reputation rules can be ignored with use_dcc_rep 0, to save few
+ CPU cycles.
Note for Users Upgrading to SpamAssassin 3.4.2
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DCC.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DCC.pm?rev=1843333&r1=1843332&r2=1843333&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DCC.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DCC.pm Tue Oct 9 19:23:20 2018
@@ -147,6 +147,21 @@ Whether to use DCC, if it is available.
type => $Mail::SpamAssassin::Conf::CONF_TYPE_BOOL,
});
+=item use_dcc_rep (0|1) (default: 1)
+
+Whether to use the commercial DCC Reputation feature, if it is available.
+Default is 1 for backwards compatibility. If you don't have commercial
+license, you can disable this to ignore check_dcc_reputation_range rules and
+save a few CPU cycles.
+
+=cut
+
+ push(@cmds, {
+ setting => 'use_dcc_rep',
+ default => 1,
+ type => $Mail::SpamAssassin::Conf::CONF_TYPE_BOOL,
+ });
+
=item dcc_body_max NUMBER
=item dcc_fuz1_max NUMBER
@@ -719,10 +734,12 @@ sub finish_parsing_start {
$opts->{conf}->{priority}->{$_} = -100;
}
}
- foreach (@{$opts->{conf}->{eval_to_rule}->{check_dcc_reputation_range}}) {
- if (exists $opts->{conf}->{tests}->{$_}) {
- dbg("dcc: adjusting rule $_ priority to -100");
- $opts->{conf}->{priority}->{$_} = -100;
+ if ($opts->{conf}->{use_dcc_rep}) {
+ foreach (@{$opts->{conf}->{eval_to_rule}->{check_dcc_reputation_range}}) {
+ if (exists $opts->{conf}->{tests}->{$_}) {
+ dbg("dcc: adjusting rule $_ priority to -100");
+ $opts->{conf}->{priority}->{$_} = -100;
+ }
}
}
}
@@ -785,6 +802,7 @@ sub check_dcc_reputation_range {
return 0 if $self->{dcc_disabled};
return 0 if !$self->{main}->{conf}->{use_dcc};
+ return 0 if !$self->{main}->{conf}->{use_dcc_rep};
# Check if callback overriding rulename
my $cb;