[spambayes-dev] breakage in imapfilter

Meyer, Tony T.A.Meyer at massey.ac.nz
Wed Jun 18 16:14:06 EDT 2003

> The code below is from ImapUI.py - the stuff in the 
> ImportError section is totally busted. I'm not sure what it's 
> supposed to be doing, so I'll leave it for someone who's more 
> acquainted with the code to fix...

In what way is it busted?  It works for me.  If the ImportError is
raised (ie IMAP_SSL is not available, as in pre Python 2.3), then it
removes the "imap", "use_ssl" option from the list of options to be
presented (parm_map).

This is parm_map before the ImportError:
(('IMAP Options', None), ('imap', 'server'), ('imap', 'username'),
('imap', 'pas
sword'), ('imap', 'use_ssl'), ('Header Options', None), ('pop3proxy',
'), ('pop3proxy', 'notate_subject'), ('Headers', 'include_score'),
('Headers', '
include_thermostat'), ('Headers', 'include_evidence'), ('pop3proxy',
_to'), ('pop3proxy', 'strip_incoming_mailids'), ('Storage Options',
None), ('Sto
rage', 'persistent_storage_file'), ('Storage',
'messageinfo_storage_file'), ('St
atistics Options', None), ('Categorization', 'ham_cutoff'),
('Categorization', '
spam_cutoff'), ('Classifier',

This is it afterwards:
(('IMAP Options', None), ('imap', 'server'), ('imap', 'username'),
('imap', 'pas
sword'), ('Header Options', None), ('pop3proxy', 'notate_to'),
('pop3proxy', 'no
tate_subject'), ('Headers', 'include_score'), ('Headers',
 ('Headers', 'include_evidence'), ('pop3proxy', 'add_mailid_to'),
'strip_incoming_mailids'), ('Storage Options', None), ('Storage',
orage_file'), ('Storage', 'messageinfo_storage_file'), ('Statistics
Options', No
ne), ('Categorization', 'ham_cutoff'), ('Categorization',
'spam_cutoff'), ('Clas
sifier', 'experimental_ham_spam_imbalance_adjustment'))

They are identical, except that the second is missing the option that it
is meant to be.

This is tested with Python 2.2.3 & 2.2.2.  I haven't tested with 2.3,
but the ImportError shouldn't be raised in that case (because IMAP_SSL
should be available).

=Tony Meyer

More information about the spambayes-dev mailing list