--- bin/filter/filter_innd.pl 2000/09/21 12:16:46 1.1 +++ bin/filter/filter_innd.pl 2000/09/21 12:17:41 @@ -75,27 +75,27 @@ ### have "make money" in the subject, or are posted to more than 10 ### newsgroups. -## my ($maxgroups) = 10 ; -## -### Normally this output would be lost, but if you run innd with '-d -f' you -### can see what's going on. -### -### foreach $key (sort keys %hdr) { -### print "Header:\t$key Value:\t $hdr{$key}\n" ; -### } -## -## if ($hdr{"Subject"} =~ /\$*make.*money.*\$*/i ) { -## $rval = "no money requests here" -## } elsif ( @_ = split(",",$hdr{'Newsgroups'}) > $maxgroups ) { -## $rval = "too many groups" ; -### Kill article with "Re: " but no References: -## } elsif ($hdr{'Subject'} =~ /^Re: /o and $hdr{'References'} eq "") { -## $rval = "Followup without References:"; -### Kill article with invalid From: -## } elsif ($hdr{'From'} =~ /^\w*$/o or -## $hdr{'From'} !~ /^(.+?)\@([-\w\d]+\.)*([-\w\d]+)\.([-\w\d]{2,})$/o) { -## $rval = "From: is invalid, must be user\@[host.]domain.tld"; -## } + my ($maxgroups) = 4 ; + +# Normally this output would be lost, but if you run innd with '-d -f' you +# can see what's going on. +# +# foreach $key (sort keys %hdr) { +# print "Header:\t$key Value:\t $hdr{$key}\n" ; +# } + + if ($hdr{"Subject"} =~ /\$*make.*money.*\$*/i ) { + $rval = "no money requests here" + } elsif ( @_ = split(",",$hdr{'Newsgroups'}) > $maxgroups ) { + $rval = "too many groups" ; +# Kill article with "Re: " but no References: + } elsif ($hdr{'Subject'} =~ /^Re: /o and $hdr{'References'} eq "") { + $rval = "Followup without References:"; +# Kill article with invalid From: + } elsif ($hdr{'From'} =~ /^\w*$/o or + $hdr{'From'} !~ /^(.+?)\@([-\w\d]+\.)*([-\w\d]+)\.([-\w\d]{2,})$/o) { + $rval = "From: is invalid, must be user\@[host.]domain.tld"; + } ### ### print "Accepting\n" if ! $rval ;