🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #28077

Re: risk of UNIX postings being misidentified as spam?

#28077
From: Silas Dunsmore
Date: Fri, 08 May 1998 00:00
84 lines
4002 bytes
In article <6iui65$rl2@arduin.Tymnet.COM>,
Ed Mooring <mooring@tymnet.com> wrote:
>
>This is the third time I've seen somebody (at least implicitly) wishing
>that INN's Perl filter had more access to INN's innards.  Since I've
>already added a message-id filter for Perl, and I've looked at the idea
>of a Perl/INN interface already, I'll round up some loose tuits and
>bash something together if people are interested.

It appears to me that the proper place to put the callback is in the
innd/cc.c file.  This code already implements an interface for ctlinnd.
It should be easier to leverage that than to write it from scratch.

I've done some preparatory work toward this end, though I haven't touched
the actual Perl/C thunks yet.  Want the diffs?


>1) Check the history database for a message-id.
>2) Cancel an article.
>3) Add an article to the history database.
>4) Check to see if a newsgroup exists, and find its status.

The first three of these are available through the aforementioned ICC
interface.  Implementation should be trivial.  (He said with a smirk.)

The last could perhaps be implemented by tie'ing a hash to INND's
internal newsgroups list.  I haven't researched this at all.

It might be better (easier, anyway) to have the filter explicitly parse
the active file into a standard hash, with a resync every so often.

It'd eat a couple megs of memory, though.  Ah, but memory's cheap.  And
this would allow more flags than INND itself uses: binaries allowed,
only-binaries, poison newsgroups, stricter filtering, per-newsgroup
crossposting limits, ....  All the ad-hoc stuff (sorry, Jeremy) that
cleanfeed is doing could be made more regular and orthogonal.

Q: how nasty would it be to have our own special flags in the active
file itself, after the y/n/m ? And what breaks if we do so?  I note that
ctlinnd won't let me insert them.


>This, along with a Perl interface to PGP, and the dynamic-loading patch to
>INN, would be enough to implement NOCEM in the Perl filter. 

No!  Don't do this!  Really!

Remember, while the perl filter is running, INND is not doing anything
else.  Also, the necessary execs (and forks?) to call PGP from the filter
sound like a highly suspect thing to do.

Bottom line: mass-cancels should be done outside the core.


>If anybody has any comments or wishes to add, post and/or mail 'em. If I get
>more than a couple of responses, I'll build the thing.

Q: how much experience do you have with the Perl-XS interface?  This is
the first time I've looked at it, and I'm not comfortable with it yet.

The callback seems doable, but there's no real examples of the right way
to implement it in the documentation.

The examples that exist are geared toward making a C library available
as a Perl module.  (Much as MD5.pm is implemented.)  There's really no
good "meat" on getting embedded Perl interpreters to call back into the
C program they're within.

Q: Does anyone know of any program that already implements embeded Perl
and strong two-way Perl/C calling, that could be used as an example?


>-- 
>Regards,
>Ed Mooring (mooring@tymnet.com 408-922-7504)

-- 
Later, eh?    Silas

Announcer(after a long thoughtful pause): Sure makes you think, this modern
               physics.

Technical Details
Message-ID: <6j02cf$a6q$1@warez.psyber.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.mbox.zip!not-for-mail
References: <6io1ku$c3$1@samba.rahul.net> <6iqut8$qtq@bcarh8ab.bnr.ca> <4Z741.34$bZ4.14913@firestorm.gunslinger.net> <6iui65$rl2@arduin.Tymnet.COM>

Show Full Headers
Complete Article Headers
Message-ID: <6j02cf$a6q$1@warez.psyber.com>
Subject: Re: risk of UNIX postings being misidentified as spam?
Date: Fri, 08 May 1998 00:00:00 +0000
From: silasd@user.psyber.com (Silas Dunsmore)
References: <6io1ku$c3$1@samba.rahul.net> <6iqut8$qtq@bcarh8ab.bnr.ca> <4Z741.34$bZ4.14913@firestorm.gunslinger.net> <6iui65$rl2@arduin.Tymnet.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.mbox.zip!not-for-mail
X-Deja-AN: 351570119
Organization: Psyberware Internet Access
Newsgroups: news.software.nntp