🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80907

Re: filter_nnrpd.pl (maybe a bug)

#80907
From: Julien ÉLIE
Date: Tue, 05 May 2009 20:52
86 lines
5269 bytes
Hi Paolo,

>> + $hdr{'Organization'} = undef;
>
> a list of all articles that can't be deleted through
> 'delete $hdr{'somewhat'}' seems to be missing?

Yeah, that's why I only mentioned:

  To delete the Organization: header, you can use:

    $hdr{'Organization'} = undef;
    $modify_headers = 1;

  or:

    $hdr{'Organization'} = '';
    $modify_headers = 1;

:)


delete $hdr{'Organization'} could be made to work.  It would require
to parse all headers in an n² algorithm (for each initial "C struct" header,
check whether a "Perl hash" header exists -- if not, remove the "C struct"
corresponding header).
I don't know if it's worthwhile doing.


> can i help you in some way?

I wonder whether we should really give the list.  It is more
confusing than anything...

The list is at the beginning of nnrpd/post.c:

HEADER Table[] = {
    /*  Name                    CanSet  Type    Size  Value */
    {   "Path",                 true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "From",                 true,   HTreq,  0,    NULL,    NULL, 0 },
    {   "Newsgroups",           true,   HTreq,  0,    NULL,    NULL, 0 },
    {   "Subject",              true,   HTreq,  0,    NULL,    NULL, 0 },
    {   "Control",              true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Supersedes",           true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Followup-To",          true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Date",                 true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Organization",         true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Lines",                true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Sender",               true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Approved",             true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Distribution",         true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Expires",              true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Message-ID",           true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "References",           true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Reply-To",             true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "NNTP-Posting-Host",    false,  HTstd,  0,    NULL,    NULL, 0 },
    {   "Mime-Version",         true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Content-Type",         true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Content-Transfer-Encoding", true, HTstd,  0,    NULL,    NULL, 0 },
    {   "X-Trace",              false,  HTstd,  0,    NULL,    NULL, 0 },
    {   "X-Complaints-To",      false,  HTstd,  0,    NULL,    NULL, 0 },
    {   "NNTP-Posting-Date",    false,  HTstd,  0,    NULL,    NULL, 0 },
    {   "Xref",                 false,  HTstd,  0,    NULL,    NULL, 0 },
    {   "Injector-Info",        false,  HTstd,  0,    NULL,    NULL, 0 },
    {   "Summary",              true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Keywords",             true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Date-Received",        false,  HTobs,  0,    NULL,    NULL, 0 },
    {   "Received",             false,  HTobs,  0,    NULL,    NULL, 0 },
    {   "Posted",               false,  HTobs,  0,    NULL,    NULL, 0 },
    {   "Posting-Version",      false,  HTobs,  0,    NULL,    NULL, 0 },
    {   "Relay-Version",        false,  HTobs,  0,    NULL,    NULL, 0 },
    {   "Cc",                   true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "Bcc",                  true,   HTstd,  0,    NULL,    NULL, 0 },
    {   "To",                   true,   HTstd,  0,    NULL,    NULL, 0 },
};




That's why I was surprised to read that only X-Trace: was not deletable :)

-- 
Julien ÉLIE

« Quand tu auras lu ces lignes, le papyrus s'autodétruira. » (Astérix) 
Technical Details
Message-ID: <gtq927$7fa$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>

Show Full Headers
Complete Article Headers
Message-ID: <gtq927$7fa$1@news.trigofacile.com>
Subject: Re: filter_nnrpd.pl (maybe a bug)
Date: Tue, 5 May 2009 22:52:02 +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>
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: 86
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 1241556871 7658 83.112.31.234 (5 May 2009
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Tue, 5 May 2009 20:54:31 +0000 (UTC)
In-Reply-To: <gtq7ib$qm1$2@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