[Tickets #3071] NEW: Adding SpamAssassin 3+ Preferences

bugs@bugs.horde.org bugs at bugs.horde.org
Wed Nov 30 08:49:07 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3071
-----------------------------------------------------------------------
 Ticket             | 3071
 Created By         | cgreen at sentex.ca
 Summary            | Adding SpamAssassin 3+ Preferences
 Queue              | Sam
 Version            | HEAD
 State              | New
 Priority           | 2. Medium
 Type               | Enhancement
 Owners             | 
+New Attachment     | sam.patch
-----------------------------------------------------------------------


cgreen at sentex.ca (2005-11-30 08:49) wrote:

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.
------




More information about the bugs mailing list