🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80951

Re: filter_nnrpd.pl (maybe a bug)

#80951
From: Julien ÉLIE
Date: Sat, 09 May 2009 09:11
55 lines
3605 bytes
Hi Paolo,

> it's clear. With INN 2.5 headers should be deleted using undef.

Yes.


>> If, with INN *2.4*,
>> you undef them, they end up empty but not removed by nnrpd and innd
>> rejects the article as you already experienced it.
>
> with inn 2.4:
>
> user agents ($user_agents) *can* be deleted through 'delete' (i've made a
> test now with 2.4.5, 2.4.4 and 2.4.1).

Yes, it is what I wrote just after:
  And if, with INN *2.4*, you delete them, then it works if they are *not*
  in $system_headers (nnrpd); otherwise, they are not deleted as you saw
  (initial subject of your thread)...

$user_agents are not in $system_headers, so it works with 'delete'.


>> For X-Trace:, I do not see how to remove it with INN 2.4 (delete will
>> not work, and undef will empty it and it will be rejected by innd).
>
> with inn 2.4 system headers *can* be deleted using undef. Postfilter already
> does this and it works (and i've made a test before writing here)

Oh, yes, you're right.  It does not work with 'delete' for INN 2.4 system
headers but 'undef' will work.  (if (hp->Len == 0) hp->Value = hp->Body = NULL;
in the source.  I had overlooked that!)

For INN 2.4, 'undef' will not work for $user_agents (as seen above).


>> I believe it will work.  Sorry for the fact it is not always possible
>> to remove a header with INN 2.4 :-/
>
> are you sure?
> Almost all headers can be removed (even if obviously innd rejects all
> articles that miss some needed header)

Hmm...  Then 'undef' system headers and 'delete' everything else (including
$user_agents).  It will work for both INN 2.4 and INN 2.5.
Maybe the simplest thing to do, isn't it?  No need to separate your code
depending on the version of INN.

-- 
Julien ÉLIE

« Le travail est l'opium du peuple et
  je ne veux pas mourir drogué. » (Boris Vian) 
Technical Details
Message-ID: <gu3hgs$aeh$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-mail
References: <gtm4q0$qtg$1@aioe.org> <gtm52j$r2k$1@aioe.org> <gtm6i9$eiq$1@tioat.net> <gtmvc6$k9a$1@aioe.org> <gtneib$eh4$1@news.trigofacile.com> <gtnioo$8ju$2@aioe.org> <gtq0p9$a7j$1@news.trigofacile.com> <gtq7ib$qm1$2@aioe.org> <gtq927$7fa$1@news.trigofacile.com> <gts4n5$e9q$1@aioe.org> <gtsj0i$e0o$1@news.trigofacile.com> <gtst92$85h$1@aioe.org> <gtsv12$trf$1@news.trigofacile.com> <gtvjpa$ptt$1@aioe.org> <gtvlut$h8q$1@news.trigofacile.com> <gu1dmt$d83$1@aioe.org> <gu28eu$33r$1@news.trigofacile.com> <gu3c93$c08$1@aioe.org>

Show Full Headers
Complete Article Headers
Message-ID: <gu3hgs$aeh$1@news.trigofacile.com>
Subject: Re: filter_nnrpd.pl (maybe a bug)
Date: Sat, 9 May 2009 11:11:28 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <gtm4q0$qtg$1@aioe.org> <gtm52j$r2k$1@aioe.org> <gtm6i9$eiq$1@tioat.net> <gtmvc6$k9a$1@aioe.org> <gtneib$eh4$1@news.trigofacile.com> <gtnioo$8ju$2@aioe.org> <gtq0p9$a7j$1@news.trigofacile.com> <gtq7ib$qm1$2@aioe.org> <gtq927$7fa$1@news.trigofacile.com> <gts4n5$e9q$1@aioe.org> <gtsj0i$e0o$1@news.trigofacile.com> <gtst92$85h$1@aioe.org> <gtsv12$trf$1@news.trigofacile.com> <gtvjpa$ptt$1@aioe.org> <gtvlut$h8q$1@news.trigofacile.com> <gu1dmt$d83$1@aioe.org> <gu28eu$33r$1@news.trigofacile.com> <gu3c93$c08$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: 55
NNTP-Posting-Host: amontpellier-159-1-13-165.w90-57.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 1241860445 10705 90.57.84.165 (9 May 2009
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Sat, 9 May 2009 09:14:05 +0000 (UTC)
In-Reply-To: <gu3c93$c08$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