By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,753 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

ssl and timeout issue

P: n/a

I cannot manage to use socket timeouts with an imap ssl connector,and i
badly *need* it :'(

I have already mentionned it here:

Does anyone have a solution ?

(I thought of coding my own threaded timer over the ssl socket, but...)

from imaplib import IMAP4_SSL, IMAP4_SSL_PORT
import socket
test = IMAP4_SSL('', 993)
test.login('xxx@xxx', 'password') Traceback (most recent call last):
File "<stdin>", line 1, *in* ?
File "/usr/lib/python2.4/", line 480, *in* login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
File "/usr/lib/python2.4/", line 1028, *in* _simple_command
*return* self._command_complete(name, self._command(name, *args))
File "/usr/lib/python2.4/", line 858, *in* _command_complete
typ, data = self._get_tagged_response(tag)
File "/usr/lib/python2.4/", line 959, *in* _get_tagged_response
File "/usr/lib/python2.4/", line 876, *in* _get_response
resp = self._get_line()
File "/usr/lib/python2.4/", line 969, *in* _get_line
line = self.readline()
File "/usr/lib/python2.4/", line 1135, *in* readline
char =
socket.sslerror: The read operation timed out test = IMAP4_SSL('', 993)
test.login('xxx@xxx', 'password')

('OK', ['LOGIN Ok.'])

Tarek Ziadé | Nuxeo R&D (Paris, France)
CPS Plateform :
mail: tziade at | tel: +33 (0) 6 30 37 02 63
You need Zope 3 -

Oct 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.