Article View: news.software.nntp
Article #80904Re: filter_nnrpd.pl (maybe a bug)
From: Julien ÉLIE
Date: Tue, 05 May 2009 18:34
Date: Tue, 05 May 2009 18:34
66 lines
4111 bytes
4111 bytes
Hi Paolo,
>> Another possibility would be to check whether these functions are defined
>> when filter_nnrpd.pl is loaded; nnrpd would then log something useful
>> in news.notice. Same thing for innd.
>>
>> Would it be fine?
>
> yes, thank you :-)
Index: lib/perl.c
===================================================================
--- lib/perl.c (révision 8431)
+++ lib/perl.c (copie de travail)
@@ -157,6 +157,21 @@
} else {
PERLreadfilter (filterfile,function) ;
}
+
+ /* We try to find an inversion between filter_innd.pl
+ * and filter_nnrpd.pl. */
+ if (function != NULL) {
+ if ((strncmp(function, "filter_art", 10) == 0)
+ && (perl_get_cv("filter_post", false) != NULL)) {
+ syslog(L_NOTICE, "filter_innd.pl defines a filter_post function"
+ " -- maybe a confusion with filter_nnrpd.pl?");
+ }
+ if ((strncmp(function, "filter_post", 11) == 0)
+ && (perl_get_cv("filter_art", false) != NULL)) {
+ syslog(L_NOTICE, "filter_nnrpd.pl defines a filter_art function"
+ " -- maybe a confusion with filter_innd.pl?");
+ }
+ }
}
I hope it will help your users of postfilter.
Extract from my logs:
May 5 20:31:04 news innd: controlchan! spawned controlchan!:21:proc:10235
May 5 20:31:04 news innfeed[10236]: ME starting at Tue May 05 20:31:04 2009 (INN 2.5.0 (20090505 prerelease))
May 5 20:31:04 news innfeed[10236]: loading /home/news/etc/innfeed.conf
May 5 20:31:04 news innd: innfeed! spawned innfeed!:22:proc:10236
May 5 20:31:04 news innd: news.litech.org opened news.litech.org:20:file
May 5 20:31:04 news innd: inpaths! spawned inpaths!:24:proc:10237
May 5 20:31:04 news innd: source-archive! spawned source-archive!:25:proc:10238
May 5 20:31:04 news innd: nocem! spawned nocem!:26:proc:10239
May 5 20:31:04 news innd: filter: Restored EMP database.
May 5 20:31:04 news innd: filter_innd.pl defines a filter_post function -- maybe a confusion with filter_nnrpd.pl?
May 5 20:31:04 news innd: SERVER perl filtering enabled
May 5 20:31:05 news innd: python: First load, so I can do initialization stuff.
May 5 20:31:05 news innd: python: spamfilter successfully hooked into INN
May 5 20:31:05 news innd: SERVER Python filtering enabled
May 5 20:31:05 news innd: python method filter_mode not found
May 5 20:31:05 news innd: defined python methods
May 5 20:31:05 news innd: python interpreter initialized OK
May 5 20:31:05 news innd: SERVER starting
--
Julien ÉLIE
« -- Vite, vous deux ! Allez ouvrir les portes !
-- D'accord chef !
-- Tenez bien le bouclier chef ! » (Astérix)
Technical Details
Message-ID:
<gtq0vg$abj$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!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!not-for-mailReferences:
<gtm4q0$qtg$1@aioe.org> <gtne28$dtv$1@news.trigofacile.com> <gtnija$8ju$1@aioe.org> <gtnlj6$l5c$1@news.trigofacile.com> <gtoqvu$cdg$1@aioe.org>Show Full Headers
Complete Article Headers
Message-ID: <gtq0vg$abj$1@news.trigofacile.com> Subject: Re: filter_nnrpd.pl (maybe a bug) Date: Tue, 5 May 2009 20:34:03 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <gtm4q0$qtg$1@aioe.org> <gtne28$dtv$1@news.trigofacile.com> <gtnija$8ju$1@aioe.org> <gtnlj6$l5c$1@news.trigofacile.com> <gtoqvu$cdg$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!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 66 NNTP-Posting-Host: aaubervilliers-151-1-58-234.w83-112.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-15"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1241548592 10611 83.112.31.234 (5 May 2009 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Tue, 5 May 2009 18:36:32 +0000 (UTC) In-Reply-To: <gtoqvu$cdg$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