[Spambayes-checkins] spambayes/spambayes ImapUI.py,1.10,1.11
anadelonbrin at users.sourceforge.net
Sun May 11 16:49:44 EDT 2003
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv2419/spambayes
Add SSL support to imapfilter, if the imaplib has the IMAP_SSL
class (Python 2.3b1 has this, 2.2.2 does not).
THIS IS UNTESTED, but should work (for the most part, it's just
passing a different class to inherit from). I don't have 2.3, so can't
test it yet. Please let me know if there are problems with it.
(I have tested that normal, non-SSL filtering still works).
RCS file: /cvsroot/spambayes/spambayes/spambayes/ImapUI.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ImapUI.py 6 May 2003 23:33:24 -0000 1.10
--- ImapUI.py 11 May 2003 22:49:42 -0000 1.11
*** 21,36 ****
- o There is a function to get a list of all the folders available on
- the server, but nothing is done with this. Obviously what we would
- like is to present a page where the user selects (checkboxes) the
- folders that s/he wishes to filter, the folders s/he wishes to use
- as train-as-ham and train-as-spam, and (radio buttons) the folders
- to move suspected spam and unsures into. I think this should be
- a separate page from the standard config as it's already going to
- be really big if there are lots of folders to choose from.
- An alternative design would be to have a single list of the folders
- and five columns - three of checkboxes (filter, train-as-spam and
- train-as-ham) and two of radio buttons (spam folder and ham folder).
- I think this might be more confusing, though.
o This could have a neat review page, like pop3proxy, built up by
asking the IMAP server appropriate questions. I don't know whether
--- 21,24 ----
*** 96,99 ****
--- 84,94 ----
def __init__(self, cls, imap, pwd):
+ # Only offer SSL if it is available
+ from imaplib import IMAP_SSL
+ except ImportError:
+ parm_list = list(parm_map)
+ parm_list.remove(("imap", "use_ssl"))
+ parm_map = tuple(parm_list)
UserInterface.UserInterface.__init__(self, cls, parm_map)
classifier = cls
More information about the Spambayes-checkins