Linux Network Administrators Guide
Prev
Chapter 21. C News
Next
21.5. Article Batching
News batches follow a particular format that is the same for B News, C News, and INN. Each article is preceded by a line like this:
#! rnews count
count is the number of bytes in the article. When you use batch compression, the resulting file is compressed as a whole and preceded by another line, indicated by the message to be used for unpacking. The standard compression tool is compress , which is marked by:
#! cunbatch
Sometimes, when the news server sends batches via mail software that removes the eighth bit from all data, a compressed batch may be protected using what is called c7-encoding ; these batches will be marked by c7unbatch .
When a batch is fed to rnews on the remote site, it checks for these markers and processes the batch appropriately. Some sites also use other compression tools, like gzip , and precede their gzipped files with the word zunbatch instead. C News does not recognize nonstandard headers like these; you have to modify the source to support them.
In C News, article batching is performed by /usr/lib/news/batch/sendbatches , which takes a list of articles from the site/togo file and puts them into several newsbatches. It should be executed once per hour, or even more frequently, depending on the volume of traffic. Its operation is controlled by the batchparms file in /var/lib/news . This file describes the maximum batch size allowed for each site, the batching and optional compression program to be used, and the transport for delivering it to the remote site. You may specify batching parameters on a per-site basis, as well as a set of default parameters for sites not explicitly mentioned.
When installing C News, you will most likely find a batchparms file in your distribution that contains a reasonable default entry, so there's a good chance that you won't have to touch the file. Just in case, we describe its format. Each line consists of six fields, separated by spaces or tabs:
site size max batcher muncher transport
- site
- size
- max
- batcher
site is the name of the site to which the entry applies. The togo file for this site must reside in out.going /togo below the news spool. A site name of /default/ denotes the default entry and is to match any site not directly specified with an entry unique to it.
size is the maximum size of article batches created (before compression). For single articles larger than this, C News makes an exception and puts each in a single batch by itself.
max is the maximum number of batches created and scheduled for transfer before batching stalls for this particular site. This is useful in case the remote site should be down for a long time, because it prevents C News from cluttering your UUCP spool directories with zillions of newsbatches.
C News determines the number of queued batches using the queuelen script in /usr/lib/news/ . If you've installed C News in a prepackaged format, the script should not need any editing, but if you choose to use a different flavor of spool directories, for example, Taylor UUCP, you might have to write your own. If you don't care about the number of spool files (because you're the only person using your computer and you don't write articles by the megabyte), you may replace the script's contents by a simple exit 0 statement.
The batcher field contains the command used for producing a batch from the list
* License

