🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80128

Re: a few questions about nnrpd and filter_nnrpd.pl

#80128
From: Julien ÉLIE
Date: Wed, 18 Feb 2009 21:17
42 lines
2438 bytes
Hi,

> 2. can filter_nnrpd.pl gracefully *close* a connection from a client?
> I need to block the existing ones without using ipfilter (that
> requires root privileges) and i can't wait till they close their connection.

This feature is now implemented in INN 2.5.0.

Just write:

    return "CLOSE evil spammer";



Index: nnrpd/post.c
===================================================================
--- nnrpd/post.c        (révision 8319)
+++ nnrpd/post.c        (copie de travail)
@@ -1056,6 +1056,12 @@
                return SpoolitTo(article, p, SDir);
             }
        }
+        else if (strncmp(p, "CLOSE", 5) == 0) {
+            syslog(L_NOTICE, "%s post %s", Client.host, p);
+            Reply("%d NNTP server unavailable; no posting\r\n",
+                  NNTP_FAIL_TERMINATING);
+            ExitWithStats(1, true);
+        }
        else
        {
            if (modgroup)




I hope it will be of help,

-- 
Julien ÉLIE

« Aequum est ut cuius participauit lucrum, participet et damnun. » 
Technical Details
Message-ID: <gnhttq$fdf$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!multikabel.net!newsfeed20.multikabel.net!newsfeed.freenet.de!ecngs!feeder2.ecngs.de!87.106.137.111.MISMATCH!feeder1.news.weretis.net!weretis.net!news.trigofacile.com!not-for-mail
References: <gmsr19$4i9$1@aioe.org>

Show Full Headers
Complete Article Headers
Message-ID: <gnhttq$fdf$1@news.trigofacile.com>
Subject: Re: a few questions about nnrpd and filter_nnrpd.pl
Date: Wed, 18 Feb 2009 22:17:24 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <gmsr19$4i9$1@aioe.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.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!multikabel.net!newsfeed20.multikabel.net!newsfeed.freenet.de!ecngs!feeder2.ecngs.de!87.106.137.111.MISMATCH!feeder1.news.weretis.net!weretis.net!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 42
NNTP-Posting-Host: aaubervilliers-151-1-28-45.w83-112.abo.wanadoo.fr
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
 reply-type=original
Content-Transfer-Encoding: 8bit
X-Trace: news.trigofacile.com 1234991867 15791 83.112.19.45 (18 Feb 2009
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Wed, 18 Feb 2009 21:17:47 +0000 (UTC)
In-Reply-To: <gmsr19$4i9$1@aioe.org>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049