[Spambayes-checkins] spambayes/Outlook2000 msgstore.py,1.52,1.53

Mark Hammond mhammond at users.sourceforge.net
Tue Jul 22 08:01:44 EDT 2003


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

Modified Files:
	msgstore.py 
Log Message:
Fix [ 693387 ] user-composed messages are filtered.
Check the message flag for the "unsent" bit.


Index: msgstore.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/msgstore.py,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** msgstore.py	22 Jul 2003 13:37:38 -0000	1.52
--- msgstore.py	22 Jul 2003 14:01:41 -0000	1.53
***************
*** 96,99 ****
--- 96,101 ----
  MESSAGE_MOVE = 0x1 # from MAPIdefs.h
  MSGFLAG_READ = 0x1 # from MAPIdefs.h
+ MSGFLAG_UNSENT = 0x00000008
+ 
  MYPR_BODY_HTML_A = 0x1013001e # magic <wink>
  MYPR_BODY_HTML_W = 0x1013001f # ditto
***************
*** 467,471 ****
      message_init_props = (PR_ENTRYID, PR_STORE_ENTRYID, PR_SEARCH_KEY,
                            PR_PARENT_ENTRYID, # folder ID
!                           PR_MESSAGE_CLASS_A) # 'IPM.Note' etc
  
      def __init__(self, msgstore, prop_row):
--- 469,475 ----
      message_init_props = (PR_ENTRYID, PR_STORE_ENTRYID, PR_SEARCH_KEY,
                            PR_PARENT_ENTRYID, # folder ID
!                           PR_MESSAGE_CLASS_A, # 'IPM.Note' etc
!                           PR_MESSAGE_FLAGS, #unsent, from_me
!                           ) 
  
      def __init__(self, msgstore, prop_row):
***************
*** 479,482 ****
--- 483,487 ----
          tag, parent_eid = prop_row[3]
          tag, msgclass = prop_row[4]
+         tag, flags = prop_row[5]
  
          self.id = store_eid, eid
***************
*** 490,493 ****
--- 495,499 ----
          # Thus, searchkey is the only reliable long-lived message key.
          self.searchkey = searchkey
+         self.is_unsent = flags & MSGFLAG_UNSENT
          self.dirty = False
  
***************
*** 526,532 ****
          # We don't attempt to filter:
          # * Non-mail items
-         # Later we would like to add:
          # * Messages that have never been sent (ie, user-composed)
!         return self.msgclass.lower().startswith("ipm.note")
  
      def _GetPropFromStream(self, prop_id):
--- 532,538 ----
          # We don't attempt to filter:
          # * Non-mail items
          # * Messages that have never been sent (ie, user-composed)
!         return self.msgclass.lower().startswith("ipm.note") and \
!                not self.is_unsent
  
      def _GetPropFromStream(self, prop_id):





More information about the Spambayes-checkins mailing list