From 5fea745a1058e210705d1f1ee4b29e342ce2b8fc Mon Sep 17 00:00:00 2001 From: WebSTUMP Date: Wed, 2 Feb 2011 18:33:44 +0000 Subject: [PATCH] fix noack function: store whole From line contents (not just the email address) in the noack list, and when matching look only for the contents (not also the header name From:) --- stump/bin/processNoack.pl | 5 ++--- stump/bin/submission.pl | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/stump/bin/processNoack.pl b/stump/bin/processNoack.pl index 521e36f..ab468d2 100755 --- a/stump/bin/processNoack.pl +++ b/stump/bin/processNoack.pl @@ -20,9 +20,8 @@ while( ) { } $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; } diff --git a/stump/bin/submission.pl b/stump/bin/submission.pl index f319617..e49680f 100755 --- a/stump/bin/submission.pl +++ b/stump/bin/submission.pl @@ -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"; -- 2.30.2