1

I'm not great with Python but I've inherited a script (from a former co-worker) that is giving the above error. Here's the traceback:

  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

As far as I know, this was working a month ago. I have tried Googling and looked at the only other thread of stackoverflow that references this, but it doesn't seem to apply... the error seems to be occurring within the library, since all I'm calling is the constructor with a valid hostname and port.

1 Answer 1

3

It looks like this is related to our firewall or something... which I of course have no control over... sigh...

2
  • was this the root cause? Was this ever resolved? I am seeing the same issue.
    – Jtello
    May 8, 2012 at 14:47
  • It did end up being our firewall. I still see the problem occasionally but it pops up randomly (without me changing anything) and goes away on its own. The script runs every 15 minutes so not a huge deal.
    – Derek
    May 8, 2012 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.