[ mailman-Patches-713522 ] Spambayes integration

SourceForge.net noreply at sourceforge.net
Sun Nov 2 14:41:34 EST 2003


Patches item #713522, was opened at 2003-04-01 22:47
Message generated for change (Comment added) made by pioppo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=713522&group_id=103

Category: list administration
Group: Mailman 2.2 / 3.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Barry A. Warsaw (bwarsaw)
Assigned to: Nobody/Anonymous (nobody)
Summary: Spambayes integration

Initial Comment:
Here's a patch I developed in Jan 2003 to integrate
Spambayes http://spambayes.sf.net into Mailman.  It's
very experimental but provide here for fun.  If people
like it I could see it becoming part of Mailman 2.2 or 3.0

You need to separately download the spambayes distutils
tarball and drop it in Mailman's misc directory.  Check
that the version value in misc/Makefile.in matches.

----------------------------------------------------------------------

>Comment By: Simone Piunno (pioppo)
Date: 2003-11-02 20:41

Message:
Logged In: YES 
user_id=227443

Revised patch for 2.1.3+
This patch works with spambayes-1.0a6.1.tar.gz
You have to 
 1. download this file, 
 2. unpack it (will create directory spambayes-1.0a6)
 3. rename the directory from spambayes-1.0a6 to
spambayes-1.0a6.1,
 4. re-pack it (tar cvzf spambayes-1.0a6.1.tar.gz
spambayes-1.0a6.1)
 5. put the new tar file in the misc directory
 6. apply the new patch.
This revised patch includes a fix for bug #715248 (a bug in
spambayes) which spambayes people acknowledged but haven't
fixed so far.
Note also that spambayes-1.0a6 requires at least python 2.3
(1.0a7 should lower the requirement again to 2.2)
Happy filtering.

----------------------------------------------------------------------

Comment By: Simone Piunno (pioppo)
Date: 2003-04-07 00:41

Message:
Logged In: YES 
user_id=227443

I'm attaching a safe patch solving all the problems on Barry's one. 
It must be used together with #715248 (for spambayes 1.0a2) 
see 
http://sourceforge.net/tracker/index.php?func=detail&aid=715248&group_id=61702&atid=498103 
 
There are still missing functionalities, e.g. training on false 
negatives for non-moderated lists. 
 
Now I'm working on functionality enhancements. 

----------------------------------------------------------------------

Comment By: Simone Piunno (pioppo)
Date: 2003-04-03 22:59

Message:
Logged In: YES 
user_id=227443

I'm testing this patch on a real environment and there are 
problems, namely: 
 
1. wrong umask when creating spam.pck 
2. insuffiently defensive call to .store() 
3. creates and loads spam.pck even for lists where 
use_spambayes==0 
4. lots of these: 
 
Apr 03 22:20:33 2003 (730) Uncaught runner exception:  
Apr 03 22:20:33 2003 (730) Traceback (most recent call last): 
  File "/home/mailman21/Mailman/Queue/Runner.py", line 105, in 
_oneloop 
    self._onefile(msg, msgdata) 
  File "/home/mailman21/Mailman/Queue/Runner.py", line 155, in 
_onefile 
    keepqueued = self._dispose(mlist, msg, msgdata) 
  File "/home/mailman21/Mailman/Queue/OutgoingRunner.py", line 
69, in _dispose 
    mlist.Load() 
  File "/home/mailman21/Mailman/MailList.py", line 626, in Load 
    self._spamdb = hammie.open(path, 0) 
  File "/home/mailman21/pythonlib/spambayes/hammie.py", line 
262, in open 
    b = storage.PickledClassifier(filename) 
  File "/home/mailman21/pythonlib/spambayes/storage.py", line 
80, in __init__ 
    self.load() 
  File "/home/mailman21/pythonlib/spambayes/storage.py", line 
98, in load 
    tempbayes = pickle.load(fp) 
EOFError 
 
The attached patch is an evolution of Barry's one trying to address 
issues 1-3.  4 is still unsolved, I'm investigating. 
 
Additionally, I'd want to add an header to messages publishing 
the spambayes score, so I've added some line to SpamDetect.py 
but still without success (the header does not get appended). 

----------------------------------------------------------------------

Comment By: Simone Piunno (pioppo)
Date: 2003-04-03 22:58

Message:
Logged In: YES 
user_id=227443

I'm testing this patch on a real environment and there are 
problems, namely: 
 
1. wrong umask when creating spam.pck 
2. insuffiently defensive call to .store() 
3. creates and loads spam.pck even for lists where 
use_spambayes==0 
4. lots of these: 
 
Apr 03 22:20:33 2003 (730) Uncaught runner exception:  
Apr 03 22:20:33 2003 (730) Traceback (most recent call last): 
  File "/home/mailman21/Mailman/Queue/Runner.py", line 105, in 
_oneloop 
    self._onefile(msg, msgdata) 
  File "/home/mailman21/Mailman/Queue/Runner.py", line 155, in 
_onefile 
    keepqueued = self._dispose(mlist, msg, msgdata) 
  File "/home/mailman21/Mailman/Queue/OutgoingRunner.py", line 
69, in _dispose 
    mlist.Load() 
  File "/home/mailman21/Mailman/MailList.py", line 626, in Load 
    self._spamdb = hammie.open(path, 0) 
  File "/home/mailman21/pythonlib/spambayes/hammie.py", line 
262, in open 
    b = storage.PickledClassifier(filename) 
  File "/home/mailman21/pythonlib/spambayes/storage.py", line 
80, in __init__ 
    self.load() 
  File "/home/mailman21/pythonlib/spambayes/storage.py", line 
98, in load 
    tempbayes = pickle.load(fp) 
EOFError 
 
The attached patch is an evolution of Barry's one trying to address 
issues 1-3.  4 is still unsolved, I'm investigating. 
 
Additionally, I'd want to add an header to messages publishing 
the spambayes score, so I've added some line to SpamDetect.py 
but still without success (the header does not get appended). 

----------------------------------------------------------------------

Comment By: Simone Piunno (pioppo)
Date: 2003-04-01 23:49

Message:
Logged In: YES 
user_id=227443

LOL! 

----------------------------------------------------------------------

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2003-04-01 23:19

Message:
Logged In: YES 
user_id=12800

Oh please gawds of SF, accept my burnt offering of a patch
as my supplication to your greatness.  I have Checkethed the
Holy CheckBox and Fillethed in the Holy TextBox.  Now I go
to Submitteth this Update.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=713522&group_id=103



More information about the Mailman-coders mailing list