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 10.8.0.1 110 (or if ur mailserver is in the same machine, use another port)

Download it here : pop3ssl.zip

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

37 comments:

  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!

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

    ReplyDelete
  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
    +OK User successfully logged on.
    client command :STAT
    STAT
    client command :UIDL
    UIDL 1
    +OK 1 AAQMiIwAAAwJr1Vz9J1JjmUOOLFw/QKg
    client command :UIDL
    UIDL
    +OK
    1 AAQMiIwAAAwJr1Vz9J1JjmUOOLFw/QKg
    client command :LIST
    LIST 1
    client command :LIST
    LIST 1
    client command :RETR
    RETR 1
    ==============================
    Traceback (most recent call last):
    File "pop3ssl.py", line 348, in run
    File "pop3ssl.py", 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.)

    ReplyDelete
  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.

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

    ReplyDelete
  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
    [pop3]
    accept = localhost:110
    connect = pop.gmail.com:995

    [smtp]
    accept = localhost:25
    connect = smtp.gmail.com:465

    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.

    ReplyDelete
  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?

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

    my site - bowflex selecttech dumbbells

    ReplyDelete
  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 - www.getfitnstrong.com

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


    My web site :: primary

    ReplyDelete
  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 www.getfitnstrong.com

    ReplyDelete
  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

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


    Feel free to surf to my web page: dumbbell sets

    ReplyDelete
  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

    ReplyDelete
  15. Additional sets could be obtained to incorporate weight.


    My blog post cheap dumbbells set

    ReplyDelete
  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 http://www.getfitnstrong.com/bowflex-dumbbells/bowflex-selecttech-dumbbells-ultimate-home-exercising/

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

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


    Here is my web blog: http://Www.Getfitnstrong.com/adjustable-dumbbells/weight-sets-sale/

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  27. It is actually a nice and useful piece of information. I’m
    glad that you shared this helpful information with us.
    Please stay us up to date like this. Thank you for sharing.
    adobe acrobat reader dc crack
    avast secureline vpn license-key
    vysor pro crack
    advanced systemcare pro crack serial key

    ReplyDelete
  28. Sincerely, I am so glad I found your site, I accidentally found you while searching on google
    for something else, I am still here and I want to congratulate you on a nice post and
    a nice blog all over (love the theme/design too),
    I don't have time to watch anywhere in the minute, but I noticed and added
    your RSS feeds, so if I have time, I will return to
    read on, keep up the good work.
    obdwiz license key
    driver booster activation key

    ReplyDelete
  29. Woah! I’m really enjoying the template/theme of this website.
    It’s simple, yet effective. A lot of times it’s very
    difficult to get that “perfect balance” between user friendliness and appearance.
    I must say that you’ve done a very good job with this.
    Also, the blog loads very quickly for me on Firefox.
    Exceptional Blog!
    eset nod32 antivirus 13 2 15 0 crack
    manycam pro full crack
    openvpn crack
    3ds max crack
    vst plugins for windows crack
    movie mator editor pro crack


    ReplyDelete
  30. Great post, I really enjoy reading this post, it explains everything so it's super
    easy. I will visit this blog again for very important information for regular searches.
    driver genius pr crack
    microsoft visio pro crack
    rhinoceros crack
    minecraft license key

    ReplyDelete
  31. I liked it as much as you do here.
    The sketch is attractive, your writing is elegant.
    I still command you to shake what you want
    gives the following. uncomfortable, no doubt arrives faster
    again, as is almost very common indoors if you advocate this walk.
    game hacker crack
    acronis true image crack
    cubase pro crack
    youtube movie maker crack

    ReplyDelete
  32. I am very happy to read your article. I wish i could see more of your post. Thanks for sharing such an nice article with us. Keep it up.
    Haydee 2 Crack
    Breathedge Crack
    The Universim Crack
    Airships: Conquer the Skies Crack

    ReplyDelete