Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TIdPop3, TIdSMTP via proxy, but without SSL



Permlink Replies: 3 - Last Post: Dec 1, 2016 12:28 AM Last Post By: Andrew Asterson Threads: [ Previous | Next ]
Sergei Sudakov

Posts: 2
Registered: 11/25/16
TIdPop3, TIdSMTP via proxy, but without SSL
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 25, 2016 7:23 AM
Dear colleagues,

I need to send e-mail messages (via known mail gate) through proxy. Using Indy 10.

When I use secure connections (SMTP ports 587 or 465, POP3 port 995) everything is fine. I use TIdSSLIOHandlerSocketOpenSSL (because I use OpenSSL) and in case of proxy, use TIdSocksInfo (for SOCKS proxy) and TIdConnectThroughHttpProxy (for HTTP proxy) as TIdSSLIOHandlerSocketOpenSSL.TransparentProxy.

Everything works fine.

But sometimes I have to use unprotected connections (SMTP 25 and POP3 110; surprisingly, but sometimes they are still in use in MUA).
When no proxy is involved - everything is clear (and works).

But when I need to do it via proxy, how can I use TIdSocksInfo/TIdConnectThroughHttpProxy? in this case there is no ssl handler with TransparentProxy property (because 25/100 ports assume no SSL)..

Tanks a lot in advabce.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: TIdPop3, TIdSMTP via proxy, but without SSL
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 26, 2016 2:36 PM   in response to: Sergei Sudakov in response to: Sergei Sudakov
Sergei wrote:

But when I need to do it via proxy, how can I use
TIdSocksInfo/TIdConnectThroughHttpProxy? in this case
there is no ssl handler with TransparentProxy property
(because 25/100 ports assume no SSL)..

Simply use TIdIOHandlerStack instead of TIdSSLIOHandlerSocketOpenSSL, or
at least make sure the TIdSSLIOHandlerSocketOpenSSL.PassThrough property
is set to True to disable SSL/TLS.

--
Remy Lebeau (TeamB)
Sergei Sudakov

Posts: 2
Registered: 11/25/16
Re: TIdPop3, TIdSMTP via proxy, but without SSL
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 27, 2016 2:48 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Simply use TIdIOHandlerStack instead of TIdSSLIOHandlerSocketOpenSSL, or

Thank you very much, Remy.

I also understood it several hours ago. Found that Indy creates "handler by default" automatically if it is not specified explicitly. Then determined actual type of the "default handler" in debugger and then used it explicitly..
Andrew Asterson

Posts: 1
Registered: 1/1/17
Re: TIdPop3, TIdSMTP via proxy, but without SSL
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 1, 2016 12:28 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Sergei wrote:

But when I need to do it via proxy, how can I use
TIdSocksInfo/TIdConnectThroughHttpProxy? in this case
there is no ssl handler with TransparentProxy property
(because 25/100 ports assume no SSL)..

Simply use TIdIOHandlerStack instead of TIdSSLIOHandlerSocketOpenSSL, or
at least make sure the TIdSSLIOHandlerSocketOpenSSL.PassThrough property
is set to True to disable SSL/TLS.

--
Remy Lebeau (TeamB)

Oh, thank you man!:) Such a long time I was puzzled by this problem of this proxy problem, thanks for solution!
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02