Article View: news.software.nntp
Article #80954Re: filter_nnrpd.pl (maybe a bug)
From: Julien ÉLIE
Date: Sat, 09 May 2009 12:46
Date: Sat, 09 May 2009 12:46
97 lines
5354 bytes
5354 bytes
Hi Paolo,
> i don't care about inn version since postfilter is able to detect it. I only
> need to be sure about the effect of each perl statement because the code is
> old (i'm rewriting it now), headers are many and a fully debug is expansive.
OK, thanks for your work.
> btw see
> http://code.google.com/p/postfilter/source/browse/trunk/doc/how_to_delete_headers.txt
Oh, I see there was some misunderstanding.
When I wrote:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Incidentally, I have also fixed a bug when you do:
$hdr{'In-Reply-To'} = '';
or
$hdr{'In-Reply-To'} = undef;
It generated an *empty* header :
In-Reply-To: \r\n
Now, it totally removes it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
It was an example I used. The problem was generic and not linked
with this specific In-Reply-To: header. Sorry for the misunderstanding.
I only implemented what USEFOR (and also RFC 3977) states: no empty headers.
And that's why 'undef' now works fine everywhere with INN 2.5. (Otherwise,
only 'delete' would have worked for all other headers, like in INN 2.4.)
|-------------------------------------------------------------|
| NNRPD Version Table |
|---|-----------------------|---------------|-----------------|
| # | Headers | INN 2.4 | INN 2.5 |
|---|-----------------------|---------------|-----------------|
| A | $system_headers | undef | undef |
|---|-----------------------|---------------|-----------------|
| B | $user_agents | delete | undef |
|---|-----------------------|---------------|-----------------|
| C | $bugged | delete | undef |
|---|-----------------------|---------------|-----------------|
| D | All other headers | delete | delete or undef |
|---|-----------------------|---------------|-----------------|
C (In-Reply-To:) and D should be handled the same way.
For B, delete or undef work for INN 2.5. I do not understand why
you handle $user_agents separately. Maybe because Postfilter
handles them in a different way?
In fact, it is $system_headers (undef/undef) and all other headers
(delete/delete or undef).
Typo in your doc: "detete" -> "delete".
> Beware: with inn 2.4, if the perl filter tries to delete an $user_agent
> header using delete the article will be *rejected* by innd because instead
> of deleting that header nnrpd cleans its content and innd doesn't accept
> empty headers.
?? Is it really what INN 2.4 does? (You have put 'delete' in your table.)
And INN 2.5 allows 'delete' -> it is totally removed.
Do you have an example of reject here?
> Beware: with inn 2.4, every attempt to delete one of $system_headers through
> 'delete' will silently discarded by nnrpd. Simply the 'delete' command will
> have no effects without any kind of log notice.
Also with INN 2.5.
> Beware: some header (notably From, Newsgroups, Subject, Xref, Path, Lines
> and Message-ID) can't be deleted. If the perl filter tries to delete one of them,
> the article is rejected by innd because some mandatory header is missing.
??
Are you really sure Lines: and Xref: cannot be deleted? It surprises me.
I think Date: cannot be deleted.
--
Julien ÉLIE
« J'ai six loyaux serviteurs, ils m'ont appris tout ce que je sais :
ils s'appellent quoi, pourquoi, quand, comment, où et qui. » (Rudyard Kipling)
Technical Details
Message-ID:
<gu3u4t$rnq$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> <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> <gu3hgs$aeh$1@news.trigofacile.com> <gu3qfs$t2m$1@aioe.org>Show Full Headers
Complete Article Headers
Message-ID: <gu3u4t$rnq$1@news.trigofacile.com> Subject: Re: filter_nnrpd.pl (maybe a bug) Date: Sat, 9 May 2009 14:46:55 +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> <gu3hgs$aeh$1@news.trigofacile.com> <gu3qfs$t2m$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: 97 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 1241873374 28410 90.57.84.165 (9 May 2009 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Sat, 9 May 2009 12:49:34 +0000 (UTC) In-Reply-To: <gu3qfs$t2m$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