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 521e36f50e1213c2383adbbef944a17ae223e2e7..ab468d20b77a15cb3977dba6e040e09288abe829 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 f31961774a9fafbee80594f9f3735d81c8abe477..e49680f66b8b3ac28fa45f7b22b473a0b63de980 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";