Re: IMAP4_SSL, libgmail, GMail and corporate firewall/proxy

Discussion in 'Python' started by Andrea Gavana, Feb 17, 2011.

  1. Hi Malcolm,

    On 17 February 2011 11:44, Malcolm Greene wrote:
    > Andrea,
    >
    > What type of result do you get trying port 993 ?


    Thank you for your answer. I have tried that, with imaplib and
    libgmail. This is what I get with imaplib:

    Traceback (most recent call last):
    File "D:\MyProjects\gmail.py", line 17, in <module>
    m = imaplib.IMAP4_SSL('imap.gmail.com', 993)
    File "C:\Python26\lib\imaplib.py", line 1138, in __init__
    IMAP4.__init__(self, host, port)
    File "C:\Python26\lib\imaplib.py", line 163, in __init__
    self.open(host, port)
    File "C:\Python26\lib\imaplib.py", line 1149, in open
    self.sock = socket.create_connection((host, port))
    File "C:\Python26\lib\socket.py", line 514, in create_connection
    raise error, msg
    socket.error: [Errno 10061] No connection could be made because the
    target machine actively refused it


    And this with libgmail:

    Traceback (most recent call last):
    File "D:\MyProjects\gmail2.py", line 10, in <module>
    ga.login()
    File "C:\Python26\lib\site-packages\libgmail.py", line 305, in login
    pageData = self._retrievePage(req)
    File "C:\Python26\lib\site-packages\libgmail.py", line 348, in _retrievePage
    resp = self.opener.open(req)
    File "C:\Python26\lib\site-packages\mechanize\_opener.py", line 193, in open
    response = urlopen(self, req, data)
    File "C:\Python26\lib\site-packages\mechanize\_urllib2_fork.py",
    line 344, in _open
    '_open', req)
    File "C:\Python26\lib\site-packages\mechanize\_urllib2_fork.py",
    line 332, in _call_chain
    result = func(*args)
    File "C:\Python26\lib\site-packages\mechanize\_urllib2_fork.py",
    line 1171, in https_open
    return self.do_open(conn_factory, req)
    File "C:\Python26\lib\site-packages\gmail_transport.py", line 143, in do_open
    return ClientCookie.HTTPSHandler.do_open(self,
    ProxyHTTPSConnection.new_auth(self.proxy, self.proxy_user,
    self.proxy_passwd), req)
    File "C:\Python26\lib\site-packages\mechanize\_urllib2_fork.py",
    line 1118, in do_open
    raise URLError(err)
    urllib2.URLError: <urlopen error [Errno 10060] A connection attempt
    failed because the connected party did not properly respond after a
    period of time, or established connection failed because connected
    host has failed to respond>


    This thing is driving me crazy, and I'm not even doing it for fun...

    Thank you for your suggestions.

    Andrea.

    "Imagination Is The Only Weapon In The War Against Reality."
    http://xoomer.alice.it/infinity77/

    ==> Never *EVER* use RemovalGroup for your house removal. You'll
    regret it forever.
    http://thedoomedcity.blogspot.com/2010/03/removal-group-nightmare.html <==
    Andrea Gavana, Feb 17, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Follower
    Replies:
    10
    Views:
    676
    Fazer
    Aug 16, 2004
  2. Follower
    Replies:
    2
    Views:
    802
    =?iso-8859-1?Q?Fran=E7ois?= Pinard
    Aug 4, 2004
  3. Follower
    Replies:
    0
    Views:
    488
    Follower
    Aug 22, 2004
  4. Andrea Gavana
    Replies:
    1
    Views:
    2,759
    litrush
    Aug 11, 2011
  5. Andrea Gavana
    Replies:
    0
    Views:
    532
    Andrea Gavana
    Feb 18, 2011
Loading...

Share This Page