chiark / gitweb /
fix noack function: store whole From line contents (not just the email address) in...
authorWebSTUMP <webstump@chiark.greenend.org.uk>
Wed, 2 Feb 2011 18:33:44 +0000 (18:33 +0000)
committerWebSTUMP <webstump@chiark.greenend.org.uk>
Wed, 2 Feb 2011 18:33:44 +0000 (18:33 +0000)
stump/bin/processNoack.pl
stump/bin/submission.pl

index 521e36f..ab468d2 100755 (executable)
@@ -20,9 +20,8 @@ while( <STDIN> ) {
 }
 
 $From =~ s/^From: //;
-if( $From =~ m/([\w-\.]*)\@([\w-\.]+)/ ) {
-  $From = "$1\@$2";
-} else {
+chomp $From;
+if( $From !~ m/([\w-\.]*)\@([\w-\.]+)/ || $From =~ m/\n/) {
   print STDERR "From line `$From' is incorrect\n";
   exit 0;
 }
index f319617..e49680f 100755 (executable)
@@ -133,7 +133,10 @@ print STDERR "Too many newsgroups\n";
 # checks if poster needs acknowledgment of receipt
 #
 sub checkAck {
-  if( &nameIsInListExactly( $From, "noack.list" ) ) {
+  my $fromaddr = $From;
+  $fromaddr =~ s/^[-A-Za-z]+\s*\:\s*//;
+  print STDERR "checking noack.list for \"$From|$fromaddr\"\n";
+  if( &nameIsInListExactly( $fromaddr, "noack.list" ) ) {
     $needAck = "no";
   } else {
     $needAck = "yes";