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/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.
(All in /var/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. stopnewsrun disable file baddirectory for failed news
The grading mechanism relies slightly on collating sequence, and in particular on `.' collating before the digits.