You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2004/08/08 05:18:18 UTC
[Bug 3674] New: Improve functionality of require_version
http://bugzilla.spamassassin.org/show_bug.cgi?id=3674
Summary: Improve functionality of require_version
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P5
Component: spamassassin
AssignedTo: spamassassin-dev@incubator.apache.org
ReportedBy: Bob@Menschel.net
Per discussion on SA-Users, the require_version config parameter limits an
entire single file to a single version of SA. There is no way to enable a
rules config file contributed by the user community to specify a range or
selection of valid SA versions.
Given that various email systems are using SA versions 2.4x, 2.5x, 2.6x, and
3.0, I can see contributed rules as falling into several categories:
a) Includes arithmetic-based meta rule(s), therefore cannot be used with
versions older than 2.50
b) Duplicates a rule distributed as part of (for example) 2.5x, and dropped in
(for ex) 2.60, but still suitable for some systems to use.
c) Duplicates a rule distributed in 3.0, but suitable for use with 2.5x and
2.6x.
Given the way require_version works now, we'd need separate files for 2.50,
2.51, 2.52, 2.53, 2.60, 2.61, 2.62, 2.63, 2.64, and 3.0.0, with different
combinations of rules, to activate/skip rules as appropriate for each system's
version. That's too difficult to manage.
Suggest that a similar config parameter be developed to a) allow for a range
of versions, and b) cover a section of a config file. Following idea
suggested by Justin Mason, maybe something like:
ifversion ($version >= 2.005000)
.... rules with arithmetic meta rules ....
endif
ifversion ($version < 3.000000)
.... rules distributed in 3.0.0 which can be used by earlier versions ....
endif
ifversion ($version >= 2.006000 && $version < 3.000000)
.... rules that should be used only in version 2.6x ....
endif
ifversion ($version >= 3.000000)
.... config files for plugins that require 3.0 functionlity ....
endif
(the idea of using a fake var like "$version" instead of just the simple
require_version type format, is so that arbitrarily complex arithmetic and
conditionals can be used.)
Rather than "endif", "endversion" might be more flexible (allowing for other
types of "if" tests in the future).
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.