我对Python不太好但是我继承了一个脚本(来自前同事),它给出了上述错误。这是追溯:
File "/abackup/rob/python/mail/one_and_one/__init__.py", line 119, in open
mailbox = imaplib.IMAP4_SSL(self.host, self.port)
File "/usr/local/lib/python2.6/imaplib.py", line 1137, in __init__
IMAP4.__init__(self, host, port)
File "/usr/local/lib/python2.6/imaplib.py", line 163, in __init__
self.open(host, port)
File "/usr/local/lib/python2.6/imaplib.py", line 1150, in open
self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile)
File "/usr/local/lib/python2.6/ssl.py", line 350, in wrap_socket
suppress_ragged_eofs=suppress_ragged_eofs)
File "/usr/local/lib/python2.6/ssl.py", line 118, in __init__
self.do_handshake()
File "/usr/local/lib/python2.6/ssl.py", line 293, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [Errno 8] _ssl.c:480: EOF occurred in violation of protocol
据我所知,这是一个月前的工作。我已经尝试了Googling并查看了引用它的stackoverflow的唯一其他线程,但它似乎没有应用......错误似乎发生在库中,因为我正在调用的是具有有效的构造函数主机名和端口。
答案 0 :(得分:1)
看起来这与我们的防火墙或其他东西有关......我当然无法控制......叹息......