curl-library
RE: SMTP SSL does not start, no authentication (was empty subject)
Date: Wed, 20 Oct 2010 16:48:44 -0400
On 20 October 2010 20:16, Alona Rossen <arossen_at_opentext.com> wrote:
[...]
>>>>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 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".
>>Based on the log it seems to use the part after the slash as the
>>hostname to use in the EHLO command. This should be the host name of
>>the client machine, so try using:
>>smtp://smtp.gmail.com:587/your.host.name as the URL. I don't know
>>where it's getting the smtp_test.txt from.
> 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)
[...]
> < 220 mx.google.com ESMTP t14sm308568yhc.8
>> EHLO smtp_test.txt
> < 250-mx.google.com at your service, [199.85.101.2]
[...]
>>So gmail didn't mind your EHLO smtp_test.txt, but some mail servers
>>will reject the SMTP session if the hostname specified in the EHLO
>>command is not a valid hostname according to DNS.
>> STARTTLS
> < 220 2.0.0 Ready to start TLS
> * SSL connection using RC4-MD5
[...]
> * SSL certificate verify result: unable to get local issuer
> certificate (20), continuing anyway.
>>Looks like SSL is working.
>> EHLO smtp_test.txt
> < 250-mx.google.com at your service, [199.85.101.2]
[...]
>>Strange. I wouldn't expect cURL to issue the EHLO command again.
>> AUTH PLAIN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> < 235 2.7.0 Accepted
OK, so login succeeded.
>> MAIL FROM:<alona.rossen_at_gmail.com>
> < 250 2.1.0 OK t14sm308568yhc.8
>>This looks fine.
> 0* server response timeout
>>hmmm... It seems like cURL was expecting something from the server
>>still when it should have been sending the "RCPT TO" command.
> 0 0 0 0 0 0 0 0 --:--:-- 0:03:00 --:--:--
> 0> QUIT
>
> * server response timeout
>>Here it seems the server did not respond properly to the QUIT command.
> * Closing connection #0
>
> * Timeout was reached
-- Michael Wood <esiotrot_at_gmail.com> ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html Michael, thank you so very much - it finally worked! Is adding local host name a standard? Is there a specific libcurl option for specifying local host? ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-10-20