perlbug did not previously generate a From: header. While some MTAs do
authorJesse Vincent <jesse@bestpractical.com>
Sun, 2 Jan 2011 02:50:21 +0000 (10:50 +0800)
committerJesse Vincent <jesse@bestpractical.com>
Sun, 2 Jan 2011 02:53:54 +0000 (10:53 +0800)
the "right" thing and insert a valid "From:", not all of them do,
potentially resulting in dropped mail.

utils/perlbug.PL

index 38f2b3b..8caef3c 100644 (file)
@@ -291,7 +291,7 @@ sub Init {
     $address = $::opt_a || ($::opt_t ? $testaddress
                            : $thanks ? $thanksaddress : $bugaddress);
 
-    # Users address, used in message and in Reply-To header
+    # Users address, used in message and in From and Reply-To headers
     $from = $::opt_r || "";
 
     # Include verbose configuration information
@@ -1089,6 +1089,7 @@ sub _message_headers {
     $headers{'Cc'}         = $cc        if ($cc);
     $headers{'Message-Id'} = $messageid if ($messageid);
     $headers{'Reply-To'}   = $from      if ($from);
+    $headers{'From'}       = $from      if ($from);
     return \%headers;
 }