{"thread":{"id":"25795","subject":"[PATCH] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","startedAt":"2010-11-20T17:06:49Z","lastAt":"2011-02-06T20:28:09Z","messageCount":13,"participants":["Joe Perches","Andreas Schwab","Pete Harlan","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"156253","messageId":"1290272809.27951.30.camel@Joe-Laptop","threadId":"25795","inReplyTo":null,"subject":"[PATCH] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2010-11-20T17:06:49Z","receivedAt":"2010-11-20T17:06:49Z","isPatch":true,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"If an email address in the \"to:\" list is in the style\n\"First Last <email@domain.tld>\", ie: not just a bare\naddress like \"email@domain.tld\", and the same named\nentry style exists in the \"cc:\" list, the current\nlogic will not remove the entry from the \"cc:\" list.\n\nAdd logic to better deduplicate the \"cc:\" list by also\nmatching the email address with angle brackets.\n\nSigned-off-by: Joe Perches <joe@perches.com>\n---\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex f68ed5a..1ae5fbf 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -960,7 +960,7 @@ sub maildomain {\n sub send_message {\n \tmy @recipients = unique_email_list(@to);\n \t@cc = (grep { my $cc = extract_valid_address($_);\n-\t\t      not grep { $cc eq $_ } @recipients\n+\t\t      not grep { $cc eq $_ || $_ =~ /<${cc}>$/ } @recipients\n \t\t    }\n \t       map { sanitize_address($_) }\n \t       @cc);\n"},{"id":"156267","messageId":"m2mxp3zr88.fsf@igel.home","threadId":"25795","inReplyTo":"1290272809.27951.30.camel@Joe-Laptop","subject":"Re: [PATCH] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-11-20T20:15:35Z","receivedAt":"2010-11-20T20:15:35Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Joe Perches <joe@perches.com> writes:\n\n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index f68ed5a..1ae5fbf 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -960,7 +960,7 @@ sub maildomain {\n>  sub send_message {\n>  \tmy @recipients = unique_email_list(@to);\n>  \t@cc = (grep { my $cc = extract_valid_address($_);\n> -\t\t      not grep { $cc eq $_ } @recipients\n> +\t\t      not grep { $cc eq $_ || $_ =~ /<${cc}>$/ } @recipients\n                                                    /<\\Q${cc}\\E>$/\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"156268","messageId":"1290286877.31117.15.camel@Joe-Laptop","threadId":"25795","inReplyTo":"m2mxp3zr88.fsf@igel.home","subject":"Re: [PATCH] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2010-11-20T21:01:17Z","receivedAt":"2010-11-20T21:01:17Z","isPatch":true,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"On Sat, 2010-11-20 at 21:15 +0100, Andreas Schwab wrote:\n> Joe Perches <joe@perches.com> writes:\n> > diff --git a/git-send-email.perl b/git-send-email.perl\n> > index f68ed5a..1ae5fbf 100755\n> > --- a/git-send-email.perl\n> > +++ b/git-send-email.perl\n> > @@ -960,7 +960,7 @@ sub maildomain {\n> >  sub send_message {\n> >  \tmy @recipients = unique_email_list(@to);\n> >  \t@cc = (grep { my $cc = extract_valid_address($_);\n> > -\t\t      not grep { $cc eq $_ } @recipients\n> > +\t\t      not grep { $cc eq $_ || $_ =~ /<${cc}>$/ } @recipients\n>                                                     /<\\Q${cc}\\E>$/\n\nWhy are \\Q and \\E useful here?\nextract_valid_address provides an unadorned email address.\nI've now tested with and without, both seem to work properly.\n"},{"id":"156270","messageId":"4CE84FF3.2070906@pcharlan.com","threadId":"25795","inReplyTo":"1290286877.31117.15.camel@Joe-Laptop","subject":"Re: [PATCH] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Pete Harlan","fromEmail":"pgit@pcharlan.com","sentAt":"2010-11-20T22:47:15Z","receivedAt":"2010-11-20T22:47:15Z","isPatch":true,"sender":{"key":"pgit@pcharlan.com","avatar":null},"body":"On 11/20/2010 01:01 PM, Joe Perches wrote:\n> On Sat, 2010-11-20 at 21:15 +0100, Andreas Schwab wrote:\n>> Joe Perches <joe@perches.com> writes:\n>> > diff --git a/git-send-email.perl b/git-send-email.perl\n>> > index f68ed5a..1ae5fbf 100755\n>> > --- a/git-send-email.perl\n>> > +++ b/git-send-email.perl\n>> > @@ -960,7 +960,7 @@ sub maildomain {\n>> >  sub send_message {\n>> >  \tmy @recipients = unique_email_list(@to);\n>> >  \t@cc = (grep { my $cc = extract_valid_address($_);\n>> > -\t\t      not grep { $cc eq $_ } @recipients\n>> > +\t\t      not grep { $cc eq $_ || $_ =~ /<${cc}>$/ } @recipients\n>>                                                     /<\\Q${cc}\\E>$/\n> \n> Why are \\Q and \\E useful here?\n> extract_valid_address provides an unadorned email address.\n> I've now tested with and without, both seem to work properly.\n\nBecause email addresses can contain characters (e.g., '+') that you don't want the regular expression to treat specially.\n"},{"id":"156271","messageId":"m2eiafzjqg.fsf@igel.home","threadId":"25795","inReplyTo":"1290286877.31117.15.camel@Joe-Laptop","subject":"Re: [PATCH] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-11-20T22:57:27Z","receivedAt":"2010-11-20T22:57:27Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Joe Perches <joe@perches.com> writes:\n\n> extract_valid_address provides an unadorned email address.\n\nAn email address is not a regexp.  Thus it may not match itself.\n\n> I've now tested with and without, both seem to work properly.\n\nDid you test with all possible email addresses?\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"156272","messageId":"1290294012.31117.34.camel@Joe-Laptop","threadId":"25795","inReplyTo":"m2eiafzjqg.fsf@igel.home","subject":"Re: [PATCH] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2010-11-20T23:00:12Z","receivedAt":"2010-11-20T23:00:12Z","isPatch":true,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"On Sat, 2010-11-20 at 23:57 +0100, Andreas Schwab wrote:\n> Joe Perches <joe@perches.com> writes:\n> > extract_valid_address provides an unadorned email address.\n> An email address is not a regexp.  Thus it may not match itself.\n> > I've now tested with and without, both seem to work properly.\n> Did you test with all possible email addresses?\n\n:)  That'd take forever...\n"},{"id":"156273","messageId":"1290294365.31117.40.camel@Joe-Laptop","threadId":"25795","inReplyTo":"4CE84FF3.2070906@pcharlan.com","subject":"[PATCH V2] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2010-11-20T23:06:05Z","receivedAt":"2010-11-20T23:06:05Z","isPatch":true,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"If an email address in the \"to:\" list is in the style\n\"First Last <email@domain.tld>\", ie: not just a bare\naddress like \"email@domain.tld\", and the same named\nentry style exists in the \"cc:\" list, the current\nlogic will not remove the entry from the \"cc:\" list.\n\nAdd logic to better deduplicate the \"cc:\" list by also\nmatching the email address with angle brackets.\n\nSigned-off-by: Joe Perches <joe@perches.com>\n---\nV2: Added quote escaping suggested by Andreas Schwab\n\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex f68ed5a..1ae5fbf 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -960,7 +960,7 @@ sub maildomain {\n sub send_message {\n \tmy @recipients = unique_email_list(@to);\n \t@cc = (grep { my $cc = extract_valid_address($_);\n-\t\t      not grep { $cc eq $_ } @recipients\n+\t\t      not grep { $cc eq $_ || $_ =~ /<\\Q${cc}\\E>$/ } @recipients\n \t\t    }\n \t       map { sanitize_address($_) }\n \t       @cc);\n"},{"id":"156686","messageId":"7vmxowq6gz.fsf@alter.siamese.dyndns.org","threadId":"25795","inReplyTo":"1290294365.31117.40.camel@Joe-Laptop","subject":"Re: [PATCH V2] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-11-26T18:34:36Z","receivedAt":"2010-11-26T18:34:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Joe Perches <joe@perches.com> writes:\n\n> If an email address in the \"to:\" list is in the style\n> \"First Last <email@domain.tld>\", ie: not just a bare\n> address like \"email@domain.tld\", and the same named\n> entry style exists in the \"cc:\" list, the current\n> logic will not remove the entry from the \"cc:\" list.\n>\n> Add logic to better deduplicate the \"cc:\" list by also\n> matching the email address with angle brackets.\n\nThanks; this is an improvement from the current behaviour.  We do cull\nduplicates if you have the same address listed on @cc twice, but we don't\ndo the similar culling between To:/Cc: headers.\n\nI wonder if we should remove addresses from To: and Cc: if the same\naddress appears in @bcclist, by the way, but that is a separate topic.\n\nThanks.\n"},{"id":"156694","messageId":"1290807268.11971.310.camel@Joe-Laptop","threadId":"25795","inReplyTo":"7vmxowq6gz.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH V2] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2010-11-26T21:34:28Z","receivedAt":"2010-11-26T21:34:28Z","isPatch":true,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"On Fri, 2010-11-26 at 10:34 -0800, Junio C Hamano wrote:\n> I wonder if we should remove addresses from To: and Cc: if the same\n> address appears in @bcclist, by the way, but that is a separate topic.\n\nMost likely it should be culled from the bcclist.\n"},{"id":"156701","messageId":"7vk4jzpq8h.fsf@alter.siamese.dyndns.org","threadId":"25795","inReplyTo":"1290807268.11971.310.camel@Joe-Laptop","subject":"Re: [PATCH V2] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-11-27T00:25:18Z","receivedAt":"2010-11-27T00:25:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Joe Perches <joe@perches.com> writes:\n\n> On Fri, 2010-11-26 at 10:34 -0800, Junio C Hamano wrote:\n>> I wonder if we should remove addresses from To: and Cc: if the same\n>> address appears in @bcclist, by the way, but that is a separate topic.\n>\n> Most likely it should be culled from the bcclist.\n\nThat means that the current behaviour is Ok, no?  We do make the \"RCPT TO\"\nlist of addresses we feed to smtp unique after concatenating To/Cc/Bcc, if\nI am not mistaken.\n"},{"id":"156702","messageId":"1290818342.11971.325.camel@Joe-Laptop","threadId":"25795","inReplyTo":"7vk4jzpq8h.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH V2] git-send-email.perl: Deduplicate \"to:\" and \"cc:\" entries with names","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2010-11-27T00:39:02Z","receivedAt":"2010-11-27T00:39:02Z","isPatch":true,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"On Fri, 2010-11-26 at 16:25 -0800, Junio C Hamano wrote:\n> Joe Perches <joe@perches.com> writes:\n> > On Fri, 2010-11-26 at 10:34 -0800, Junio C Hamano wrote:\n> >> I wonder if we should remove addresses from To: and Cc: if the same\n> >> address appears in @bcclist, by the way, but that is a separate topic.\n> > Most likely it should be culled from the bcclist.\n> That means that the current behaviour is Ok, no?  We do make the \"RCPT TO\"\n> list of addresses we feed to smtp unique after concatenating To/Cc/Bcc, if\n> I am not mistaken.\n\nI believe it's correct as is.\n"},{"id":"160478","messageId":"1296949208.4133.66.camel@Joe-Laptop","threadId":"25795","inReplyTo":"7vk4jzpq8h.fsf@alter.siamese.dyndns.org","subject":"[PATCH] git-send-email.perl: Add --suppress-to","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2011-02-05T23:40:08Z","receivedAt":"2011-02-05T23:40:08Z","isPatch":true,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"Add an equivalent command line option to suppress-cc.\n\nSigned-off-by: Joe Perches <joe@perches.com>\n---\n Documentation/git-send-email.txt |   17 +++++++++++++++++\n git-send-email.perl              |   33 +++++++++++++++++++++++++++++++--\n 2 files changed, 48 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex 7ec9dab..69e03e8 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -232,6 +232,23 @@ Automating\n \tcc list. Default is the value of 'sendemail.signedoffbycc' configuration\n \tvalue; if that is unspecified, default to --signed-off-by-cc.\n \n+--suppress-to=<category>::\n+\tSpecify an additional category of recipients to suppress the\n+\tauto-to of:\n++\n+--\n+- 'author' will avoid including the patch author\n+- 'self' will avoid including the sender\n+- 'tocmd' will avoid running the --to-cmd\n+- 'bodyto' will avoid including anyone mentioned in To lines in the\n+   patch body (commit message) except for self (use 'self' for that)\n+- 'all' will suppress all auto to values.\n+--\n++\n+Default is the value of 'sendemail.suppressto' configuration value; if\n+that is unspecified, default to 'self' if --suppress-from is\n+specified.\n+\n --suppress-cc=<category>::\n \tSpecify an additional category of recipients to suppress the\n \tauto-cc of:\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 76565de..0365c29 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -74,6 +74,7 @@ git send-email [options] <file | directory | rev-list options >\n   Automating:\n     --identity              <str>  * Use the sendemail.<id> options.\n     --to-cmd                <str>  * Email To: via `<str> \\$patch_path`\n+    --suppress-to           <str>  * author, self, tocmd, bodyto, all.\n     --cc-cmd                <str>  * Email Cc: via `<str> \\$patch_path`\n     --suppress-cc           <str>  * author, self, sob, cc, cccmd, body, bodycc, all.\n     --[no-]signed-off-by-cc        * Send to Signed-off-by: addresses. Default on.\n@@ -196,6 +197,7 @@ my ($smtp_server, $smtp_server_port, @smtp_server_options);\n my ($smtp_authuser, $smtp_encryption);\n my ($identity, $aliasfiletype, @alias_files, $smtp_domain);\n my ($validate, $confirm);\n+my (@suppress_to);\n my (@suppress_cc);\n my ($auto_8bit_encoding);\n \n@@ -226,6 +228,7 @@ my %config_settings = (\n     \"aliasfiletype\" => \\$aliasfiletype,\n     \"bcc\" => \\@bcclist,\n     \"aliasesfile\" => \\@alias_files,\n+    \"suppressto\" => \\@suppress_to,\n     \"suppresscc\" => \\@suppress_cc,\n     \"envelopesender\" => \\$envelope_sender,\n     \"multiedit\" => \\$multiedit,\n@@ -301,6 +304,7 @@ my $rc = GetOptions(\"sender|from=s\" => \\$sender,\n \t\t    \"quiet\" => \\$quiet,\n \t\t    \"cc-cmd=s\" => \\$cc_cmd,\n \t\t    \"suppress-from!\" => \\$suppress_from,\n+\t\t    \"suppress-to=s\" => \\@suppress_to,\n \t\t    \"suppress-cc=s\" => \\@suppress_cc,\n \t\t    \"signed-off-cc|signed-off-by-cc!\" => \\$signed_off_by_cc,\n \t\t    \"confirm=s\" => \\$confirm,\n@@ -369,6 +373,24 @@ foreach my $setting (values %config_bool_settings) {\n # 'default' encryption is none -- this only prevents a warning\n $smtp_encryption = '' unless (defined $smtp_encryption);\n \n+# Set TO suppressions\n+my(%suppress_to);\n+if (@suppress_to) {\n+\tforeach my $entry (@suppress_to) {\n+\t\tdie \"Unknown --suppress-to field: '$entry'\\n\"\n+\t\t\tunless $entry =~ /^(?:all|author|self|tocmd|bodyto)$/;\n+\t\t$suppress_to{$entry} = 1;\n+\t}\n+}\n+\n+if ($suppress_to{'all'}) {\n+\tforeach my $entry (qw (author self tocmd bodyto)) {\n+\t\t$suppress_to{$entry} = 1;\n+\t}\n+\tdelete $suppress_to{'all'};\n+}\n+$suppress_to{'self'} = $suppress_from if defined $suppress_from;\n+\n # Set CC suppressions\n my(%suppress_cc);\n if (@suppress_cc) {\n@@ -407,7 +429,11 @@ die \"Unknown --confirm setting: '$confirm'\\n\"\n \n # Debugging, print out the suppressions.\n if (0) {\n-\tprint \"suppressions:\\n\";\n+\tprint \"To suppressions:\\n\";\n+\tforeach my $entry (keys %suppress_to) {\n+\t\tprintf \"  %-5s -> $suppress_to{$entry}\\n\", $entry;\n+\t}\n+\tprint \"Cc suppressions:\\n\";\n \tforeach my $entry (keys %suppress_cc) {\n \t\tprintf \"  %-5s -> $suppress_cc{$entry}\\n\", $entry;\n \t}\n@@ -1201,6 +1227,9 @@ foreach my $t (@files) {\n \t\t\t}\n \t\t\telsif (/^To:\\s+(.*)$/) {\n \t\t\t\tforeach my $addr (parse_address_line($1)) {\n+\n+\t\t\t\t    next if $suppress_to{'author'};\n+\t\t\t\t    next if $suppress_to{'self'} and $author eq $sender;\n \t\t\t\t\tprintf(\"(mbox) Adding to: %s from line '%s'\\n\",\n \t\t\t\t\t\t$addr, $_) unless $quiet;\n \t\t\t\t\tpush @to, sanitize_address($addr);\n@@ -1269,7 +1298,7 @@ foreach my $t (@files) {\n \tclose $fh;\n \n \tpush @to, recipients_cmd(\"to-cmd\", \"to\", $to_cmd, $t)\n-\t\tif defined $to_cmd;\n+\t\tif defined $to_cmd && !$suppress_to{'tocmd'};\n \tpush @cc, recipients_cmd(\"cc-cmd\", \"cc\", $cc_cmd, $t)\n \t\tif defined $cc_cmd && !$suppress_cc{'cccmd'};\n \n"},{"id":"160544","messageId":"7vr5bkx606.fsf@alter.siamese.dyndns.org","threadId":"25795","inReplyTo":"1296949208.4133.66.camel@Joe-Laptop","subject":"Re: [PATCH] git-send-email.perl: Add --suppress-to","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-02-06T20:28:09Z","receivedAt":"2011-02-06T20:28:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Joe Perches <joe@perches.com> writes:\n\n> +- 'author' will avoid including the patch author\n> +- 'self' will avoid including the sender\n> +- 'tocmd' will avoid running the --to-cmd\n> +- 'bodyto' will avoid including anyone mentioned in To lines in the\n> +   patch body (commit message) except for self (use 'self' for that)\n> +- 'all' will suppress all auto to values.\n\nIs there a definition of what an \"auto to value\" is somewhere?  \"auto cc values\"\nwas sort of understandable as there is no word \"cc\" (other than 1/1000 litre ;-)\nand what it meant was guessable from context, but it took me a few seconds\nto realize you meant \"To:\" with this.\n\n> +--\n> ++\n> +Default is the value of 'sendemail.suppressto' configuration value; if\n> +that is unspecified, default to 'self' if --suppress-from is\n> +specified.\n> +\n>  --suppress-cc=<category>::\n>  \tSpecify an additional category of recipients to suppress the\n>  \tauto-cc of:\n\nHmmm, from a cursory look I don't see how bodyto is handled and where.\n\n> @@ -1201,6 +1227,9 @@ foreach my $t (@files) {\n>  \t\t\t}\n>  \t\t\telsif (/^To:\\s+(.*)$/) {\n>  \t\t\t\tforeach my $addr (parse_address_line($1)) {\n> +\n> +\t\t\t\t    next if $suppress_to{'author'};\n\nIs \"To: somebody\" in the output guaranteed to name the author and nobody else?\n\n> +\t\t\t\t    next if $suppress_to{'self'} and $author eq $sender;\n>  \t\t\t\t\tprintf(\"(mbox) Adding to: %s from line '%s'\\n\",\n>  \t\t\t\t\t\t$addr, $_) unless $quiet;\n>  \t\t\t\t\tpush @to, sanitize_address($addr);\n\n> @@ -1269,7 +1298,7 @@ foreach my $t (@files) {\n>  \tclose $fh;\n>  \n>  \tpush @to, recipients_cmd(\"to-cmd\", \"to\", $to_cmd, $t)\n> -\t\tif defined $to_cmd;\n> +\t\tif defined $to_cmd && !$suppress_to{'tocmd'};\n>  \tpush @cc, recipients_cmd(\"cc-cmd\", \"cc\", $cc_cmd, $t)\n>  \t\tif defined $cc_cmd && !$suppress_cc{'cccmd'};\n\nI think it is about time to make this a bit more readable by explicitly\nusing if statement, not statement modifiers.\n"}]}