[#3071] Adding SpamAssassin 3+ Preferences
Summary Adding SpamAssassin 3+ Preferences
Queue Sam
Queue Version HEAD
Type Enhancement
State Resolved
Priority 2. Medium
Owners Horde Developers
Requester cgreen (at) sentex (dot) ca
Created 11/30/2005 (1135 days ago)
Due
Updated 01/13/2006 (1091 days ago)
Assigned 12/01/2005 (1134 days ago)
Resolved 01/13/2006 (1091 days ago)
Attachments sam.patch Download
Milestone
Patch No

History
01/13/2006 Jan Schneider Comment #2
State ⇒ Resolved
Reply to this comment
Tweaked and committed, thanks.
12/01/2005 Jan Schneider State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
 
11/30/2005 cgreen (at) sentex (dot) ca Comment #1
Summary ⇒ Adding SpamAssassin 3+ Preferences
Priority ⇒ 2. Medium
New Attachment: sam.patch Download
Queue ⇒ Sam
State ⇒ New
Type ⇒ Enhancement
Reply to this comment
I've recently been banging on SAM enough that it'll use SA2.x's 
required_hits / rewrite_subject / subject_tab prefs or SA3.x's 
required_score / rewrite_header prefs depending on which attributes 
are enabled in the config/attributes.php file.


I touched the following files:

lib/Driver.php - added a setStackedOption function, which functions 
like setListOption except it splits only on newline and not on 
whitespace (which would be bad since the header-type and tag are 
separated by a space).

spam.php - added ability to process multiple entry / multiple data 
attributes and pass them to the back end for storage via 
setStackedOption.

lib/OptionsForm.php - added ability to convert multiple data 
attributes to single entry format for display.  Uses getListOption, 
though a getStackedOption function that returned an array rather than 
a joined string would be simpler, since I immediately have to chop the 
string back up into an array.

lib/Driver/spamd.php - added the SA3 prefs to capabilities and a new 
mapping for required_score

config/attributes.php.dist - added the new SA3 prefs/attribs, along 
with documentation as to which set (SA2 or SA3) to use.


This has been lightly tested with the spam_sql.php driver and MySQL 
(i.e. it works for me) but is not (yet) in production here.

I haven't looked at the help system at all, though I imagine I'll have 
to before I make this Horde installation live.

The patch is against sam-HEAD-2005-11-25.


Regards,

Craig.
------