cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SMTP usage (was RE: ANNOUNCE: curl and libcurl 7.20.0)

From: <johansen_at_sun.com>
Date: Mon, 15 Feb 2010 13:21:23 -0800

On Fri, Feb 12, 2010 at 11:03:36PM +0000, Colin Hogben wrote:
> Also, the addresses following MAIL FROM: and RCPT TO: should be
> surrounded by angle brackets according to RFC 2821 (though I believe
> most servers in the wild will accept without).

Postfix will accept RFC822 headers by default, but it logs a warning.
It has an option to reject mail that isn't explicitly RFC821 compliant.

http://www.postfix.org/postconf.5.html#strict_rfc821_envelopes

Many sites override the default value and reject headers that aren't
RFC821 compliant as part of their UCE controls.

On Sat, Feb 13, 2010 at 01:49:30PM +0100, Daniel Stenberg wrote:
> As I see it we have three options on how to do this:
>
> A) like now, which allows maximum flexibility and libcurl sends the raw data
> the app provides. Angle brackets or not. The downside will be that this may
> lead to apps not doing this right and thus not quite spec compliant.
>
> B) always wrap the given data within angle brackets. Will decrease the
> flexibility for the app. But does it matter?
>
> C) like now, but we check the first letter to see if it is an angle bracket
> and if it isn't, we assume that libcurl should wrap the given data within
> a set. Downsides or the golden combo?

Another possibility would be to allow the behavior to be selectable,
either A or B, but not both. At least in that case, the behavior is
always deterministic and presumably documented.

If it's a pain to make these options, choice C seems like a good compromise.

-j
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-15