1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

telnet imap.googlemail.com 993

Discussion in 'PHP' started by nashbur, Mar 16, 2009.

  1. #1
    im trying to establish imap connection with this command (later to be used with php imap_open)
    telnet imap.googlemail.com 993

    but as im in lan with proxy authentication required, its not possible.
    can anybody tell me, how do i specify username n password to proxy so that above command works?
     
    nashbur, Mar 16, 2009 IP
  2. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It depends on how your proxy works. Maybe you can telnet to the proxy server and then try this:
    CONNECT imap.googlemail.com:993 HTTP/1.0
    Code (markup):
    However, port 993 is used for IMAP-SSL, so normally you wouldn't use telnet at all to test it, but instead something like:
    openssl s_client -connect imap.googlemail.com:993
    Code (markup):
    Not sure how you'd convince that to go through a proxy without a bunch of shenanigans. But who uses proxies on a LAN anymore? What is this, 1995?
     
    SmallPotatoes, Mar 16, 2009 IP
  3. nashbur

    nashbur Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i thought, just like wget does (taking parameters for http_proxy ), we could use such scheme for telnet also.
    ultimately, my aim is to use impa_open() for establishing the connection. for that i was checking if i can pass through my proxy using telnet.

    also, no offense, but many organizations use proxy server to serve the requests gone outside their LAN.
    anyways, thanks for ur response.
     
    nashbur, Mar 16, 2009 IP
  4. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Will you always be connecting to gmail, or will you be connecting to multiple different IMAP servers?

    If you are always going to be connecting to gmail, and you can confirm that the "CONNECT" method I suggested above works, then you can simply set up a reverse proxy that listens for local connections, makes a connection to the proxy server on your LAN, and issues the connect command. Tell imap_open that your local reverse proxy is the IMAP server. You will have certificate errors if using SSL but you should be able to hide those.

    No offense taken. I didn't realise that people were still using the old-fashioned proxy servers, since transparent proxies and elaborate packet inspection became de rigeur on firewalls about a decade ago. Live and learn.
     
    SmallPotatoes, Mar 16, 2009 IP