]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2006-02-07 21:34:33 by don]
authordon <>
Wed, 8 Feb 2006 05:34:33 +0000 (21:34 -0800)
committerdon <>
Wed, 8 Feb 2006 05:34:33 +0000 (21:34 -0800)
* 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.

Debbugs/MIME.pm

index 4f803bc54c6a45d4bfc0f9ff8bcdd5134bc27424..10c4add24c13e334e6a5fe3b2ed8797c1835f580 100644 (file)
@@ -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,