[imp] IMP / SpamAssassin preferences patch

Michael 'Moose' Dinn dinn@twistedpair.ca
Sat, 31 Aug 2002 19:35:42 -0300


For those folks using SpamAssassin with spamc/spamd, here's a patch to drop
some of the preferences right into Horde. I haven't finished the code for
the whitelist/blacklist - if someone else wants to tackle that I won't
complain.

If you want the SpamAssassin patch let me know.



diff -r -c imp-3.1/config/prefs.php.dist imp/config/prefs.php.dist
*** imp-3.1/config/prefs.php.dist	Sun May 26 13:50:24 2002
--- imp/config/prefs.php.dist	Sat Aug 31 19:33:15 2002
***************
*** 68,73 ****
--- 68,83 ----
      'members' => array('mailbox_return', 'use_trash', 'trashselect')
  );
  
+ $prefGroups['spamassassin'] = array(
+     'column' => _("Mail Management"),
+     'label' => _("SpamAssassin"),
+     'desc' => _("Set preferences for filtering incoming mail with SpamAssassin."),
+     'members' => array(
+ // 			'whitelist_from','blacklist_from',
+ 			'rewrite_subject', 'report_header', 
+ 			'defang_mime','use_terse_report','required_hits')
+ );
+ 
  $prefGroups['monthlytasks'] = array(
      'column' => _("Mail Management"),
      'label' => _("Maintenance Operations"),
***************
*** 760,770 ****
  // Setting value to localsql would allow you to add contacts to MySQL database
  // See turba/config/sources.php for more info
  $_prefs['add_source'] = array(
!     'value' => '',
! // 'value' => 'localsql',
      'locked' => false,
      'shared' => false,
      'type' => 'implicit'
  );
  
  // End Addressbook preferences
--- 770,838 ----
  // Setting value to localsql would allow you to add contacts to MySQL database
  // See turba/config/sources.php for more info
  $_prefs['add_source'] = array(
!     'value' => '',
! // 'value' => 'localsql',
      'locked' => false,
      'shared' => false,
      'type' => 'implicit'
  );
  
+ 
+ 
  // End Addressbook preferences
+ 
+ 
+ 
+ $_prefs['whitelist_from'] = array(
+     'type' => 'link',
+     'url' => 'whitelist_from.php',
+     'img' => 'filters.gif',
+     'desc' => _("Edit your SpamAssassin Whitelist")
+ );
+ 
+ $_prefs['blacklist_from'] = array(
+     'type' => 'link',
+     'url' => 'blacklist_from.php',
+     'img' => 'filters.gif',
+     'desc' => _("Edit your SpamAssassin Blacklist")
+ );
+ 
+ $_prefs['rewrite_subject'] = array(
+  'value' => 1,
+  'locked' => false,
+  'shared' => false,
+  'type' => 'checkbox',
+ 	'desc' => _("Should SpamAssassin change the subject of emails tagged as Spam?")
+ );
+ 
+ $_prefs['report_header'] = array(
+     'value' => 0,
+     'locked' => false,
+     'shared' => false,
+     'type' => 'checkbox',
+     'desc' => _("Should the SpamAssassin report be in the message header?")
+ );
+ $_prefs['defang_mime'] = array(
+     'value' => 0,
+     'locked' => false,
+     'shared' => false,
+     'type' => 'checkbox',
+     'desc' => _("Should SpamAssassin un-MIME HTML Spam?")
+ );
+ $_prefs['use_terse_report'] = array(
+     'value' => 0,
+     'locked' => false,
+     'shared' => false,
+     'type' => 'checkbox',
+     'desc' => _("Should SpamAssassin use the short Spam Report format?")
+ );
+ 
+ $_prefs['required_hits'] = array(
+     'value' => 5,
+     'locked' => false,
+     'shared' => false,
+     'type' => 'number',
+     'desc' => _("SpamAssassin scores Spam. Anything above this number is Spam, anything below it is not. A value of 5 is fairly agressive, 10 is fairly passive. Most Spam scores from 8 to 16.")
+ );
+ 
+ 

-- 
 Michael 'Moose' Dinn, Twisted Pair Network Consulting Incorporated
 dinn@twistedpair.ca // 902 423 4700 (voice) // 902 423 8407 (fax)

 Colocate your server in our underground bunker!