diff options
author | Denys Vlasenko | 2011-11-21 14:25:15 +0100 |
---|---|---|
committer | Denys Vlasenko | 2011-11-21 14:25:15 +0100 |
commit | 5f118ff8851adb8370e8f130bb2ec2e80b55246c (patch) | |
tree | 6d8d2841a2ce317f0195fe5954dbbc8f046546bf /mailutils/sendmail.c | |
parent | 2951add2bf240e47b1d2e7bc384f138428391366 (diff) | |
parent | fc186711fe75cfc4abda9a7ff29050bc7a56313b (diff) | |
download | busybox-5f118ff8851adb8370e8f130bb2ec2e80b55246c.zip busybox-5f118ff8851adb8370e8f130bb2ec2e80b55246c.tar.gz |
Merge branch 'master' of git+ssh://busybox.net/var/lib/git/busybox
Diffstat (limited to 'mailutils/sendmail.c')
-rw-r--r-- | mailutils/sendmail.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c index dbd4910..aa381c6 100644 --- a/mailutils/sendmail.c +++ b/mailutils/sendmail.c @@ -281,17 +281,19 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv) // analyze headers // To: or Cc: headers add recipients - if (0 == strncasecmp("To:", s, 3) || 0 == strncasecmp("Bcc:" + 1, s, 3)) { - rcptto(sane_address(s+3)); - goto addheader; + if (opts & OPT_t) { + if (0 == strncasecmp("To:", s, 3) || 0 == strncasecmp("Bcc:" + 1, s, 3)) { + rcptto(sane_address(s+3)); + goto addheader; + } + // Bcc: header adds blind copy (hidden) recipient + if (0 == strncasecmp("Bcc:", s, 4)) { + rcptto(sane_address(s+4)); + free(s); + continue; // N.B. Bcc: vanishes from headers! + } } - // Bcc: header adds blind copy (hidden) recipient - if (0 == strncasecmp("Bcc:", s, 4)) { - rcptto(sane_address(s+4)); - free(s); - // N.B. Bcc: vanishes from headers! - } else - if (strchr(s, ':') || (list && skip_whitespace(s) != s)) { + if (strchr(s, ':') || (list && isspace(s[0]))) { // other headers go verbatim // N.B. RFC2822 2.2.3 "Long Header Fields" allows for headers to occupy several lines. // Continuation is denoted by prefixing additional lines with whitespace(s). |