🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #88842

Re: What methods can throttle INN connections?

#88842
From: Russ Allbery
Date: Sun, 24 Oct 2021 20:28
39 lines
2553 bytes
Aioe <estasi@aioe.org> writes:
> Il 23/10/21 21:30, 711 Spooky Mart ha scritto:

>> Hello NNTP gurus. I want to host a binary local newsgroup. I want to
>> discourage spammers from trying to push up irrelevant big binaries,
>> vids, pr0n, etc. The purpose of the binary group is for uploading PDF
>> and ZIP/XZ/7Z files < 4MB.
>> I am seeking ideas on different ways to throttle INN connections.
>> [1] Firstly I want to throttle all client connections to max 64kB/s.

> if you need a limit for all users, iptables does this
> if you need a limit for each user, max_rate does this (see man readers.con)

Good call on max_rate; I'd forgotten about that.

>> [4] Fourthly, I want to offer the newsgroup to the big world network if
>> anyone wants to sync it, with all the binary mimetypes stripped, so the
>> outgoing feed would only contain body text without the binary content.

> you've to patch idd to do this

The easiest place to do so would probably be to patch innxmit (or innfeed,
but for this sort of specialty use, the much simpler innxmit is probably
better) to strip the binary attachments out of the outgoing feed.

The hard part is going to be finding a good MIME parser in C.  I'm sure
there are tons of them out there in all the different mail programs
written in C, but whether any of them is reusable for your purpose is
another question.

Or, hm, you could probably also do something fancy with a batch feed where
you rewrite the batch in some other program more suitable to doing
parsing, like Python.

-- 
Russ Allbery (eagle@eyrie.org)             <https://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87pmrugoaq.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <sl1nqc$1j4c$1@gioia.aioe.org> <sl4cln$11h6$1@gioia.aioe.org>

Show Full Headers
Complete Article Headers
Message-ID: <87pmrugoaq.fsf@hope.eyrie.org>
Subject: Re: What methods can throttle INN connections?
Date: Sun, 24 Oct 2021 13:28:45 -0700
From: Russ Allbery <eagle@eyrie.org>
References: <sl1nqc$1j4c$1@gioia.aioe.org> <sl4cln$11h6$1@gioia.aioe.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org; logging-data="29966"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:ocKmpuxS3ByaFeDmVJ5PEMQ1p8g=
Lines: 38