Monday, January 10, 2011

How to fix SSL error from Python apps (urllib) when behind HTTPS proxy?

Example of a failure:

***** Processing account GMail
Copying folder structure from Gmail to MappedIMAP
Establishing connection to imap.gmail.com:993.
WARNING: Error occured attempting to sync account GMail: [Errno 8] _ssl.c:490: E
OF occurred in violation of protocol
From ubuntu Dima
  • It looks like there is a bug in the way either Gmail or whatever offlineimap uses (OpenSSL I assume?) implements SSL?

    Dima : urllib =) see my answer
    From JanC
  • Check out Greg's post here: http://blog.grossmeier.net/2009/01/25/imapfilterofflineimapmsmtpmuttabook/

    It's a really good summary and he has a sample .offlineimaprc for Gmail. His has a much different RepositoryRemote section

    [Repository RemoteGmail]
    type = IMAP
    remotehost = imap.gmail.com
    remoteuser = $user@gmail.com
    remotepass = yep
    ssl = yes
    
    From Rick
  • https://bugs.edge.launchpad.net/ubuntu/+source/python2.6/+bug/94130

    This is a bug in python/urlib[2] there are some fixes in python2.6/2.7 but apps need to be ported as well.

    EDIT

    except that I'm wrong. It uses python ssl module, which uses OpenSSL.

    From Dima

0 comments:

Post a Comment