[Spambayes-checkins] spambayes/spambayes Options.py,1.119,1.120
Tony Meyer
anadelonbrin at users.sourceforge.net
Mon Jan 3 07:51:48 CET 2005
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13766/spambayes
Modified Files:
Options.py
Log Message:
Implement part of [ 753708 ] Support POP over SSL
If the use_ssl option is on (or automatic and the POP3 server port is 995) then sb_server
will try and make a SSL/TLS connection to the server, rather than a regular connection.
Note that the connection between sb_server and the mail client is *not* SSL/TLS -
I think that would mean we needed to have SSL/TLS server code, which doesn't look
easy, and isn't in the Python stdlib. That's almost certainly a local (or at least
controlled) connection, anyway, so that shouldn't matter.
This *mostly* works (with Python 2.4 or 2.3.5 - 2.3.4 has an outstanding bug)).
The remaining problem is that if the incoming data is larger than the buffer (4096)
then the final chunk isn't received until a new command is send. This screws all
sorts of things up. I can't figure out why that is though - select.select seems
to ignore the remaining bit waiting (maybe select.select works differently with SSL
sockets?). I'll have another crack at it tomorrow, unless someone else figures it
out overnight.
Index: Options.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/Options.py,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -d -r1.119 -r1.120
*** Options.py 2 Jan 2005 05:00:40 -0000 1.119
--- Options.py 3 Jan 2005 06:51:43 -0000 1.120
***************
*** 788,791 ****
--- 788,799 ----
used for classifications (i.e. results may be effected)."""),
REAL, RESTORE),
+
+ ("use_ssl", "Connect via a secure socket layer", False,
+ """Use SSL to connect to the server. This allows spambayes to connect
+ without sending data in plain text.
+
+ Note that this does not check the server certificate at this point in
+ time.""",
+ (False, True, "automatic"), DO_NOT_RESTORE),
),
More information about the Spambayes-checkins
mailing list