Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ news(5) — Amiga System V Release 4 Version 2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

checknews(1)

compress(1)

inews(1)

postnews(1)

readnews(1)

rn(1)

vnews(1)

getdate(3)

expire(8)

newsbatch(8)

newsmail(8)

relaynews(8)

recnews(8)

rnews(8)

sendnews(8)

uurec(8)

newsinvaders(9.1)

NEWS(5)  —  FILE FORMATS

NAME

news − USENET network news articles, batches, related files

DESCRIPTION

There are two formats of news articles: A and B.  A format is obsolete, but looks like this:

Aarticle-ID
newsgroups
path
date
title
Body of article

A B format article consists of a series of headers and then the body.  A header line is defined (approximately) as a line at the start of the article or immediately following a header line with a capital letter as the first character and a colon immediately following the first word, of alphanumerics and dashes, on the line (a specialisation of RFC 822 format).  Continued headers are as per RFC 822.  Unrecognized headers are ignored.  News is stored in the same format transmitted, see “Standard for the Interchange of USENET Messages” (RFC 1036 nee 850) and “Standard for the Format of ARPA Internet Text Messages” (RFC 822, but note amendments in RFC 1123) for a full description.  The following headers are among those recognized:

From: user@host.domain[.domain ...] ( Full Name)
Newsgroups: news groups
Message-ID: <Unique RFC822 message-id>
Subject: descriptive title
Date: date posted
Expires: expiration date
Reply-To: address for mail replies
References: Message-ID of article this is a follow-up to.
Control: text of a control message

Here is an example of an article:

Path: att!eagle!jerry
From: jerry@eagle.uucp (Jerry Schwarz)
Newsgroups: news.announce
Subject: Usenet Etiquette -- Please Read
Message-ID: <642@eagle.UUCP>
Date: Friday, 19 Nov 82 16:14:55 EST
Followup-To: news.misc
Expires: Saturday, 1 Jan 83 00:00:00 EST
Organization: Bell Labs, Murray Hill
The body of the article comes here, after an empty line.

A news batch consists of zero or more articles, each preceded by a line of the form

#! rnews byte-count

where byte-count is the number of bytes in the following article, where each newline is counted as a single byte, even if it is stored as a CR-LF or some other representation.  Spaces are significant: one before and one after rnews.  News batches are usually transmitted compressed.

Various peculiar optional encapsulations of news batches exist which consist of doing something to the (probably compressed) batch, then prepending a #! goo line to the output, where goo reflects the form of encapsulation; known values of goo include cunbatch (the null encapsulation), and c7unbatch (encode the batch using only seven bits per character). 

The sys file line has four fields, each separated by colons:

system-name/exclusion1, exclusion2...:subscriptions/ distributions: flags:transmission command

A # as the first character in a line denotes a comment.  Empty lines are ignored.  A logical line may be continued to the next physical line by putting a \ at the end of the current physical line.  Spaces are permitted in sys only in comments, transmission command when it really is a command and not a filename, and, for B news compatibility, at the start of a continuation line (after a \ and a newline). 

Of the sys fields, only the system-name need be present.  If a field and all the fields after it are omitted, the colon immediately before that field and all the colons after it may be omitted too.  The optional subfields ( exclusions and distributions) and their leading slashes may be omitted.

The system name is the name of the system being sent to, and is checked against site names in Path: headers to avoid sending an article back to a site that has seen it.  The exclusions are also checked against the Path: header and articles are not sent to system name if they have visited any of the exclusions.

The special system name ME stands for the name of the machine news is running on, as determined from /usr/public/lib/news/whoami. (The ME line, or a line whose system name is explicitly that of the machine news is running on, has a rather different meaning from that of the other sys file lines: its subscriptions subfield identifies the newsgroups that this site subscribes to (i.e. is willing to receive), and its other fields and subfields are ignored.) 

subscriptions is a comma-separated list of newsgroup patterns specifying the newsgroups to be transmitted to the system; each newsgroup from the Newsgroups: header of each article is matched against the pattern list, and if any newsgroup matches the pattern list, the article is transmitted.  The rules for matching a newsgroup against a single pattern are:

•words in a newsgroup or a pattern are delimited by periods;

•words of a pattern and a newsgroup match only if they are identical, except that the word all in a pattern matches any newsgroup word;

•a newsgroup is matched against a pattern word by word, and all words must match for the newsgroup to match that pattern;

•if the pattern has fewer words than the newsgroup, the pattern is implicitly extended to the same number of words by appending .all as many times as necessary;

•if the newsgroup has fewer words than the pattern, the newsgroup does not match the pattern;

•if pattern matches a newsgroup, !pattern mismatches that newsgroup.

A newsgroup matches a pattern list if, and only if, it matches at least one of the patterns and:

•the newsgroup does not mismatch any of the patterns, or

•the longest matched pattern is longer than the longest mismatched pattern (length is measured in number of words, with each explicit occurrence of all counted as slightly less than one word, and does not include the implicit extension of patterns with .all). 

Note that order in the lists is not significant, and that ties are broken in favor of not matching.  An example: comp,comp.sys.sun,!comp.sys matches all the comp groups, except the comp.sys groups but including comp.sys.sun. 

The distributions in the Distribution: header are similarly matched against the distributions subfield, if any.  If no distributions are supplied, Distribution: will be matched against the subscriptions instead.  (The Distribution: header is ignored when receiving news; it is only significant when sending.) 

Note that some older news software reportedly attached magical significance to the distributions “world” and “local”; C News treats them as ordinary distribution names with no special properties (except that “world” is the default distribution of an article if none appears explicitly).  For example, a distributions list like all,!local will not prevent local articles from being sent unless they contain explicit Distribution: local lines.  Note too that the distribution “world” must be permitted (perhaps by the distribution “all”) in order to feed Distribution:-less articles (the common case) to a site. 

