You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2011/05/09 02:38:56 UTC
svn commit: r1100851 - in /spamassassin/branches/3.3:
lib/Mail/SpamAssassin/Conf.pm lib/Mail/SpamAssassin/PerMsgStatus.pm
rules/10_default_prefs.cf
Author: mmartinec
Date: Mon May 9 00:38:55 2011
New Revision: 1100851
URL: http://svn.apache.org/viewvc?rev=1100851&view=rev
Log:
Bug 6566: X-Ham-Report default wording ("has identified this incoming email as possible spam") is confusing and inaccurate
Modified:
spamassassin/branches/3.3/lib/Mail/SpamAssassin/Conf.pm
spamassassin/branches/3.3/lib/Mail/SpamAssassin/PerMsgStatus.pm
spamassassin/branches/3.3/rules/10_default_prefs.cf
Modified: spamassassin/branches/3.3/lib/Mail/SpamAssassin/Conf.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.3/lib/Mail/SpamAssassin/Conf.pm?rev=1100851&r1=1100850&r2=1100851&view=diff
==============================================================================
--- spamassassin/branches/3.3/lib/Mail/SpamAssassin/Conf.pm (original)
+++ spamassassin/branches/3.3/lib/Mail/SpamAssassin/Conf.pm Mon May 9 00:38:55 2011
@@ -3281,8 +3281,11 @@ They will be replaced by the correspondi
Some tags can take an argument (in parentheses). The argument is
optional, and the default is shown below.
- _YESNOCAPS_ "YES"/"NO" for is/isn't spam
- _YESNO_ "Yes"/"No" for is/isn't spam
+ _YESNO_ "Yes" for spam, "No" for nonspam (=ham)
+ _YESNO(spam_str,ham_str)_ returns the first argument ("Yes" if missing)
+ for spam, and the second argument ("No" if missing) for ham
+ _YESNOCAPS_ "YES" for spam, "NO" for nonspam (=ham)
+ _YESNOCAPS(spam_str,ham_str)_ same as _YESNO(...)_, but uppercased
_SCORE(PAD)_ message score, if PAD is included and is either spaces or
zeroes, then pad scores with that many spaces or zeroes
(default, none) ie: _SCORE(0)_ makes 2.4 become 02.4,
Modified: spamassassin/branches/3.3/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.3/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=1100851&r1=1100850&r2=1100851&view=diff
==============================================================================
--- spamassassin/branches/3.3/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/branches/3.3/lib/Mail/SpamAssassin/PerMsgStatus.pm Mon May 9 00:38:55 2011
@@ -1145,9 +1145,11 @@ sub get_spamd_result_log_items {
###########################################################################
sub _get_tag_value_for_yesno {
- my $self = shift;
-
- return $self->{is_spam} ? "Yes" : "No";
+ my($self, $arg) = @_;
+ my($arg_spam, $arg_ham);
+ ($arg_spam, $arg_ham) = split(/,/, $arg, 2) if defined $arg;
+ return $self->{is_spam} ? (defined $arg_spam ? $arg_spam : 'Yes')
+ : (defined $arg_ham ? $arg_ham : 'No');
}
sub _get_tag_value_for_score {
@@ -1176,9 +1178,9 @@ sub _get_tag {
$tag = "" unless defined $tag; # can be "0", so use a defined test
- %tags = ( YESNO => sub { $self->_get_tag_value_for_yesno() },
+ %tags = ( YESNO => sub { $self->_get_tag_value_for_yesno(@_) },
- YESNOCAPS => sub { uc $self->_get_tag_value_for_yesno() },
+ YESNOCAPS => sub { uc $self->_get_tag_value_for_yesno(@_) },
SCORE => sub { $self->_get_tag_value_for_score(shift) },
HITS => sub { $self->_get_tag_value_for_score(shift) },
Modified: spamassassin/branches/3.3/rules/10_default_prefs.cf
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.3/rules/10_default_prefs.cf?rev=1100851&r1=1100850&r2=1100851&view=diff
==============================================================================
--- spamassassin/branches/3.3/rules/10_default_prefs.cf (original)
+++ spamassassin/branches/3.3/rules/10_default_prefs.cf Mon May 9 00:38:55 2011
@@ -26,9 +26,15 @@
# Default template. Try to keep it under 78 columns (inside the the dots below).
# ........................................................................
clear_report_template
+if can(Mail::SpamAssassin::Conf::feature_yesno_takes_args)
+report Spam detection software, running on the system "_HOSTNAME_",
+report has_YESNO(, NOT)_ identified this incoming email as_YESNO( possible,)_ spam. The original
+report message has been attached to this so you can view it or label
+else
report Spam detection software, running on the system "_HOSTNAME_", has
report identified this incoming email as possible spam. The original message
report has been attached to this so you can view it (if it isn't spam) or label
+endif
report similar future email. If you have any questions, see
report _CONTACTADDRESS_ for details.
report