Manpages

NAME

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

SYNOPSIS

rnews
cunbatch
/usr/lib/news/input/newsspool
[ −g grade ] [ file ... ]
/usr/lib/news/input/newsrun
[ −s suffixletter ] [ grades ]
/usr/lib/news/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 /var/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 /var/spool/news/in.coming, stripping off any ’#! cunbatch’ header as it does so. The filename is based on the current time, plus a suffix classifying the file by type (compressed 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).

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.

If newsrun is run with a −s option, that restricts processing to files that end with .suffixletter only. For example, −s t would restrict processing to files classified as text only (i.e., no processing of compressed files or unclassified files).

Each batch is 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.

FILES

(All in /var/spool/news/in.coming)

000000000

(etc.) unclassified ungraded spooled news

000000000.Zungraded compressed spooled news
000000000.tungraded plain-text spooled news
1.000000000.Zgrade 1 compressed spooled news, etc.

stop

newsrun disable file

bad

directory for failed news

SEE ALSO

compress(1), newsbatch(8CN), newsmail(8CN), relaynews(8CN)

DIAGNOSTICS

Complaints are mailed via report if something goes wrong.

HISTORY

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

BUGS

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.