curl-library
RE: How to fetch pop3 mail using libcurl
Date: Fri, 21 Oct 2011 18:56:57 +0200
Michael Wood wrote:
> Port 587 is the "submission" port. It uses SMTP and the client and
server can negotiate an upgrade to TLS like they can on port 25.
> Port 465 is the smtps port, although as far as I know, use of port 465
is discouraged.
As a more general answer, there is 2 ways to enter SSL mode with
protocols like smtp, ftp, pop3, etc:
1) Using the "s"-suffixed protocol: this generally implies you use a
different port and the SSL handshake is handled immediately, thus
establishing a kind of "tunnel" for the whole protocol.
2) Using the normal protocol (and probably the "normal" port). Initial
protocol dialog is performed in clear form. Then at some point, client
requests entering the SSL mode; the SSL handshake occurs here and the
rest of the protocol dialog is encrypted.
You then have to know what your server/port expects. The libcurl
parameters used depend on it:
1) In case you use the "s"-suffixed protocol, simply set the URL scheme
accordingly.
2) If you want to enter SSL afterwards, use the CURLOPT_USE_SSL option
of your choice.
In both cases, other SSL options apply.
You can find some explanations about the different ways of handling SSL
at:
http://en.wikipedia.org/wiki/Pop3#Overview
http://en.wikipedia.org/wiki/SMTPS
etc.
Patrick
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-21