[spambayes-bugs] [ spambayes-Patches-1707808 ] imap-tte

SourceForge.net noreply at sourceforge.net
Wed May 9 17:04:42 CEST 2007


Patches item #1707808, was opened at 2007-04-25 22:12
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498105&aid=1707808&group_id=61702

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: David Abrahams (david_abrahams)
Assigned to: Skip Montanaro (montanaro)
Summary: imap-tte

Initial Comment:
A patch that enables train-to-exhaustion support for IMAP.

This patch has three parts:

1. an __init__.py in the scripts folder that makes some of the classes in sb_imapfilter available to tte.py.  This change is not represented in the patch file; you'll have to add __init__.py yourself.

2. Some imap support in mboxutils.py

3. Some refactoring in sb_imapfilter.py to sink the port selection logic into IMAPSession.__init__ so that it can be used by tte.py.  In the process we simplify the uses of IMAPSession considerably.

This is probably not refactored in the best way; in particular, #1 above should probably never happen and whatever is used by both sb_imapfilter.py and tte.py should be moved into spambayes/ or at least out of scripts/.  However, before taking on any major restructuring I wanted to get this into the hands of a spambayes devel who can make sure I'm on the right track.

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

>Comment By: Skip Montanaro (montanaro)
Date: 2007-05-09 10:04

Message:
Logged In: YES 
user_id=44345
Originator: NO

Dave,

Do you think this has stabilized well enough to apply to the
repository?  If so, I'll just make a quick review and apply
it.

Skip


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

Comment By: David Abrahams (david_abrahams)
Date: 2007-05-09 00:33

Message:
Logged In: YES 
user_id=52572
Originator: YES

That patch evolved yet again, massively.  I implemented a version of
culling for IMAP and refactored tte.py to greatly simplify it and remove
redundancy.  Hope you find that nice and not annoying ;-)
File Added: sb.patch

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

Comment By: David Abrahams (david_abrahams)
Date: 2007-04-26 17:03

Message:
Logged In: YES 
user_id=52572
Originator: YES

It looks like I forgot one thing in sb_imapfilter.py:

@@ -1200,6 +1209,7 @@
             imap_filter = IMAPFilter(classifier, message_db)
 
         httpServer = UserInterfaceServer(options["html_ui", "port"])
+        pwds = [ x[2] for x in servers_data ]
         httpServer.register(IMAPUserInterface(classifier, imaps, pwds,
                                               IMAPSession, stats=stats,
                                               close_db=close_db,


I've attached a complete patch that contains that change and all of my
other fixes/workarounds (I have several patches in this tracker that
haven't been acted on).  You can ignore it if you prefer and just make the
additional change above.

File Added: spambayes.patch

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498105&aid=1707808&group_id=61702


More information about the Spambayes-bugs mailing list