{"thread":{"id":"7850","subject":"[PATCH 1/9] Document --dry-run parameter to send-email.","startedAt":"2007-04-26T02:37:14Z","lastAt":"2007-04-26T04:53:22Z","messageCount":13,"participants":["Robin H. Johnson","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"40476","messageId":"1177555043986-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":null,"subject":"git-send-email fixes, cleanups and improvements","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:14Z","receivedAt":"2007-04-26T02:37:14Z","isPatch":false,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"The following series of patches perform a number of fixes, cleanups and\nimprovements to git-send-email.\n\nThese were spurred by the dual factors of git-send-email losing some of my\nemail due to the envelope sender, as well as the malformatting of the headers\n(due to the period after my middle initial) that caused strange breakages with\nsome sendmail binaries.\n\n01/09  Document --dry-run parameter to send-email.\n02/09  Prefix Dry- to the message status to denote dry-runs.\n03/09  Debugging cleanup improvements\n04/09  Change the scope of the $cc variable as it is not needed outside of send_message.\n05/09  Perform correct quoting of recipient names.\n06/09  Validate @recipients before using it for sendmail and Net::SMTP.\n07/09  Ensure clean addresses are always used with Net::SMTP\n08/09  Allow users to optionally specify their envelope sender.\n09/09  Document --dry-run and envelope-sender for git-send-email.\n"},{"id":"40474","messageId":"11775550432104-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":"1177555043986-git-send-email-robbat2@gentoo.org","subject":"[PATCH 1/9] Document --dry-run parameter to send-email.","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:15Z","receivedAt":"2007-04-26T02:37:15Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: Robin H. Johnson <robbat2@gentoo.org>\n\nLooks like --dry-run was added to the code, but never to the --help output.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n git-send-email.perl |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex d6b1548..604168e 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -77,6 +77,8 @@ Options:\n    --quiet\t  Make git-send-email less verbose.  One line per email\n                   should be all that is output.\n \n+   --dry-run\t  Do everything except actually send the emails.\n+\n EOT\n \texit(1);\n }\n-- \n1.5.2.rc0.43.g2f4c7\n"},{"id":"40475","messageId":"1177555043272-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":"11775550432104-git-send-email-robbat2@gentoo.org","subject":"[PATCH 2/9] Prefix Dry- to the message status to denote dry-runs.","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:16Z","receivedAt":"2007-04-26T02:37:16Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: Robin H. Johnson <robbat2@gentoo.org>\n\nWhile doing testing, it's useful to see that a dry run was actually done,\ninstead of a real one.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n git-send-email.perl |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 604168e..00f8181 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -491,9 +491,9 @@ X-Mailer: git-send-email $gitversion\n \t\t$smtp->ok or die \"Failed to send $subject\\n\".$smtp->message;\n \t}\n \tif ($quiet) {\n-\t\tprintf \"Sent %s\\n\", $subject;\n+\t\tprintf (($dry_run ? \"Dry-\" : \"\").\"Sent %s\\n\", $subject);\n \t} else {\n-\t\tprint \"OK. Log says:\\nDate: $date\\n\";\n+\t\tprint (($dry_run ? \"Dry-\" : \"\").\"OK. Log says:\\nDate: $date\\n\");\n \t\tif ($smtp) {\n \t\t\tprint \"Server: $smtp_server\\n\";\n \t\t} else {\n-- \n1.5.2.rc0.43.g2f4c7\n"},{"id":"40477","messageId":"11775550432268-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":"1177555043272-git-send-email-robbat2@gentoo.org","subject":"[PATCH 3/9] Debugging cleanup improvements","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:17Z","receivedAt":"2007-04-26T02:37:17Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: Robin H. Johnson <robbat2@gentoo.org>\n\nThe debug output is much more helpful if it has the parameters that were used.\nPull the sendmail parameters into a seperate array for that, and also include\nsimilar data during the Net::SMTP case.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n git-send-email.perl |   10 ++++++----\n 1 files changed, 6 insertions(+), 4 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 00f8181..8af235f 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -468,15 +468,15 @@ X-Mailer: git-send-email $gitversion\n \t\t$header .= join(\"\\n\", @xh) . \"\\n\";\n \t}\n \n+\tmy @sendmail_parameters = ('-i', map { extract_valid_address($_) } @recipients);\n+\n \tif ($dry_run) {\n \t\t# We don't want to send the email.\n \t} elsif ($smtp_server =~ m#^/#) {\n \t\tmy $pid = open my $sm, '|-';\n \t\tdefined $pid or die $!;\n \t\tif (!$pid) {\n-\t\t\texec($smtp_server,'-i',\n-\t\t\t     map { extract_valid_address($_) }\n-\t\t\t     @recipients) or die $!;\n+\t\t\texec($smtp_server, @sendmail_parameters) or die $!;\n \t\t}\n \t\tprint $sm \"$header\\n$message\";\n \t\tclose $sm or die $?;\n@@ -496,8 +496,10 @@ X-Mailer: git-send-email $gitversion\n \t\tprint (($dry_run ? \"Dry-\" : \"\").\"OK. Log says:\\nDate: $date\\n\");\n \t\tif ($smtp) {\n \t\t\tprint \"Server: $smtp_server\\n\";\n+\t\t\tprint \"MAIL FROM: $from\\n\";\n+\t\t\tprint \"RCPT TO: \".join(',',@recipients).\"\\n\";\n \t\t} else {\n-\t\t\tprint \"Sendmail: $smtp_server\\n\";\n+\t\t\tprint \"Sendmail: $smtp_server \".join(' ',@sendmail_parameters).\"\\n\";\n \t\t}\n \t\tprint \"From: $from\\nSubject: $subject\\nCc: $cc\\nTo: $to\\n\\n\";\n \t\tif ($smtp) {\n-- \n1.5.2.rc0.43.g2f4c7\n"},{"id":"40482","messageId":"11775550433288-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":"11775550432268-git-send-email-robbat2@gentoo.org","subject":"[PATCH 4/9] Change the scope of the $cc variable as it is not needed outside of send_message.","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:18Z","receivedAt":"2007-04-26T02:37:18Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: Robin H. Johnson <robbat2@gentoo.org>\n\n$cc is only used inside the send_message scope, so lets clean it out of the global scope.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n git-send-email.perl |    5 ++---\n 1 files changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 8af235f..5210a40 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -379,7 +379,7 @@ if (@files) {\n }\n \n # Variables we set as part of the loop over files\n-our ($message_id, $cc, %mail, $subject, $reply_to, $references, $message);\n+our ($message_id, %mail, $subject, $reply_to, $references, $message);\n \n sub extract_valid_address {\n \tmy $address = shift;\n@@ -420,7 +420,6 @@ sub make_message_id\n \n \n \n-$cc = \"\";\n $time = time - scalar $#files;\n \n sub unquote_rfc2047 {\n@@ -448,6 +447,7 @@ sub send_message\n \t\tmy ($name, $addr) = ($from =~ /^(.*?)(\\s+<.*)/);\n \t\t$from = \"\\\"$name\\\"$addr\";\n \t}\n+\tmy $cc = join(\", \", unique_email_list(@cc));\n \tmy $ccline = \"\";\n \tif ($cc ne '') {\n \t\t$ccline = \"\\nCc: $cc\";\n@@ -594,7 +594,6 @@ foreach my $t (@files) {\n \t\t$message = \"From: $author_not_sender\\n\\n$message\";\n \t}\n \n-\t$cc = join(\", \", unique_email_list(@cc));\n \n \tsend_message();\n \n-- \n1.5.2.rc0.43.g2f4c7\n"},{"id":"40479","messageId":"11775550432746-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":"11775550433288-git-send-email-robbat2@gentoo.org","subject":"[PATCH 5/9] Perform correct quoting of recipient names.","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:19Z","receivedAt":"2007-04-26T02:37:19Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: Robin H. Johnson <robbat2@gentoo.org>\n\nAlways perform quoting of the recipient names if they contain periods,\npreviously only the author's address was treated this way. This stops sendmail\nbinaries from exploding the name into bad addresses.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n git-send-email.perl |   19 ++++++++++++++-----\n 1 files changed, 14 insertions(+), 5 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 5210a40..c052760 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -431,9 +431,22 @@ sub unquote_rfc2047 {\n \treturn \"$_\";\n }\n \n+# If an address contains a . in the name portion, the name must be quoted.\n+sub sanitize_address_rfc822 \n+{\n+\tmy ($recipient) = @_;\n+\tmy ($recipient_name) = ($recipient =~ /^(.*?)\\s+</);\n+\tif($recipient_name && $recipient_name =~ /\\./ && $recipient_name !~ /^\".*\"$/) {\n+\t\tmy ($name, $addr) = ($recipient =~ /^(.*?)(\\s+<.*)/);\n+\t\t$recipient = \"\\\"$name\\\"$addr\";\n+\t}\n+\treturn $recipient;\n+}\n+\n sub send_message\n {\n \tmy @recipients = unique_email_list(@to);\n+\t@cc = (map { sanitize_address_rfc822($_) } @cc);\n \tmy $to = join (\",\\n\\t\", @recipients);\n \t@recipients = unique_email_list(@recipients,@cc,@bcclist);\n \tmy $date = format_2822_time($time++);\n@@ -442,11 +455,7 @@ sub send_message\n \t    $gitversion = Git::version();\n \t}\n \n-\tmy ($author_name) = ($from =~ /^(.*?)\\s+</);\n-\tif ($author_name && $author_name =~ /\\./ && $author_name !~ /^\".*\"$/) {\n-\t\tmy ($name, $addr) = ($from =~ /^(.*?)(\\s+<.*)/);\n-\t\t$from = \"\\\"$name\\\"$addr\";\n-\t}\n+\t$from = sanitize_address_rfc822($from);\n \tmy $cc = join(\", \", unique_email_list(@cc));\n \tmy $ccline = \"\";\n \tif ($cc ne '') {\n-- \n1.5.2.rc0.43.g2f4c7\n"},{"id":"40478","messageId":"11775550433329-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":"11775550432746-git-send-email-robbat2@gentoo.org","subject":"[PATCH 6/9] Validate @recipients before using it for sendmail and Net::SMTP.","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:20Z","receivedAt":"2007-04-26T02:37:20Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: Robin H. Johnson <robbat2@gentoo.org>\n\nEnsure that @recipients is only raw addresses when it is handed to the sendmail\nbinary OR Net::SMTP, otherwise BCC cases might get an extra <, or wierd stuff\nmight be passed to the exec.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n git-send-email.perl |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex c052760..0e1cc16 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -449,6 +449,7 @@ sub send_message\n \t@cc = (map { sanitize_address_rfc822($_) } @cc);\n \tmy $to = join (\",\\n\\t\", @recipients);\n \t@recipients = unique_email_list(@recipients,@cc,@bcclist);\n+\t@recipients = (map { extract_valid_address($_) } @recipients);\n \tmy $date = format_2822_time($time++);\n \tmy $gitversion = '@@GIT_VERSION@@';\n \tif ($gitversion =~ m/..GIT_VERSION../) {\n@@ -477,7 +478,7 @@ X-Mailer: git-send-email $gitversion\n \t\t$header .= join(\"\\n\", @xh) . \"\\n\";\n \t}\n \n-\tmy @sendmail_parameters = ('-i', map { extract_valid_address($_) } @recipients);\n+\tmy @sendmail_parameters = ('-i', @recipients);\n \n \tif ($dry_run) {\n \t\t# We don't want to send the email.\n-- \n1.5.2.rc0.43.g2f4c7\n"},{"id":"40483","messageId":"1177555043174-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":"11775550433329-git-send-email-robbat2@gentoo.org","subject":"[PATCH 7/9] Ensure clean addresses are always used with Net::SMTP","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:21Z","receivedAt":"2007-04-26T02:37:21Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: Robin H. Johnson <robbat2@gentoo.org>\n\nAlways pass in clean addresses to Net::SMTP for the MAIL FROM, and use them on\nthe SMTP non-quiet output as well.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n git-send-email.perl |    9 +++++----\n 1 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 0e1cc16..82468bd 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -479,6 +479,7 @@ X-Mailer: git-send-email $gitversion\n \t}\n \n \tmy @sendmail_parameters = ('-i', @recipients);\n+\tmy $raw_from = extract_valid_address($from);\n \n \tif ($dry_run) {\n \t\t# We don't want to send the email.\n@@ -493,7 +494,7 @@ X-Mailer: git-send-email $gitversion\n \t} else {\n \t\trequire Net::SMTP;\n \t\t$smtp ||= Net::SMTP->new( $smtp_server );\n-\t\t$smtp->mail( $from ) or die $smtp->message;\n+\t\t$smtp->mail( $raw_from ) or die $smtp->message;\n \t\t$smtp->to( @recipients ) or die $smtp->message;\n \t\t$smtp->data or die $smtp->message;\n \t\t$smtp->datasend(\"$header\\n$message\") or die $smtp->message;\n@@ -504,10 +505,10 @@ X-Mailer: git-send-email $gitversion\n \t\tprintf (($dry_run ? \"Dry-\" : \"\").\"Sent %s\\n\", $subject);\n \t} else {\n \t\tprint (($dry_run ? \"Dry-\" : \"\").\"OK. Log says:\\nDate: $date\\n\");\n-\t\tif ($smtp) {\n+\t\tif ($smtp_server !~ m#^/#) {\n \t\t\tprint \"Server: $smtp_server\\n\";\n-\t\t\tprint \"MAIL FROM: $from\\n\";\n-\t\t\tprint \"RCPT TO: \".join(',',@recipients).\"\\n\";\n+\t\t\tprint \"MAIL FROM:<$raw_from>\\n\";\n+\t\t\tprint \"RCPT TO:\".join(',',(map { \"<$_>\" } @recipients)).\"\\n\";\n \t\t} else {\n \t\t\tprint \"Sendmail: $smtp_server \".join(' ',@sendmail_parameters).\"\\n\";\n \t\t}\n-- \n1.5.2.rc0.43.g2f4c7\n"},{"id":"40481","messageId":"11775550433762-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":"1177555043174-git-send-email-robbat2@gentoo.org","subject":"[PATCH 8/9] Allow users to optionally specify their envelope sender.","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:22Z","receivedAt":"2007-04-26T02:37:22Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: Robin H. Johnson <robbat2@gentoo.org>\n\nIf your normal user is not the same user you are subscribed to a list with,\nthen the default envelope sender used will cause your messages to bounce or\nsilently vanish into the ether.\n\nThis patch provides an optional parameter to set the envelope sender.\nTo use it with the sendmail binary, you must have privileges to use the -f\nparameter!\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n git-send-email.perl |   10 +++++++++-\n 1 files changed, 9 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 82468bd..e1562b3 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -79,6 +79,8 @@ Options:\n \n    --dry-run\t  Do everything except actually send the emails.\n \n+   --envelope-sender\tSpecify the envelope sender used to send the emails.\n+\n EOT\n \texit(1);\n }\n@@ -139,6 +141,7 @@ my (@to,@cc,@initial_cc,@bcclist,@xh,\n my ($chain_reply_to, $quiet, $suppress_from, $no_signed_off_cc,\n \t$dry_run) = (1, 0, 0, 0, 0);\n my $smtp_server;\n+my $envelope_sender;\n \n # Example reply to:\n #$initial_reply_to = ''; #<20050203173208.GA23964@foobar.com>';\n@@ -177,6 +180,7 @@ my $rc = GetOptions(\"from=s\" => \\$from,\n \t\t    \"suppress-from\" => \\$suppress_from,\n \t\t    \"no-signed-off-cc|no-signed-off-by-cc\" => \\$no_signed_off_cc,\n \t\t    \"dry-run\" => \\$dry_run,\n+\t\t    \"envelope-sender=s\" => \\$envelope_sender,\n \t );\n \n unless ($rc) {\n@@ -479,7 +483,11 @@ X-Mailer: git-send-email $gitversion\n \t}\n \n \tmy @sendmail_parameters = ('-i', @recipients);\n-\tmy $raw_from = extract_valid_address($from);\n+\tmy $raw_from = $from;\n+\t$raw_from = $envelope_sender if (defined $envelope_sender);\n+\t$raw_from = extract_valid_address($raw_from);\n+\tunshift (@sendmail_parameters,\n+\t\t\t'-f', $raw_from) if(defined $envelope_sender);\n \n \tif ($dry_run) {\n \t\t# We don't want to send the email.\n-- \n1.5.2.rc0.43.g2f4c7\n"},{"id":"40480","messageId":"1177555043691-git-send-email-robbat2@gentoo.org","threadId":"7850","inReplyTo":"11775550433762-git-send-email-robbat2@gentoo.org","subject":"[PATCH 9/9] Document --dry-run and envelope-sender for git-send-email.","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T02:37:23Z","receivedAt":"2007-04-26T02:37:23Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: Robin H. Johnson <robbat2@gentoo.org>\n\nCatch the documentation up with the rest of this patchset.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n Documentation/git-send-email.txt |    9 +++++++++\n 1 files changed, 9 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex 682313e..393d79a 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -85,6 +85,15 @@ The --cc option must be repeated for each user you want on the cc list.\n \tDo not add the From: address to the cc: list, if it shows up in a From:\n \tline.\n \n+--dry-run::\n+\tDo everything except actually send the emails.\n+\n+--envelope-sender::\n+\tSpecify the envelope sender used to send the emails. \n+\tThis is useful if your default address is not the address that is\n+\tsubscribed to a list. If you use the sendmail binary, you must have\n+\tsuitable privileges for the -f parameter.\n+\n --to::\n \tSpecify the primary recipient of the emails generated.\n \tGenerally, this will be the upstream maintainer of the\n-- \n1.5.2.rc0.43.g2f4c7\n"},{"id":"40484","messageId":"7vhcr3vkjd.fsf@assigned-by-dhcp.cox.net","threadId":"7850","inReplyTo":"11775550432746-git-send-email-robbat2@gentoo.org","subject":"Re: [PATCH 5/9] Perform correct quoting of recipient names.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-26T04:15:02Z","receivedAt":"2007-04-26T04:15:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"While this one is definitely an improvement, I am a bit unhappy\nabout the way @to, @cc and @bcclist are not sanitized the same\nway.\n"},{"id":"40485","messageId":"20070426044137.GL7846@curie-int.orbis-terrarum.net","threadId":"7850","inReplyTo":"7vhcr3vkjd.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 5/9] Perform correct quoting of recipient names.","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T04:41:37Z","receivedAt":"2007-04-26T04:41:37Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"On Wed, Apr 25, 2007 at 09:15:02PM -0700, Junio C Hamano wrote:\n> While this one is definitely an improvement, I am a bit unhappy\n> about the way @to, @cc and @bcclist are not sanitized the same\n> way.\n@bcclist does not need the quoting, as everything except the email addresses is\nstripped out of it, see patch 6/9.\n\nI'll do an additional patch for @to however, give me a moment.\n\n-- \nRobin Hugh Johnson\nGentoo Linux Developer & Council Member\nE-Mail     : robbat2@gentoo.org\nGnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85\n"},{"id":"40491","messageId":"20070426045322.GM7846@curie-int.orbis-terrarum.net","threadId":"7850","inReplyTo":"20070426044137.GL7846@curie-int.orbis-terrarum.net","subject":"[PATCH 10/9] Sanitize @to recipients.","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-26T04:53:22Z","receivedAt":"2007-04-26T04:53:22Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"We need to sanitize @to as well to ensure that names are properly quoted.\n\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n git-send-email.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex e1562b3..a45439e 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -274,6 +274,7 @@ sub expand_aliases {\n }\n \n @to = expand_aliases(@to);\n+@to = (map { sanitize_address_rfc822($_) } @to);\n @initial_cc = expand_aliases(@initial_cc);\n @bcclist = expand_aliases(@bcclist);\n\n-- \nRobin Hugh Johnson\nGentoo Linux Developer & Council Member\nE-Mail     : robbat2@gentoo.org\nGnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85\n"}]}