--- news2mail.orig	Sat Jul 29 15:21:30 2000
+++ news2mail	Thu Jan 25 11:39:37 2001
@@ -106,7 +106,7 @@
 
 	$sendmail = "|" . $inn::mta ;
 	$sendmail =~ s!%s!! ;
-	$sendmail .= " -ee '-f<news>' -odq " . $a;
+	$sendmail .= " -ee '-f<$l>' -odq " . $a;
 #	$sendmail = "|/usr/local/bin/debug -oi -ee '-f<news>' -odq " . $a;
 
 	syslog('info', $sendmail);
@@ -139,7 +139,7 @@
 
 		# empty line signals end of header
 		if ($line eq "") {
-			print SM "To: $l\n\n";
+			print SM "To: $a\n\n";
 			$ih = 0;
 			next;	
 			}
@@ -156,6 +156,9 @@
 		# convert Newsgroups header into X-Newsgroups
 		#
 		$line =~ s/^Newsgroups:/X-Newsgroups:/i;
+		$line =~ s/(^Message-ID: \<)(.*)/$1news2mail-$2/i;
+	 	$line =~ s/(^From: )(.*)( \<.*\>)/$1$2 \<$l\>\nReply-To: $2$3/i;
+	 	$line =~ s/(^From: )(.*\@.*)( \()(.*)(\))/$1$4 \<$l\>\nReply-To: $4<$2>/i;
 		print SM "$line\n";
 		}
 
