--- lib/Mail/SpamAssassin/PerMsgStatus.pm.bckp +++ lib/Mail/SpamAssassin/PerMsgStatus.pm @@ -2212,6 +2212,12 @@ C plugin call, called by this method. If unset, I<'unknown'> is used. +=item description => $string + +Optional: a custom rule description string. This is used in the +C plugin call, called by this method. If unset, the static +description is used. + =back Backwards compatibility: the two mandatory arguments have been part of this API @@ -2239,6 +2245,11 @@ # default ruletype, if not specified: $params{ruletype} ||= 'unknown'; + for my $set (0..3) { + $self->{conf}->{scoreset}->[$set]->{$rule} = + sprintf("%0.3f", $params{score} || $self->{conf}->{scores}->{$rule}); + } + $self->_handle_hit($rule, $params{score} || $self->{conf}->{scores}->{$rule}, $area, @@ -2243,7 +2254,7 @@ $params{score} || $self->{conf}->{scores}->{$rule}, $area, $params{ruletype}, - $self->{conf}->get_description_for_rule($rule) || $rule); + $params{description} || $self->{conf}->get_description_for_rule($rule) || $rule); # take care of duplicate rules, too (bug 5206) my $dups = $self->{conf}->{duplicate_rules}->{$rule};