[git commit] sendmail: don't mangle e-mail headers
Denys Vlasenko
vda.linux at googlemail.com
Mon Mar 18 17:45:13 UTC 2013
commit: http://git.busybox.net/busybox/commit/?id=95e99e5271cb15247ba8926f0352387643164528
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Leave the original To: and Cc: headers untouched, when we try to extract
addresses from them.
Signed-off-by: Aaro Koskinen <aaro.koskinen at iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
mailutils/sendmail.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index 4f73512..0f536ad 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -299,7 +299,9 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
// To: or Cc: headers add recipients
if (opts & OPT_t) {
if (0 == strncasecmp("To:", s, 3) || 0 == strncasecmp("Bcc:" + 1, s, 3)) {
- rcptto(sane_address(s+3));
+ char *r = xstrdup(s+3);
+ rcptto(sane_address(r));
+ free(r);
goto addheader;
}
// Bcc: header adds blind copy (hidden) recipient
More information about the busybox-cvs
mailing list