aboutsummaryrefslogtreecommitdiff
path: root/mailutils/sendmail.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-11-21 14:25:15 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-11-21 14:25:15 +0100
commit5f118ff8851adb8370e8f130bb2ec2e80b55246c (patch)
tree6d8d2841a2ce317f0195fe5954dbbc8f046546bf /mailutils/sendmail.c
parent2951add2bf240e47b1d2e7bc384f138428391366 (diff)
parentfc186711fe75cfc4abda9a7ff29050bc7a56313b (diff)
downloadbusybox-w32-5f118ff8851adb8370e8f130bb2ec2e80b55246c.tar.gz
busybox-w32-5f118ff8851adb8370e8f130bb2ec2e80b55246c.tar.bz2
busybox-w32-5f118ff8851adb8370e8f130bb2ec2e80b55246c.zip
Merge branch 'master' of git+ssh://busybox.net/var/lib/git/busybox
Diffstat (limited to 'mailutils/sendmail.c')
-rw-r--r--mailutils/sendmail.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index dbd491002..aa381c60f 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -281,17 +281,19 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
281 281
282 // analyze headers 282 // analyze headers
283 // To: or Cc: headers add recipients 283 // To: or Cc: headers add recipients
284 if (0 == strncasecmp("To:", s, 3) || 0 == strncasecmp("Bcc:" + 1, s, 3)) { 284 if (opts & OPT_t) {
285 rcptto(sane_address(s+3)); 285 if (0 == strncasecmp("To:", s, 3) || 0 == strncasecmp("Bcc:" + 1, s, 3)) {
286 goto addheader; 286 rcptto(sane_address(s+3));
287 goto addheader;
288 }
289 // Bcc: header adds blind copy (hidden) recipient
290 if (0 == strncasecmp("Bcc:", s, 4)) {
291 rcptto(sane_address(s+4));
292 free(s);
293 continue; // N.B. Bcc: vanishes from headers!
294 }
287 } 295 }
288 // Bcc: header adds blind copy (hidden) recipient 296 if (strchr(s, ':') || (list && isspace(s[0]))) {
289 if (0 == strncasecmp("Bcc:", s, 4)) {
290 rcptto(sane_address(s+4));
291 free(s);
292 // N.B. Bcc: vanishes from headers!
293 } else
294 if (strchr(s, ':') || (list && skip_whitespace(s) != s)) {
295 // other headers go verbatim 297 // other headers go verbatim
296 // N.B. RFC2822 2.2.3 "Long Header Fields" allows for headers to occupy several lines. 298 // N.B. RFC2822 2.2.3 "Long Header Fields" allows for headers to occupy several lines.
297 // Continuation is denoted by prefixing additional lines with whitespace(s). 299 // Continuation is denoted by prefixing additional lines with whitespace(s).