🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #50213

Re: Guaranteed-unique path element?

#50213
From: Russ Allbery
Date: Sun, 28 Jan 2001 02:12
50 lines
3273 bytes
Rich Lafferty <rich@bofh.concordia.ca> writes:

> I'm writing a little program which traverses a tradspool, grabs the
> Path: header from all of the messages therein, and generates some
> statistics on from where articles are arriving. I need to normalize the
> local-part of the path such that I can identify it as a local part
> without any context. Son-of-1036 seems to imply that "not-for-mail" is
> reserved for the local-part, but I'm not certain that's the case. Is
> there a value that

This got cut off, but the answer is probably no.  not-for-mail is a
#define in INN, so most people don't change it, but some people do.
You'll find various other servers that do different things; some news
readers put the username in the path tail, for example.

Probably the safest thing to do is to ignore the last entry of the Path
header unless it looks like an IP address or a FQDN.

> The program assumes '!' as path separator, after Son-of-1036; the
> normalized local-part doesn't need to be a legal Path: value, but I'd
> like to find something more graceful than a bunch of punctuation
> characters (combining 1036's restriction on valid path characters with
> Son-of-1036's restriction on valid separator characters).

This area is really annoying.  USEFOR is going to create a bunch of
additional separator characters, presuming that it ever becomes a
standard.  INN basically treats everything not in [A-Za-z0-9._-] as a
separator character if found in the Path: header.

> Related but more complex: I haven't played with CNFS. I assume that
> something designed to traverse the news spool on the filesystem is going
> to break with CNFS; is there a general way to ask INN to report all of
> the Path: headers for all of its articles?

    perl -ne '($a,$b,$_) = split "\t"; print if $_' history \
        | xargs sm | grep -i '^Path: ' > paths

should work.  (sm really needs a flag to tell it to only return the
header.)

> (Or, for this matter, are statistics as to incoming articles' paths --
> beyond one hop! -- already maintained somewhere?)

I've seen various scripts to maintain this as a channel feed.  I don't
remember what contrib/pathinfo does exactly, but it may be worth looking
at.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>
Technical Details
Message-ID: <yl4rykwhjt.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail
References: <slrn976tl7.bkm.rich@bofh.concordia.ca>

Show Full Headers
Complete Article Headers
Message-ID: <yl4rykwhjt.fsf@windlord.stanford.edu>
Subject: Re: Guaranteed-unique path element?
Date: Sun, 28 Jan 2001 02:12:54 +0000
From: Russ Allbery <rra@stanford.edu>
References: <slrn976tl7.bkm.rich@bofh.concordia.ca>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 49
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 980647975 15505 171.64.13.23 (28 Jan 2001 02:12:55 GMT)
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)