Bug 6800 - X-Spam-Checker-Version should also show what sa-update we are at
Summary: X-Spam-Checker-Version should also show what sa-update we are at
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: All All
: P2 enhancement
Target Milestone: 3.4.0
Assignee: SpamAssassin Developer Mailing List
URL: http://article.gmane.org/gmane.mail.s...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-31 04:23 UTC by jidanni
Modified: 2013-02-28 18:13 UTC (History)
3 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Collect rules versions and make them available through _RULESVERSION_ macro patch None Mark Martinec [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description jidanni 2012-05-31 04:23:08 UTC
The X-Spam-Checker-Version header should also show what sa-update we are at.

Indeed the value of the latter is often more signifigant that that of the software itself.
Comment 1 Kevin A. McGrail 2012-05-31 19:56:44 UTC
A good idea IMO.  Any chance you can submit a patch?
Comment 2 jidanni 2012-05-31 23:23:57 UTC
Thanks but "grandma lost the ability to sew long ago",
Comment 3 Mark Martinec 2012-06-05 16:01:50 UTC
Created attachment 5074 [details]
Collect rules versions and make them available through _RULESVERSION_ macro

See the attached patch. It collects ruleset versions from
their '# UPDATE version' lines, and makes them available
through a macro _RULESVERSION_, which can be used in an
add_header directive, e.g. (single line, mind the wraps) :

add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) (_RULESVERSION_) on _HOSTNAME_


trunk:
  Bug 6800: X-Spam-Checker-Version should also show
  what sa-update we are at'      
Sending lib/Mail/SpamAssassin/Conf/Parser.pm
Sending lib/Mail/SpamAssassin/Conf.pm
Sending lib/Mail/SpamAssassin/PerMsgStatus.pm
Committed revision 1346448.
Comment 4 Kevin A. McGrail 2012-06-05 16:03:44 UTC
Brilliant!
Comment 5 Mark Martinec 2012-06-05 16:38:38 UTC
I just realized the grep is now redundant (a leftover from a version where I
tried to correlate versions with filenames or restrict to a main channel).
Removing it:

trunk:
  Bug 6800 (removed a redundant grep)
  Sending lib/Mail/SpamAssassin/PerMsgStatus.pm
Committed revision 1346458.
Comment 6 Mark Martinec 2012-06-06 14:41:52 UTC
Does somebody feel like changing the 10_default_prefs.cf too
to extend the 'add_header all Checker-Version', or do we leave it
as an option to site managers?

I'd prefer to keep it as it is, i.e. with the new code offering a
macro RULESVERSION, but with unchanged default X-Spam-Checker-Version
header field.
Comment 7 Daniel Lemke 2012-06-06 14:47:33 UTC
I'd call it a 'nice to have' so no need to change the default.
Comment 8 Kevin A. McGrail 2012-06-06 15:02:48 UTC
(In reply to comment #7)
> I'd call it a 'nice to have' so no need to change the default.

Concur +1
Comment 9 Mark Martinec 2013-02-28 18:13:03 UTC
So this is done, closing.