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 2004/12/18 02:22:40 UTC

svn commit: r122693 - /spamassassin/branches/3.0/lib/Mail/SpamAssassin/Conf.pm

Author: jm
Date: Fri Dec 17 17:22:39 2004
New Revision: 122693

URL: http://svn.apache.org/viewcvs?view=rev&rev=122693
Log:
bug 3826: version_tag should be an administrator setting.  trivial fix
Modified:
   spamassassin/branches/3.0/lib/Mail/SpamAssassin/Conf.pm

Modified: spamassassin/branches/3.0/lib/Mail/SpamAssassin/Conf.pm
Url: http://svn.apache.org/viewcvs/spamassassin/branches/3.0/lib/Mail/SpamAssassin/Conf.pm?view=diff&rev=122693&p1=spamassassin/branches/3.0/lib/Mail/SpamAssassin/Conf.pm&r1=122692&p2=spamassassin/branches/3.0/lib/Mail/SpamAssassin/Conf.pm&r2=122693
==============================================================================
--- spamassassin/branches/3.0/lib/Mail/SpamAssassin/Conf.pm	(original)
+++ spamassassin/branches/3.0/lib/Mail/SpamAssassin/Conf.pm	Fri Dec 17 17:22:39 2004
@@ -2456,6 +2456,36 @@
 
 =over 4
 
+=item version_tag string
+
+This tag is appended to the SA version in the X-Spam-Status header. You should
+include it when modify your ruleset, especially if you plan to distribute it.
+A good choice for I<string> is your last name or your initials followed by a
+number which you increase with each change.
+
+The version_tag will be lowercased, and any non-alphanumeric or period
+character will be replaced by an underscore.
+
+e.g.
+
+  version_tag myrules1    # version=2.41-myrules1
+
+=cut
+
+  push (@cmds, {
+    setting => 'version_tag',
+    is_admin => 1,
+    code => sub {
+      my ($self, $key, $value, $line) = @_;
+      my $tag = lc($value);
+      $tag =~ tr/a-z0-9./_/c;
+      foreach (@Mail::SpamAssassin::EXTRA_VERSION) {
+        if($_ eq $tag) { $tag = undef; last; }
+      }
+      push(@Mail::SpamAssassin::EXTRA_VERSION, $tag) if($tag);
+    }
+  });
+
 =item test SYMBOLIC_TEST_NAME (ok|fail) Some string to test against
 
 Define a regression testing string. You can have more than one regression test
@@ -3048,35 +3078,6 @@
   push (@cmds, {
     setting => 'require_version',
     code => sub {
-    }
-  });
-
-=item version_tag string
-
-This tag is appended to the SA version in the X-Spam-Status header. You should
-include it when modify your ruleset, especially if you plan to distribute it.
-A good choice for I<string> is your last name or your initials followed by a
-number which you increase with each change.
-
-The version_tag will be lowercased, and any non-alphanumeric or period
-character will be replaced by an underscore.
-
-e.g.
-
-  version_tag myrules1    # version=2.41-myrules1
-
-=cut
-
-  push (@cmds, {
-    setting => 'version_tag',
-    code => sub {
-      my ($self, $key, $value, $line) = @_;
-      my $tag = lc($value);
-      $tag =~ tr/a-z0-9./_/c;
-      foreach (@Mail::SpamAssassin::EXTRA_VERSION) {
-        if($_ eq $tag) { $tag = undef; last; }
-      }
-      push(@Mail::SpamAssassin::EXTRA_VERSION, $tag) if($tag);
     }
   });