[Spambayes-checkins] spambayes/Outlook2000 addin.py,1.73,1.74

Mark Hammond mhammond at users.sourceforge.net
Sun Jul 20 21:53:54 EDT 2003


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

Modified Files:
	addin.py 
Log Message:
Only filter mail items. Fix:
690418: Non mail items filtered by Outlook
719586: Cannot View Spam Cues for Undeliverable Reports


Index: addin.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/addin.py,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** addin.py	20 Jul 2003 13:37:00 -0000	1.73
--- addin.py	21 Jul 2003 03:53:52 -0000	1.74
***************
*** 174,177 ****
--- 174,181 ----
  def ProcessMessage(msgstore_message, manager):
      manager.LogDebug(2, "ProcessMessage starting for", msgstore_message)
+     if not msgstore_message.IsFilterCandidate():
+         manager.LogDebug(1, "Skipping message '%s' - we don't filter ones like that!")
+         return
+ 
      if HaveSeenMessage(msgstore_message, manager):
          # Already seen this message - user probably moving it back
***************
*** 249,252 ****
--- 253,259 ----
              return
          msgstore_message = self.manager.message_store.GetMessage(item)
+         if not msgstore_message.IsFilterCandidate():
+             self.manager.LogDebug(1, "Not training message '%s' - we don't filter ones like that!")
+             return
          if HaveSeenMessage(msgstore_message, self.manager):
              # If the message has ever been previously trained as ham, then
***************
*** 687,692 ****
          for i in range(sel.Count):
              item = sel.Item(i+1)
!             if item.Class == constants.olMail:
!                 msgstore_message = self.manager.message_store.GetMessage(item)
                  ret.append(msgstore_message)
  
--- 694,699 ----
          for i in range(sel.Count):
              item = sel.Item(i+1)
!             msgstore_message = self.manager.message_store.GetMessage(item)
!             if msgstore_message and msgstore_message.IsFilterCandidate():
                  ret.append(msgstore_message)
  





More information about the Spambayes-checkins mailing list