[Spambayes] Using spambayes with outlook XP's hotmail connector

Piers Haken piersh at friskit.com
Sat Dec 7 02:52:54 2002


The following patch allows spambayes to correctly filter messages on
hotmail when using Outlook XP's hotmil connector.

It simply ignores the exception that occurs when spambayes tries to set
the 'spam' field on a message which resides on hotmail - the hotmail
connector doesn't support such property changes.

Piers.

Index: msgstore.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/msgstore.py,v
retrieving revision 1.36
diff -u -r1.36 msgstore.py
--- msgstore.py	25 Nov 2002 05:57:41 -0000	1.36
+++ msgstore.py	7 Dec 2002 02:35:03 -0000
@@ -631,7 +631,10 @@
 
     def Save(self):
         assert self.dirty, "asking me to save a clean message!"
-        self.mapi_object.SaveChanges(mapi.KEEP_OPEN_READWRITE |
USE_DEFERRED_ERRORS)
+        try:
+            self.mapi_object.SaveChanges(mapi.KEEP_OPEN_READWRITE |
USE_DEFERRED_ERRORS)
+        except:
+            pass
         self.dirty = False
 
     def _DoCopyMove(self, folder, isMove):




More information about the Spambayes mailing list