Article View: news.software.nntp
Article #83932nnrpd perl filter and $user
From: Aioe
Date: Sun, 20 Mar 2011 15:40
Date: Sun, 20 Mar 2011 15:40
15 lines
1791 bytes
1791 bytes
I know that nnrpd exports to the perl filter the current readers.conf username inside a variable called '$user'. This variable seems to be filled by nnrpd only when filter_post() subroutine is executed and it's empty when filter is loaded (when it's executed everything that is outside that routine). Imho, this is bad. NNRPD perl filters - at least postfilter - need to make some initialization job when loaded and before filtering incoming messages. The current nnrpd behaviour forces them to keep inside filter_post() every code that needs to know the current user and this forces the filter to re-execute these jobs every time that an article is posted. At the same time, this behaviour is obscure (i've spent a Sunday morning trying to understand it). btw, i'm rewriting postfilter from scratch.
Technical Details
Message-ID:
<im574u$anh$1@speranza.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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <im574u$anh$1@speranza.aioe.org> Subject: nnrpd perl filter and $user Date: Sun, 20 Mar 2011 16:40:16 +0100 From: Aioe <estasi@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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Newsgroups: news.software.nntp Followup-To: news.software.nntp Organization: Aioe.org Lines: 15 NNTP-Posting-Host: XeDst1bFr3+lvjuoIS0txg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@aioe.org User-Agent: KNode/4.4.6 X-Notice: Filtered by postfilter v. 0.8.2