Article View: news.software.nntp
Article #54445Re: where can i set filter with inn2.3.1
From: Andrew Gierth
Date: Mon, 01 Oct 2001 06:01
Date: Mon, 01 Oct 2001 06:01
42 lines
2634 bytes
2634 bytes
>>>>> "madog" == madog <no@no.no> writes:
madog> for example, i'd like to deny all the posts from user aaa or
madog> from email address aaa@bbb.ccc how can i apply that ? thanks
sigh. You should have found that out _before_ running a
wide-open-to-the-whole-world server....
There are two basic methods for limiting who can post. One is to allow
only authenticated users (or only certain IPs) to post; see
readers.conf for how to set that up. The other is to use the Perl
filters; filter_nnrpd is used for all local posts, and filter_innd is
used for all traffic both local and incoming from feeds.
(However, you're almost certainly not going to be able to prevent
abuse using the perl filters alone unless you work really hard at it.)
The perl filter can be used to block posts by From address or other
header values pretty easily:
sub filter_nnrpd
{
return "post not allowed with this address"
if $hdr{From} =~ /aaa\@bbb\.ccc/;
return "";
}
will reject posts with that specific string in the From header.
The hard part is that things like From headers are user-supplied and
therefore forgeable (and spamming and flooding tools will generate
random ones).
BTW: I've aliased you out on my servers; if you want me to see any of
your further posts you can email me or post via another site. This may
sound harsh, but given current levels of abuse it's necessary. If you
implement user authentication or are otherwise satisfied that your
system can not be abused, then let me know and I'll unalias you.
--
Andrew.
Technical Details
Message-ID:
<87zo7bnbji.fsf@erlenstar.demon.co.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-feed.riddles.org.uk!erlenstar.demon.co.uk!newsmonsterReferences:
<9p8sre$rkj$1@madogcc.myip.org>Show Full Headers
Complete Article Headers
Message-ID: <87zo7bnbji.fsf@erlenstar.demon.co.uk> Subject: Re: where can i set filter with inn2.3.1 Date: Mon, 01 Oct 2001 06:01:53 +0000 From: Andrew Gierth <andrew@erlenstar.demon.co.uk> References: <9p8sre$rkj$1@madogcc.myip.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-feed.riddles.org.uk!erlenstar.demon.co.uk!newsmonster Newsgroups: news.software.nntp Organization: disorganised Lines: 41 NNTP-Posting-Host: erlenstar.demon.co.uk (61bf:0071) X-Mayan-Date: Long count = 12.19.8.10.19; tzolkin = 11 Cauac; haab = 17 Chen X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29 X-Attribution: AG X-P-Persistent-Headers: are a bad idea. X-Newsreader: Gnus v5.5/Emacs 20.2 X-Complaints-To: andrew@erlenstar.demon.co.uk X-Post-Filter: postfilter v0.6 alpha