cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SMTP functionality with authentication fails!

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Mon, 3 Dec 2012 22:28:01 +0000

Hi Naveen,

> Thanks for your patience. Per your suggestion, I modified my
> code to include the proxy URL and port values explicitly.
> Post those (and a few other) changes (I've attached the code
> for your reference), I get the following error logs:

The log certainly looks more in line with what I would expect.

> < 220 mx.google.com ESMTP u15sm12534619anq.14
> > EHLO xxxx.yyy.zzz.com
> < 250-mx.google.com at your service, [15.211.201.85]
> < 250-SIZE 35882577
> < 250-8BITMIME
> < 250-STARTTLS
> < 250-ENHANCEDSTATUSCODES
> < 250 PIPELINING
> * No known auth mechanisms supported!

From an SMTP point of view gmail is setup for inbound TLS/SSL based
connections - as the most common authentication mechanisms are quite
insecure.

What would normally happen when using smtp://, in non-proxy mode, is that
libcurl would connect to gmail, issue the EHLO, their server would respond
with the 250 status lines and then libcurl should send STARTTLS to start the
TLS upgrade. Once the upgrade is complete, libcurl will issue another EHLO,
gmail will respond with similar 250 status lines but this time include the
allowed AUTH mechanisms thus allowing libcurl to authenticate and continue
normally.

I hope Daniel will be able to shed some light here, as I have no real
"programming" experience with sending data through a proxy server - and it
has been a few years since I even set one up (if you include Microsoft's
TMG!).

What I don't know is if libcurl supports TLS upgraded connections through a
proxy server - if it does then you might have found a bug in the SMTP module
:(

Additionally, rather than try a TLS upgraded connection have you tried using
smtps:// to see if that works? Here libcurl should try and create an SSL
connection using port 465 - again I don't know if this works through a
proxy.

Kind Regards

Steve

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-03