diff options
| author | Gisle Vanem <gvanem@broadpark.no> | 2011-09-21 22:24:45 +0200 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2011-09-21 22:24:45 +0200 | 
| commit | 322f3d5af7093dc0c7277cb662b6fe5cae59a1c5 (patch) | |
| tree | 84afd3611fab61fbd410778ec53b2c1d590429e9 | |
| parent | c1057fc9aa9ba0304ea9afae38282ad1e9b3f1d4 (diff) | |
smtp: without a MAIL_FROM, send blank MAIL FROM
I think curl should ignore this case and smtp.c should test for this.
Since RFC-2821 seems to allow a "null reverse-path". Ref.  "MAIL
FROM:<>" in section 3.7, page 25.
| -rw-r--r-- | lib/smtp.c | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/lib/smtp.c b/lib/smtp.c index 977d323a7..bb29a83cf 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -791,7 +791,11 @@ static CURLcode smtp_mail(struct connectdata *conn)    struct SessionHandle *data = conn->data;    /* send MAIL FROM */ -  if(data->set.str[STRING_MAIL_FROM][0] == '<') +  if(!data->set.str[STRING_MAIL_FROM]) +    /* null reverse-path, RFC-2821, sect. 3.7 */ +    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:<>"); + +  else if(data->set.str[STRING_MAIL_FROM][0] == '<')      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:%s",                             data->set.str[STRING_MAIL_FROM]);    else | 
