cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SMTP SSL does not start, no authentication (was empty subject)

From: Alona Rossen <arossen_at_opentext.com>
Date: Wed, 20 Oct 2010 14:16:42 -0400

Alona Rossen wrote:

>Libcurl version is 7.21.0
This should contain up-to-date code for SMTP SSL and authentication.

>>>>Moreover, cURL command line tool is working. This means the problem
should be at the code level and not at the level of the library
itself.

>>>But be careful if you have more than one version of libcurl
installed:
>>>the curl command line tool may use a library while your app uses
>>>another. This has already been a very common source of troubles.

>>>If you succeed on gmail with SSL using the curl command line tool, I
>>>would suggest you to use the --libcurl <file> option to get the
>>>important curlopt settings.

>>>I'm afraid I have no other idea to track your problem that clearly
>>>resumes in "SSL not starting". Perhaps now someone with more skills
>>>about Solaris (library path searches, type sizes, etc) would give you
a
>>>better support ?

>>>Good luck
>>>Patrick

I followed your advise and ran cURL on Solaris with --libcurl <file>
option.
Attcahed gmail_source.txt contains the outputted source code.
Why was URL modified? Please explain added extension to the URL string
submitted in CURLOPT_URL. The submitted string was
"smtp://sttp.gmail.com:587".

I attempted to create a test example based on the source output.
However, this test example hangs indefinitely or times out if time out
is set up. This is the consol output:

About to connect() to smtp.gmail.com port 587 (#0)

* Trying 74.125.65.109... % Total % Received % Xferd Average
Speed Time Time Time Current

                                 Dload Upload Total Spent Left
Speed

  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0* connected

* Connected to smtp.gmail.com (74.125.65.109) port 587 (#0)

< 220 mx.google.com ESMTP t14sm308568yhc.8

> EHLO smtp_test.txt

< 250-mx.google.com at your service, [199.85.101.2]

< 250-SIZE 35651584

< 250-8BITMIME

< 250-STARTTLS

< 250-ENHANCEDSTATUSCODES

< 250 PIPELINING

> STARTTLS

< 220 2.0.0 Ready to start TLS

* SSL connection using RC4-MD5

* Server certificate:

* subject: C=US; ST=California; L=Mountain View; O=Google Inc;
CN=smtp.gmail.com

* start date: 2010-04-22 20:02:45 GMT

* expire date: 2011-04-22 20:12:45 GMT

* common name: smtp.gmail.com (matched)

* issuer: C=US; O=Google Inc; CN=Google Internet Authority

* SSL certificate verify result: unable to get local issuer
certificate (20), continuing anyway.

> EHLO smtp_test.txt

< 250-mx.google.com at your service, [199.85.101.2]

< 250-SIZE 35651584

< 250-8BITMIME

< 250-AUTH LOGIN PLAIN XOAUTH

< 250-ENHANCEDSTATUSCODES

< 250 PIPELINING

> AUTH PLAIN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0< 235 2.7.0 Accepted

> MAIL FROM:<alona.rossen_at_gmail.com>

< 250 2.1.0 OK t14sm308568yhc.8

  0 0 0 0 0 0 0 0 --:--:-- 0:03:00 --:--:--
0* server response timeout

  0 0 0 0 0 0 0 0 --:--:-- 0:03:00 --:--:--
0> QUIT

* server response timeout

* Closing connection #0

* Timeout was reached

Attached is the source code.

Thanks,
Alona

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2010-10-20