Article View: news.software.nntp
Article #83126Re: inn on ARM cpu
From: Julien ÉLIE
Date: Sat, 19 Jun 2010 10:17
Date: Sat, 19 Jun 2010 10:17
56 lines
3193 bytes
3193 bytes
Hi Dave,
> Is there a quick way to test something on the Python filter?
12:13 news@trigo ~% ctlinnd reload filter.python ''
Ok
gives something like this in news.notice:
Jun 19 12:13:40 news innd: ctlinnd command o:filter.python:
Jun 19 12:13:40 news innd: python: filter_before_reload executing...
Jun 19 12:13:40 news innd: python: I'm just reloading, so skip the formalities.
Jun 19 12:13:40 news innd: python: spamfilter successfully hooked into INN
Jun 19 12:13:40 news innd: SERVER Python filtering enabled
Jun 19 12:13:40 news innd: SERVER reload filter.python
And also:
12:14 news@trigo ~/work/inn/trunk% ctlinnd pause 'test'
Ok
12:14 news@trigo ~/work/inn/trunk% ctlinnd go 'test'
Ok
Jun 19 12:14:57 news innd: ctlinnd command m:test
Jun 19 12:14:57 news innd: python: state change from running to paused - test
Jun 19 12:15:03 news innd: ctlinnd command h:test
Jun 19 12:15:03 news innd: python: state change from paused to running - test
In filter_innd.py, you can locate filter_messageid and use something
like this:
def filter_messageid(self, msgid):
if msgid[0:10] == '<trigotest':
return "Nope!"
return ""
Reload the filter and innd should now reject articles whose message-ID
starts with '<trigotest'.
I think all these tests would prove the Python filter works fine.
--
Julien ÉLIE
« -- D'ailleurs je vais préparer de la potion magique qui ne
servira bien entendu que contre un retour éventuel des Romains !
-- Mais, pour l'heure, les Romains ne sont pas encore
revenus de leur mésaventure. » (Astérix)
Technical Details
Message-ID:
<hvi5g2$315$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!xlned.com!feeder7.xlned.com!news2.euro.net!feeder.news-service.com!weretis.net!feeder3.news.weretis.net!news.trigofacile.com!.POSTED.aaubervilliers-151-1-23-182.w83-114.abo.wanadoo.fr!not-for-mailReferences:
<hvgo3d$k0k$1@news.eternal-september.org><87aaqs117j.fsf@windlord.stanford.edu><hvgqfh$93u$1@news.eternal-september.org> <87wrtwyogy.fsf@windlord.stanford.edu> <hvi2ii$cp9$1@news.eternal-september.org>Show Full Headers
Complete Article Headers
Message-ID: <hvi5g2$315$1@news.trigofacile.com> Subject: Re: inn on ARM cpu Date: Sat, 19 Jun 2010 12:17:39 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <hvgo3d$k0k$1@news.eternal-september.org><87aaqs117j.fsf@windlord.stanford.edu><hvgqfh$93u$1@news.eternal-september.org> <87wrtwyogy.fsf@windlord.stanford.edu> <hvi2ii$cp9$1@news.eternal-september.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!xlned.com!feeder7.xlned.com!news2.euro.net!feeder.news-service.com!weretis.net!feeder3.news.weretis.net!news.trigofacile.com!.POSTED.aaubervilliers-151-1-23-182.w83-114.abo.wanadoo.fr!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 56 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 8bit Injection-Date: Sat, 19 Jun 2010 10:17:39 +0000 (UTC) Injection-Info: news.trigofacile.com; posting-host="aaubervilliers-151-1-23-182.w83-114.abo.wanadoo.fr:83.114.142.182"; logging-data="3109"; mail-complaints-to="abuse@trigofacile.com" In-Reply-To: <hvi2ii$cp9$1@news.eternal-september.org> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18197