From: don <> Date: Wed, 8 Feb 2006 05:34:33 +0000 (-0800) Subject: [project @ 2006-02-07 21:34:33 by don] X-Git-Tag: release/2.6.0~626 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d61f0ccff4b7b76b4dd2e7f8ff4e924ba91985a0;p=debbugs.git [project @ 2006-02-07 21:34:33 by don] * Instead of just rearranging the envelope From, rip it out entirely to get around the broken >From quoting in l.d.o and other mailing lists. --- diff --git a/Debbugs/MIME.pm b/Debbugs/MIME.pm index 4f803bc..10c4add 100644 --- a/Debbugs/MIME.pm +++ b/Debbugs/MIME.pm @@ -150,12 +150,12 @@ sub create_mime_message{ # make a copy so that we don't screw up anything # that is expecting this arrayref to stay constant $attachment = [@{$attachment}]; - # flip the From and Received lines around - @{$attachment}[qw(1 0)] = @{$attachment}[qw(0 1)]; + # remove the from line + splice @$attachment, 1, 1; } elsif (not ref($attachment)) { - # It's a scalar - $attachment =~ s/^(Received:[^\n]+\n)(From [^\n]+\n)/$2$1/s; + # It's a scalar; remove the from line + $attachment =~ s/^(Received:[^\n]+\n)(From [^\n]+\n)/$1/s; } $msg->attach(Type => 'message/rfc822', Data => $attachment,