6.0.0-alpha12
6/8/25

[#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 (at)
Requester cgreen (at) sentex (dot) ca
Created 11/30/2005 (7130 days ago)
Due
Updated 01/13/2006 (7086 days ago)
Assigned 12/01/2005 (7129 days ago)
Resolved 01/13/2006 (7086 days ago)
Milestone
Patch No

History
01/13/2006 07:52:19 PM Jan Schneider Comment #2
State ⇒ Resolved
Reply to this comment
Tweaked and committed, thanks.
12/01/2005 09:41:59 AM Jan Schneider Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
 
11/30/2005 04:49:06 PM cgreen (at) sentex (dot) ca Comment #1
State ⇒ New
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ Adding SpamAssassin 3+ Preferences
Queue ⇒ Sam
New Attachment: sam.patch Download
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.

------

Saved Queries