Bug 5463 - enhance got_hit API for dynamic scores&descriptions
Summary: enhance got_hit API for dynamic scores&descriptions
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: unspecified
Hardware: All All
: P5 enhancement
Target Milestone: 3.3.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-14 12:13 UTC by Martin Sch
Modified: 2009-08-06 09:29 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
Patch against SA 3.2.0 to extend the got_hit API patch None Martin Sch [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Sch 2007-05-14 12:13:18 UTC
Some plugins want to display a) a dynamic score and b) a dynamic description in
the tags _DISPLAY_, _REPORT_, and _TESTSSCORES_.

This is currently accomplished by direct access to data fields and/or calling
_handle_hit() instead of got_hit() as it is/was described for some time in
http://wiki.apache.org/spamassassin/PluginWritingTips

I suggest a small extension of PerMsgStatus::got_hit() to provide a stable API
for this.

The appended patch does that by writing the score into Conf->{scoreset} and by
introducing an optional description parameter.
Comment 1 Martin Sch 2007-05-14 12:16:16 UTC
Created attachment 3946 [details]
Patch against SA 3.2.0 to extend the got_hit API
Comment 2 Mark Martinec 2009-08-06 09:29:45 UTC
  Bug 5463: enhance got_hit API for dynamic scores & descriptions
  (loosely based on the attached patch)
Sending        lib/Mail/SpamAssassin/PerMsgStatus.pm
Sending        lib/Mail/SpamAssassin/Plugin/Check.pm
Committed revision 801707.