cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SMTP authentication fails

From: Patrick Monnerat <Patrick.Monnerat_at_datasphere.ch>
Date: Wed, 24 Nov 2010 16:18:24 +0100

 
Amr Oreaba wrote:
> 2) To support CRAM-MD5, the server MUST know the clear text password.
> I've seen some servers advertising the CRAM-MD5 authentication scheme
while not being able to handle it properly. Are you sure you're not in
this case ? Try CRAM-MD5 on the same server with another mail client to
check it. If it also fails, it's a server problem.

> ## Yes you are correct, is there a way to force certain authentication
in the libcurl?
> why did it choose this authentication?I looked in the options of the
libcurl but could not found such a parameter that I can adjust.

No, there isn't such an option in the official release now. But someone
asked questions on how to do it some weeks ago. Perhaps he did it in a
customized version. See http://curl.haxx.se/mail/lib-2010-10/0077.html.
Perhaps this kind of problems can justify we implement such an option.
Daniel ?
The preference order of authentication mechanisms in SMTP is arbitrary
(defined by code test order). However I decided to prefer CRAM-MD5 over
PLAIN or LOGIN because it does not transmit the password itself, thus
being more secure.

> 3) Do you succeed using the easy interface ?
> ## no same problem.

So this is normal since you established it's a server misconfiguration.
In any case, the best way to fix it is to properly configure the server
(or ask the ISP to do so!)

> I can imagine your curl library has not been compiled with the SSL
support... Check output of "curl --version" with a command line tool
using the same library.
> ## I am using the Visual C++ 2008 express and I compiled the library
from the .dsw file provided, how I can compile in visual C++ with SSL
support.

I'm not working with W$, so I can't help you on this subject. Sorry.

> ## I tried another trial with a Yahoo mail account and it used PLAIN
authentication and the the problem in the below URL exactly happened to
me!!!
> http://curl.haxx.se/mail/lib-2010-10/0112.html
> ##same error on verbose
> 451 Invalid Smtp line - Should end with CRLF

I think there is an unreported bug in procedure Curl_smtp_escape_eob():
it should substitute data as 's/^\./../', not only <cr><lf>.<cr><lf> -->
<cr><lf>..<cr><lf>
Your data (not seen in verbose mode) probably contains a line starting
with a period, hitting this bug.

Since the error message is fuzzy and I can't see your data, please check
also that it meets SMTP requirements: text only, line lengths <= 1000,
etc. If it is MIME formatted, check also that it matches the standard
limitations imposed by the encodings you use.

And please, use different threads for different questions: a single mail
containing 3 different subjects is hard to handle. Thanks.

Patrick
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-24