🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #76034

Re: Approving articles with nnrpd filters

#76034
From: Iulius
Date: Fri, 20 Apr 2007 06:46
67 lines
3973 bytes
En réponse à Jeffrey M. Vinocur :
>> 1/ Is it possible to approve articles without sending a mail to the
>> moderator, using filter_nnrpd.pl?
> 
> It doesn't look like it -- long before the perl filter code is
> called, a flag is set to indicate that the article needs to be
> sent to the moderator, and there's no way currently available to
> unset that flag from within the filter code.  (Of course, we
> could patch the code -- I'm looking at the use of modgroup in
> nnrpd/post.c.)

All right.  But « modgroup » is the flag in the active file, isn't it?
In nnrpd/post.c, you have:
(line 448) /* Approved; left alone. */

Perhaps it would be possible to do something here, before it the article
is passed to innd/art.c where it is rejected:
(line 2072) if (ngp->Rest[0] == NF_FLAG_MODERATED && !Approved) {
    snprintf(cp->Error, sizeof(cp->Error), "%d Unapproved for \"%s\"",
    NNTP_FAIL_IHAVE_REJECT, MaxLength(ngp->Name, ngp->Name));


> Now wait, is post_announce something you wrote that posts a whole
> new article from scratch?

Yes.  It is difficult to do differently with the current implementation.


> This is a kinda circuitous approach, but I suppose the way to
> make it work is to have your filter code drop the original copy
> of the article.  In other words, if your post_announce works,
> have your filter return DROP so that the original copy is not
> emailed.

That's a good idea for preventing the mail from being sent.


> I should mention that I really don't like this whole approach.  I
> think it has the potential to end up silently eating articles (if
> there's something wrong that rnews finds out but has no way to
> communicate it back through all of the convolutions).

Yes, you're right.  So sending the mail (with a modified subject
header in order to immediately see that it has normally already been
posted) is currently wiser.


> Is there really no way that you could just give the relevant
> users "access: A" permission and have their newsreaders
> automatically add the Approved header when needed?

It is exactly what I wanted to avoid for my users (everybody does not
use newsreaders which can easily add headers).  Up to now, I moderate
all the articles but it happens that somebody wishes to post during
a week-end or at night (and I am not always here to moderate the article).

That's why I tried to do that a couple of days ago and found these
little technical problems with nnrpd_filter.  But no worry, there is
no harm if I still receive an e-mail (at least, it allows me to see
to it whether rnews has correctly sent the article!).

Regards,

-- 
Iulius

« Aures serua. »
Technical Details
Message-ID: <f09nkc$u42$1@guepard.ecp.fr>
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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed.kamp.net!newsfeed.kamp.net!feeder3.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!not-for-mail
References: <f08f5n$8f8$1@guepard.ecp.fr> <f093am$l0s$1@puck.litech.org>

Show Full Headers
Complete Article Headers
Message-ID: <f09nkc$u42$1@guepard.ecp.fr>
Subject: Re: Approving articles with nnrpd filters
Date: Fri, 20 Apr 2007 08:46:40 +0200
From: Iulius <iulius@nom-de-mon-site.com.invalid>
References: <f08f5n$8f8$1@guepard.ecp.fr> <f093am$l0s$1@puck.litech.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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed.kamp.net!newsfeed.kamp.net!feeder3.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!not-for-mail
Newsgroups: news.software.nntp
Organization: Gens Iulia -- http://www.trigofacile.com/
Lines: 67
NNTP-Posting-Host: goret.via.ecp.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: guepard.ecp.fr 1177051660 30850 138.195.145.22 (20 Apr 2007 06:47:40
 GMT)
X-Complaints-To: ingesys@cti.ecp.fr
NNTP-Posting-Date: Fri, 20 Apr 2007 06:47:40 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.0 (Windows/20070326)
In-Reply-To: <f093am$l0s$1@puck.litech.org>