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