This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #82996] Use the user's from address as return-path in perlbug
authorDavid Leadbeater <dgl@dgl.cx>
Sat, 29 Jan 2011 19:24:49 +0000 (11:24 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 29 Jan 2011 19:54:21 +0000 (11:54 -0800)
Many systems thesedays don't have a valid internet domain name and
perlbug@perl.org does not accept email with a return-path that does not
resolve. Therefore pass the user's address to sendmail so it's less
likely to get stuck in a mail queue somewhere.

utils/perlbug.PL

index 2972ae7..368ce91 100644 (file)
@@ -1164,8 +1164,8 @@ send to '$address' with your normal mail client.
 EOF
     }
 
-    open( SENDMAIL, "|$sendmail -t -oi" )
-        || die "'|$sendmail -t -oi' failed: $!";
+    open( SENDMAIL, "|-", $sendmail, "-t", "-oi", "-f", $from )
+        || die "'|$sendmail -t -oi -f $from' failed: $!";
     print SENDMAIL build_complete_message();
     if ( close(SENDMAIL) ) {
         print "\nMessage sent\n";