Thursday, July 10, 2008

Python : POP3 SSL Gmail Proxy

There was a friend of mine who went to Macau and his company uses Gmail for hosting corporate emails. He has a local mailserver that would want to download from this gmail and it doesnt support POP3 over SSL (port 995).

So once again Python comes to the rescue, 2 hours later, its done. A generic POP3SSL proxy that will allow any mailserver/client to collect mails from gmail via POP3SSL.

Just run : pop3ssl.exe host port (ur local ip and port that u want to use as proxy)
Example : pop3ssl 110 (or if ur mailserver is in the same machine, use another port)

Download it here :

Note although its free for use, pls leave a comment here on how this program helped you.


  1. thank you !!!! i was looking for such a solution . my office email server is 7 years old software but very stable and my boss does not want to change but some of us need emails to download from the GMail and the mailserver could not .
    i ran your sslpop3 and it worked like a charm!

  2. This is awesome stuff!! I totally could make use of this... if it was available for Linux. Any chance of a Linux version? :-)

  3. Your pop3ssl utility is nice as far as it goes. Thank you. It would be
    nicer to have the same thing for the SMTP side as well.

    There is one bug. Almost every time I retrieve mail through the pop3ssl
    proxy, an extra message is retrieved which is completely blank. When
    that happens, the log file looks like this:

    +OK user accepted
    client command :PASS
    +OK User successfully logged on.
    client command :STAT
    client command :UIDL
    UIDL 1
    +OK 1 AAQMiIwAAAwJr1Vz9J1JjmUOOLFw/QKg
    client command :UIDL
    1 AAQMiIwAAAwJr1Vz9J1JjmUOOLFw/QKg
    client command :LIST
    LIST 1
    client command :LIST
    LIST 1
    client command :RETR
    RETR 1
    Traceback (most recent call last):
    File "", line 348, in run
    File "", line 216, in handleRetr
    File "poplibmod.pyc", line 250, in retr
    File "poplibmod.pyc", line 185, in _longcmd
    File "poplibmod.pyc", line 167, in _getlongresp
    File "<string>", line 1, in sendall
    error: (10054, 'Connection reset by peer')

    Closing connection

    It is possible that this blank message is in place of the newest message
    in the mailbox; it is hard to get an independent idea of what is in the
    mailbox since it can change at any time as new mail comes in. But I have
    some suspicion that the newest message is being replaced by this blank
    message. I haven't yet figured out whether the newest message is being
    lost or is just not seen until later.

    Does that give you any idea what might be going wrong? Without source
    code I can't interpret the traceback myself.

    I believe the mail server being used is an Outlook server. The Claris
    Emailer mail client could be closing the connection when it is finished
    sooner than you expect? I am not sure whether the error 10054 is for the
    client-to-proxy connection or the proxy-to-server connection.

    (I am not actually using pop3ssl nor any other proxy any more, but the world in general may still be interested in the answer.)

  4. Hi Dave,
    It seems that after the last reading from the gmail server, your client has closed the socket instead of waiting for the server response command.
    Yes, i think the claris email client closes before it receive the server response.

    Basically the command was expected a long response from server, that means a response followed by some text. However in this case after passing the response to the client, it gets the text from the server and failed to pass to the client.

    Have u tried with another client?
    I suggest u load in rinetd + logging and show me the result then we can see what was the command that ur client recved and immediately close.

  5. Awesome! Just what we needed. Thanks :)

  6. I found the authors solution interesting, but decided to use stunnel in our setup.

    stunnel example configuration:

    client = yes
    # Configure our secured POP3 and SMTP services
    accept = localhost:110
    connect =

    accept = localhost:25
    connect =

    I use this to proxy connections to localhost on our server for a helpdesk program that does not support ssl/tls connections.

    This works fine for proxying connections to services other than gmail with ssl support.

  7. can u provide the way how can I implement proxy tunneling using openssl ? I want to connect the ssl server which is in internet environment. but I am inside proxy. so I want to bypass the proxy...
    can u suggest how can I do?

  8. You do not know very well what it can be - What's the Bowflex accurately?

    my site - bowflex selecttech dumbbells

  9. Contrary to health club equipment, wherever targeted muscle
    tissues are isolated, teaching with free weights forces your body to continuously employ supportive,
    stabilizing muscle tissue.

    Check out my homepage -

  10. Pull your arms around your system and down close to your hips.

    My web site :: primary

  11. Many of these nutritional supplements and fat-burners will not get the job done and
    so they may have undesirable unwanted effects.

    My website; Read

  12. The distinctive issue concerning the Peak Challenged is the
    fact that it provides the lesson in a very weekly basis.

    Also visit my webpage - bowflex 552

  13. The majority of ladies from all over the earth have cellulite.

    Feel free to surf to my web page: dumbbell sets

  14. In case your response to both equally issues is yes, then you definately really
    should look into Bowflex Treadmill.

    Check out my website bowflex selecttech dumbbells

  15. Additional sets could be obtained to incorporate weight.

    My blog post cheap dumbbells set

  16. Dumbbells might take up a lot of room, while, so you may not want to
    have got a established of these as your central decorative piece as part of your family room.

    my blog post

  17. Horizon Evolve SG Compact Treadmill - this smooth, modern-looking equipment is ideal for just a woman who's got an eye for design and operation.

    My web-site: best adjustable dumbbells

  18. The aim will be to cause you to pound for pound a robust as well as in shape human being.

    Look into my web blog - Read Alot more

  19. When you look at to transfer together this site, you'll be given a wide variety of dumbbell sets which you can select which you'll be able to use for
    your personal everyday workout.

    Here is my blog post :: bowflex dumbbells 552

  20. The house health club equipment out there currently are ergonomically developed to flow
    using your normal physique movements, you do not change right workout
    kind as with the Bowflex device, it's the opposite way around.

    Here is my web blog; mouse click the following internet site

  21. Quite possibly the most modern cross trainers deliver not simply basic firming
    throughout your body but will also hold the collection of taking
    up complicated workout applications to boost the intensity, length and likewise
    frequency from the routine.

    Here is my homepage: Click That Link

  22. As soon as you are for the machine, your thighs, calves and
    abs are in motion providing the human body extra warmth wanted for fat-burning process when your muscle groups are
    now being toned.

    Review my web blog - adjustable weights

  23. The burden of the dumbbells might be improved given that the triceps assemble up in energy.

    Here is my web blog:

  24. Nonetheless, additionally, it lets you to run
    or electricity walk in front in the Television set, a approach desired by many.

    my webpage :: dumbbells for sale

  25. When you may very well be in a position to
    explain to with the title, this established enables you a fat selection from five to 52 lbs.

    my page ... dumbbells for sale

  26. Speed comes from speed which means you should educate at 95-100% of your respective max hr.

    Feel free to visit my web page: simply click the next document