🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82439

Re: Injection-Info questions

#82439
From: Julien ÉLIE
Date: Tue, 29 Dec 2009 14:53
44 lines
2686 bytes
Hi Steve,

> I'm in the process of modifying Cleanfeed to correctly interpret the
> Injection-Info header and have a couple of questions.

It case it could be of help, there are Perl regexp here for RFC 5322:
    http://cpansearch.perl.org/src/RJBS/Email-Address-1.889/lib/Email/Address.pm

As for RFC 2231-parameters, maybe we should have a look at other Perl parsers
for that.



my $text           = qr/[^\x0A\x0D]/;
my $quoted_pair    = qr/\\$text/;
my $ctext          = qr/(?>[^()\\]+)/;
my ($ccontent, $comment) = (q{})x2;
for (1 .. $COMMENT_NEST_LEVEL) {
  $ccontent = qr/$ctext|$quoted_pair|$comment/;
  $comment  = qr/\s*\((?:\s*$ccontent)*\s*\)\s*/;
}
my $cfws           = qr/$comment|\s+/;
...

They could be helpful to skip CFWS and similar stuff in Injection-Info:

   injection-info  =  "Injection-Info:" SP [CFWS] path-identity
                      [CFWS] *( ";" [CFWS] parameter ) [CFWS] CRLF


Maybe Cleanfeed (and postfilter? -- and of course INN, as well as all news
readers and news servers) should be checked to ensure that all header fields
are properly parsed.
For instance the Newsgroups: header field:

   newsgroup-list  =  *WSP newsgroup-name
                      *( [FWS] "," [FWS] newsgroup-name ) *WSP

-- 
Julien ÉLIE

« Les amis de la vérité sont ceux qui la cherchent,
  et non ceux qui se vantent de l'avoir trouvée. » (Condorcet) 
Technical Details
Message-ID: <hhd55r$kjq$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!weretis.net!feeder2.news.weretis.net!news.trigofacile.com!not-for-mail
References: <slrnhjcc9b.u40.steve@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <hhd55r$kjq$1@news.trigofacile.com>
Subject: Re: Injection-Info questions
Date: Tue, 29 Dec 2009 15:53:43 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <slrnhjcc9b.u40.steve@news.mixmin.net>
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!weretis.net!feeder2.news.weretis.net!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 44
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="Windows-1252";
 reply-type=original
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 29 Dec 2009 14:53:47 +0000 (UTC)
Injection-Info: news.trigofacile.com;
 posting-host="amontpellier-159-1-14-25.w90-57.abo.wanadoo.fr:90.57.85.25";
 logging-data="21114"; mail-complaints-to="abuse@trigofacile.com"
In-Reply-To: <slrnhjcc9b.u40.steve@news.mixmin.net>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6002.18005
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005