Article View: news.software.nntp
Article #76032Approving articles with nnrpd filters
From: Iulius
Date: Thu, 19 Apr 2007 19:16
Date: Thu, 19 Apr 2007 19:16
49 lines
2784 bytes
2784 bytes
Hi,
1/ Is it possible to approve articles without sending a mail to the
moderator, using filter_nnrpd.pl?
In fact, if I add an Approved header with the nnrpd filter, the
article is correctly posted to the newsgroup in question but it
is also mailed to the moderator. I would have wanted to know
whether it were possible not to send such a mail.
I use:
if (($hdr{Newsgroups} =~ /my\.moderated\.newsgroup/i) && ($user =~ /^(me|you|her)$/i)) {
# these users are trustful -- they will not crosspost to another moderated group
$modify_headers = 1;
$hdr{'X-Approved'} = "Auto-approbation for $user";
$hdr{Approved} = 'mail-address';
if ($hdr{'Followup-To'} !~ /hierarchy\./i) {
$hdr{'Followup-To'} = "hierarchy.group";
}
my $message = post_announce();
$hdr{Subject} = "[$user-OK] ".$hdr{Subject};
}
It sends a mail with the subject set at the last line.
Can't it be avoided?
2/ Another issue is the posting. It would have been great if that code
without the last two lines had worked. But it is not the case since
INN rejects the article (reason: Unapproved article).
That is why I use a post_announce function which uses rnews to post
the article. It is quite a pain (especially to write headers).
I did not manage to make inews work, but as long as rnews works, it is fine :)
So the question is: can't innd see that the Approved header is here
and allow the article to be posted, without having to write a separate
code in filter_nnrpd.pl to post the article?
I think the two questions are linked. But why such a behaviour?
Regards,
--
Iulius
« Pour Rome, la direction importe peu, car tous les chemins
y mènent. » (Astérix)
Technical Details
Message-ID:
<f08f5n$8f8$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!news.albasani.net!news.ecp.fr!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <f08f5n$8f8$1@guepard.ecp.fr> Subject: Approving articles with nnrpd filters Date: Thu, 19 Apr 2007 21:16:11 +0200 From: Iulius <iulius@nom-de-mon-site.com.invalid> 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!news.albasani.net!news.ecp.fr!not-for-mail Newsgroups: news.software.nntp Organization: Gens Iulia -- http://www.trigofacile.com/ Lines: 49 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 1177010227 8680 138.195.145.22 (19 Apr 2007 19:17:07 GMT) X-Complaints-To: ingesys@cti.ecp.fr NNTP-Posting-Date: Thu, 19 Apr 2007 19:17:07 +0000 (UTC) User-Agent: Thunderbird 2.0.0.0 (Windows/20070326)