RNEWS(8)

NAME
rnews, cunbatch - accept and spool news input
newsspool, newsrun, c7decode - news input spooler and processing
newsrunning - control news-processing daemon

SYNOPSIS
rnews
cunbatch
/usr/lib/newsbin/input/newsspool [ -g grade ] [ -i ] [ file ... ]
/usr/lib/newsbin/input/newsrun [ grades ]
/usr/lib/newsbin/input/c7decode
/usr/lib/newsbin/input/newsrunning [on|off]

DESCRIPTION
Rnews accepts news from standard input and spools it up for processing, space permitting. If space is persistently too short, rnews looks for the file /usr/lib/news/rnews.stall; if it is present, rnews waits patiently for more space to appear, while if it is absent, rnews discards the news and reports this.

Cunbatch is a historical synonym for rnews; there is no difference in what they do.

Newsspool is the actual spooling program. It copies the input file(s) (standard input default) to a file in the input-spooling directory /usr/spool/news/in.coming, stripping off any `#! cunbatch' or `#! c7unbatch' header as it does so. The filename is based on the current time, plus a suffix classifying the file by type (compressed, c7encoded, or plain text), plus a possible prefix denoting the one-digit numeric grade (if the -g option is given; rnews does not use this option). If invoked with the -i option, when finished newsspool attempts to start newsrun to process the new news immediately. Rnews invokes it this way if and only if the file /usr/lib/news/rnews.immed exists.

Newsrun should be run periodically (e.g. by cron(8)) to process spooled news. Newsrunning can be used to turn newsrun's processing off and on if it is desired to avoid major news processing during certain hours. `newsrunning off' instructs any currently-running newsrun to stop as soon as possible, and prevents later ones from running. (This is a slight oversimplification; see the discussion of grades below.) `newsrunning on' removes the inhibition (but does not actually start a new newsrun). Without an argument, newsrunning reports the current status: ``off'' or ``on''.

Newsrun checks for the stop file that newsrunning off creates, verifies that there is enough disk space for processing, and then starts processing spooled news. News is processed in order by grade: if the name of the spooled file starts with a digit followed by a period, the digit is the file's grade. Files without a grade are considered to have a grade just after grade 9. Lower-numbered grades are processed first, with processing within a grade in chronological order.

If newsrun is invoked with a grades argument, that specifies the grades to be processed. A grades argument can be a single grade (`1'), a list (`123'), or a range (`1-5'). In the absence of the argument, newsrun's default is all grades if there is no stop file present, and just grade 0 if there is a stop file. If a stop file appears during processing, newsrun will stop processing all but grade 0 and will exit when there is no grade-0 news left.

Each batch is run through c7decode (if necessary), decompressed (if necessary), and then fed to relaynews. (Files that lack a classification suffix, typically because they arrived by some means other than newsspool, are tried first as compressed and then as plain text.) If relaynews fails, newsrun attempts to save the spooled batch in the bad subdirectory for human inspection.

C7decode passes standard input to standard output, decoding a complex and bizarre encoding of 8-bit data as printable ASCII characters.

FILES
(All in /usr/spool/news/in.coming)

000000000	(etc.) unclassified ungraded spooled news
000000000.Z	ungraded compressed spooled news
000000000.t	ungraded plain-text spooled news
000000000.7	ungraded compressed c7encoded spooled news
1.000000000.Z	grade 1 compressed spooled news, etc.
stop	newsrun disable file
bad	directory for failed news

SEE ALSO
compress(1), newsbatch(8), newsmail(8), relaynews(8)

DIAGNOSTICS
Complaints are mailed to usenet if something goes wrong.

HISTORY
Part of C News. Written at University of Toronto by Henry Spencer.

BUGS
C7decode should be part of the underlying transport mechanism. It hasn't been tested very well in the C News environment. Bdecode (see newsmail(8)) is probably better for most uses.

Relaynews is a bit too enthusiastic about declaring batches bad, so things may end up in bad for no terribly good reason. Actually, it's rare for the contents of bad to be very interesting.

The grading mechanism relies slightly on collating sequence, and in particular on `.' collating before the digits.