git://git.jankratochvil.net
/
PerlMail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0bbe2cd
)
prevent wasteful Message-ID regeneration if it is just for one rcpt
author
short
<>
Fri, 25 Oct 2002 17:19:36 +0000
(17:19 +0000)
committer
short
<>
Fri, 25 Oct 2002 17:19:36 +0000
(17:19 +0000)
perlmail-sendmail
patch
|
blob
|
history
diff --git
a/perlmail-sendmail
b/perlmail-sendmail
index
900dded
..
b6b1b07
100755
(executable)
--- a/
perlmail-sendmail
+++ b/
perlmail-sendmail
@@
-199,11
+199,6
@@
if (0
# for $opt_F is implemented by Mail::Address in our &FromAddress
my $head=MIME::Head->new(\*STDIN);
# for $opt_F is implemented by Mail::Address in our &FromAddress
my $head=MIME::Head->new(\*STDIN);
-# We may (=will) change the contents and send it multiple times
-if (defined(my $msgid=$head->get("Message-ID"))) {
- $head->delete("Message-ID");
- $head->replace("X-LaceMail-sendmail-Message-ID",$msgid);
- }
# options leave in @ARGV, addresses to @addr:
my @args=@ARGV; # temporary
@ARGV=(); # options
# options leave in @ARGV, addresses to @addr:
my @args=@ARGV; # temporary
@ARGV=(); # options
@@
-269,6
+264,13
@@
my @rcpts=(!@addr ? (undef()) : values(%{{ map({
(!defined $obj ? () : (lc($obj->address())=>$obj));
} @addr) }}));
(!defined $obj ? () : (lc($obj->address())=>$obj));
} @addr) }}));
+# We may (=will) change the contents and send it multiple times
+# prevent wasteful Message-ID regeneration if it is just for one rcpt
+if (@rcpts>1 && defined(my $msgid=$head->get("Message-ID"))) {
+ $head->delete("Message-ID");
+ $head->replace("X-LaceMail-sendmail-Message-ID",$msgid);
+ }
+
my $stdin_body=(@rcpts<=1 ? undef() : do { # store input data only if it will be used multiple times
local $/=undef();
<STDIN>;
my $stdin_body=(@rcpts<=1 ? undef() : do { # store input data only if it will be used multiple times
local $/=undef();
<STDIN>;