Newsgroups: news.software.b
Path: utzoo!utstat!geoff
From: geoff@utstat.uucp (Geoff Collyer)
Subject: Re: Can somebody explain the anne.jones file?
Message-ID: <1990Apr9.095023.12965@utstat.uucp>
Organization: Statistics, U. of Toronto
References: <1990Apr6.051900.8956@woodt.uucp>
Distribution: na
Date: Mon, 9 Apr 90 09:50:23 GMT

Robert Sexton:
> The anne.jones file completely mystifies me.  I know it is the netnews censor,

More accurately, anne.jones is the header censor for locally-posted
articles; inews does some censoring of the message body (mostly
invisible characters) itself.

> but How do I use it?  I wish to specify which users are allowed ot post
> outside the machine, but I havent the foggiest how to do it.

You could try inserting some test in the middle of anne.jones which
would cause it to exit prematurely for some users, thus generating
headerless articles, which will be rejected by inews.  A cleaner
solution would be to put the test in inews, possibly after invoking
anne.jones, so that inews can produce a meaningful error report.

However, beware that users who are determined to post can bypass inews
by adding the necessary headers by hand (which isn't all that hard,
especially if you read RFC 1036 first) and invoking inews -p, rnews,
relaynews, 'uux - machine!rnews', 'mail ucbvax!rnews', etc. directly.
I doubt that rejecting postings will work for any but the most
technically naive users.

> Whoever put together the cnews scripts is a twisted, brilliant person.

I suppose this is a backhanded compliment of sorts.  Um, thanks.  :-)

> They are the most complicated things i have seen yet.

Hmmm, perhaps you haven't seen much software yet?  :-)

inews and related scripts are gradually being overhauled and the more
twisted, brilliant bits are being replaced by mundane, obvious C code
(e.g. the incredible tangle in anne.jones to pick up the poster's login
name, which currently weighs in at 24 lines of shell script, including
a 6-line comment to explain what's going on, is turning into the
obvious 3 lines of C).  Where possible, policy will not be cast in C.

The complexity is, I think, the product of attempting to write inews
without writing new C code.  Conceptually, inews is just a simple
front-end filter for relaynews, but in practice some of the error
recovery, header molesting, and routing decisions may just be too
complex to reliably write in the shell or old awk (without giving up
yet more speed, anyway).  (On the other hand, the shell does some parts
of the job quite well; for example, turning options into headers.)
-- 
Geoff Collyer		utzoo!utstat!geoff, geoff@utstat.toronto.edu