The flags are a set of letters describing how the article should be transmitted.  Valid flags include f (interpret transmission command as a file name and write the file name relative to /var/spool/news and size in bytes of each article on the end of it), F (like f but omit the size), I (like F but write Message-ID:s instead of filenames), n (like F but write a Message-ID: after each filename), Ln (only send articles generated within n hops of here; 0 is the default value for n), m (transmit only moderated groups), u (transmit only unmoderated groups).  There are other obsolete ones. 

The transmission command is executed by the shell with the article to be transmitted as the standard input.  The substring ‘ %s’ will be replaced at most once per command with the name of a file containing the article, relative to /var/spool/news.  The default is ‘ uux − −z −r sysname!rnews ’ for a command; the PATH searched includes /usr/public/lib/newsbin/relay, so that the commands described in newsmail(8) are available as alternatives to uux.  If one of the flags has caused this field to be taken as a filename, the default is /var/spool/news/out.going/sysname/togo ; if a filename is given but it does not start with ‘/’, it is assumed to be relative to the /var/spool/news/out.going directory. 

Some examples:

# line indicating what we are willing to receive; note local groups near end
ME:comp,news,sci,rec,misc,soc,talk,can,ont,tor,ut,to
# sample insignificant feed not using batching (for special situations only)
huey:news.config,to.huey/all::uux - -r -gd huey!rnews
# sample of mailing newsgroups to someone (note distribution)
daisy:soc.women,soc.couples/all::mail daisy@duck
# sample small feed using batching
gladstone:comp.protocols.tcp-ip,rec.aviation/all:f:
# sample major batched feed, including assorted regional newsgroups, with
# (unnecessary) explicit file name
dewey:comp,news,sci,rec,misc,soc,talk,can,ont,tor,ut,to.dewey/all:f:dewey/togo
# sample long-haul feed; note no regional groups, exclusion of a local
# distribution, and exclusion of anything that passed through him under
# another name (needed because he puts that form, not just "donald", in
# his Path lines)
donald/donald.angry.duck:comp,news,sci,rec,misc,soc,talk,to.donald/all,!ut:f:
# sample local-postings-only feed direct to major site (gets them out fast)
scrooge:comp,news,sci,rec,misc,soc,talk,to.scrooge/all:Lf:
# sample ihave/sendme link
# NOTE, this is the old ihave/sendme, not related to NNTP in any way.
# Send ihave telling louie what we have -- batcher turns the batch into a
# giant control message and posts it to "to.louie".  (#1)
louie:comp,news,sci,rec,misc,soc,talk,!to/all,!sendme,!ihave:I:louie.ihave/togo
# Send sendme in response to ihave from louie -- again, turned by batcher
# into giant control message posted to "to.louie".  (#3)
louie-send-ids:to.louie/ihave:I:louie.sendme/togo
# Transmit said giant control messages by normal batching.  (#2,#4)
louie-ctl:to.louie/all,!sendme,!ihave:f:louie/togo
# Send articles in response to sendme messages from louie. (#5)
louie-real:to.louie/sendme:f:louie/togo
# Actually the last two could be combined.
# also, since ihave/sendme is slow, send local postings to louie without
# waiting (beware ihave/sendme)
louie-local:comp,news,sci,rec,misc,soc,talk/all,!sendme,!ihave:L:

(The “to.sysname” groups are normal newsgroups used for testing individual news feeds.) 

Somewhere in the sys file, there must be a line for the host system.  This line has no flags or commands.

The active file contains one line per locally-valid news group.  Each line consists of four blank-separated fields: newsgroup name, highest local article number assigned, lowest local article number in use (approximately), and a flag.  Both article-number fields are at least five digits wide.  (Some older news software may expect exactly five digits.)  The current flag values are y (a normal unmoderated group), n (like y but local postings disallowed), m (a normal moderated group), x (a locally-disabled group, no articles will be filed here), and = (followed by the real group under which to file articles in this group; articles are treated exactly as if their Newsgroups: header specified the real group instead of the original one; highest and lowest fields are ignored).  An example:

comp.org.usrgroup 0000000006 00004 y
talk.bizarre 0000296123 292136 n
comp.sys.sun 0000000175 00173 m
list.sun-spots 0000000076 00076 =comp.sys.sun
comp.os.vms 0000000000 00000 x

The history file contains one line for each article received.  Each line consists of three tab-separated fields: a Message-ID:, the arrival time as seconds since midnight, Jan 1, 1970 and the Expires: value (a dash indicates there was none) separated by a tilde, and the list of links to this article.  If an article has been expired or cancelled without being seen first, the list of links and the tab before it are omitted.  An example:

<3451@hcr.UUCP>581905588~-comp.text/1317 comp.sources.wanted/4200
<9383@alice.UUCP>611934511~-

SEE ALSO

checknews(1), compress(1), inews(1), postnews(1), readnews(1), rn(1), vnews(1), getdate(3), expire(8), newsbatch(8), newsmail(8), relaynews(8), recnews(8), rnews(8), sendnews(8), uurec(8), newsinvaders(9.1)
ARPA Internet RFCs 1036, 850, 822, 1123

BUGS

B format articles must not start with A, to distinguish them from A format, which is only a problem if moderators put Approved: first. 
Control: and Newsgroups: are not required to be the first headers, if present. 
People insist on making their whacko local encapsulation schemes (cunbatch, etc.)  rnews’s problem.
One could argue that RFC 822 is less than an ideal base for article format.
The distribution codes ihave and sendme are reserved by the news system for its internal use and should be used only in support of the ihave/sendme protocol. 

Amiga Unix  —  Last change: 26 Aug 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026