cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SMTP - Multiple Email Addresses

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Tue, 25 Mar 2014 20:32:00 +0000

On Tue, 25 Mar 2014, Tom Sparrow wrote:

> In case of any invalid "emailaddress" the curl operation fails.

It is exactly that bug. For more information please see the following
thread:

http://curl.haxx.se/mail/lib-2012-06/0050.html

The thread gets a little fragmented in places but there are a number of
links at:

http://curl.haxx.se/mail/lib-2012-06/

> 1. Do email address validation before calling curl_slist_append(
> recipients, emailaddress)(even this cannot always guarantee
> RCPT OK)
>
> 2. Keeping track of any RCPT OK responses. If there is atleast one
> RCPT OK, call "DATA" command.
>
> The following patch is associated with solution -2. I am new to libcurl
> so I have serious doubts over these changes.

It's 6 of one and half a dozen of another, depending on your view point, if
curl should fail or continue. At the moment we err on the side of caution
and fail. Unfortunately your suggested fix doesn't tell the caller if
anything failed :(

I believe a couple of solutions could be:

a) To continue but notify the caller which addresses failed and what their
error codes were
b) Callback to the application and let the programmer of that app decide
what they want to do. Ie this address failed with this error code, what
should Iibcurl do now

In my own usage of libcurl and SMTP I mainly deal with Exchange servers and
they normally responds with a 250, out of the box, so that spam apps cannot
verify the existence of email address either with the VRFY and EXPN commands
or by trying to send a fake email and using the results of the RCPT TO
command.

However, that doesn't mean that we don't want to fix this - we do.
Unfortunately, we haven't decided on the best / correct fix or had anyone
willing to donate their time by creating such a patch.

It is on my to do list but do to the nature of how I use libcurl, and my
long list of other things to do, it is quite low down :(

However, any assistance would be appreciated and I can quite quickly review
any patches ;-)

Kind Regards

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