Complete.Org: Mailing Lists: Archives: offlineimap: January 2009:
Returning to sslerror: (8, 'EOF occurred in violation of protocol')
Home

Returning to sslerror: (8, 'EOF occurred in violation of protocol')

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: Returning to sslerror: (8, 'EOF occurred in violation of protocol')
From: Paul Hinze <paul.t.hinze@xxxxxxxxx>
Date: Fri, 23 Jan 2009 13:25:29 -0600
Reply-to: offlineimap@xxxxxxxxxxxx

Dear OfflineIMAPers,

I run a relatively recent version of offlineimap-master pretty much
constantly during the workday.  I use it to pull mail from two IMAP
connections--a personal GMail account and an Exchange server for my work
email--so that I can use mutt as my primary MUA.

While for the most part OfflineIMAP does exactly what I need, for both
of these accounts (only one thread running) I regularly experience all
out crashes with the following error:

> sslerror: (8, 'EOF occurred in violation of protocol')

So, from what I gather, this error has to do with the remote server not
closing a TLS connection properly.  Now, I know that neither GMail IMAP
nor Exchange IMAP is exactly the paragon implementation of the protocol,
and I know that John Goerzen has repeatedly explained that this is not
the fault of OfflineIMAP.

Reading this on python-list makes me wonder if the error really warrants
a program crash though:
 
Robert <k.robert at gmx.de> writes on python-list:
> Most SSL servers and clients (primarily HTTP, but some SMTP as well) are
> broken in this regard: they do not properly negotiate TLS connection
> shutdown.  This causes one end or the other to notice an SSL protocol error.
> Most of the time, the only thing left to do after the TLS connection
> shutdown is normal TCP connection shutdown, so the error doesn't lead to any
> problems (which is probably why so much software generates this problem).
> Of course, there's no way to *tell* if this is the case or not, at least
> programmatically.  If you receive an OK response to your DATA, you probably
> don't need to worry, since you have gotten what you wanted out of the
> conversation.
> 
> It's entirely possible that the fault here lies on gmail's end, but it is
> also possible that the fault is in your code or the standard library ssl
> support.  Unless you want to dive into Python's OpenSSL bindings or start
> examining network traces of SSL traffic, you probably won't be able to
> figure out who's to blame in this particular case.  The simplest thing to do
> is probably just capture and discard that particular error (again, assuming
> you are getting an OK resposne to your DATA command).
> 
> In fact I saw the same problem with SSL-SMTP and Googles GMAIL. the sslerror
> can be ignored.

http://mail.python.org/pipermail/python-list/2005-August/338280.html

So, my question is this: is there a way for OfflineIMAP to just ignore
this error coming from the SSL layer so I don't have to restart it
constantly?  Perhaps this could be an option for users forced to
interact with bad IMAP servers.  If it's technically possible,
I'm willing to work on a patch.

Cheers,

Paul



[Prev in Thread] Current Thread [Next in Thread]