[Spambayes-checkins] spambayes pop3proxy.py,1.85,1.86

Richie Hindle richiehindle at users.sourceforge.net
Mon Jul 7 15:01:23 EDT 2003


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv5726

Modified Files:
	pop3proxy.py 
Log Message:
Added a new option, no_cache_bulk_ham:

Where message caching is enabled, this option suppresses caching
of messages which are classified as ham and marked as
'Precedence: bulk' or 'Precedence: list'.  If you subscribe to a
high-volume mailing list then your 'Review messages' page can be
overwhelmed with list messages, making training a pain.  Once you've
trained Spambayes on enough list traffic, you can use this option
to prevent that traffic showing up in 'Review messages'.


Index: pop3proxy.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/pop3proxy.py,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** pop3proxy.py	2 Jul 2003 20:51:49 -0000	1.85
--- pop3proxy.py	7 Jul 2003 21:01:20 -0000	1.86
***************
*** 446,452 ****
                          state.numUnsure += 1
  
!                     # Cache the message; don't pollute the cache with test messages.
!                     if not state.isTest \
!                         and options["pop3proxy", "cache_messages"]:
                          # Write the message into the Unknown cache.
                          message = state.unknownCorpus.makeMessage(msg.getId())
--- 446,461 ----
                          state.numUnsure += 1
  
!                     # Suppress caching of "Precedence: bulk" or
!                     # "Precedence: list" ham if the options say so.
!                     isSuppressedBulkHam = \
!                         (cls == options["Hammie", "header_ham_string"] and
!                          options["pop3proxy", "no_cache_bulk_ham"] and
!                          msg.get('precedence') in ['bulk', 'list'])
! 
!                     # Cache the message.  Don't pollute the cache with test
!                     # messages or suppressed bulk ham.
!                     if (not state.isTest and
!                         options["pop3proxy", "cache_messages"] and
!                         not isSuppressedBulkHam):
                          # Write the message into the Unknown cache.
                          message = state.unknownCorpus.makeMessage(msg.getId())





More information about the Spambayes-checkins mailing list