Articles
Up: No Title Previous: How Does Usenet
One of the most popular software packages for Netnews is C News. It was designed for sites that carry news over UUCP links. This chapter will discuss the central concepts of C News, and the basic installation and maintenance tasks.
C News stores its configuration files in /usr/lib/news , and most of its binaries in the /usr/lib/news/bin directory. Articles are kept below /var/spool/news . You should make sure virtually all files in these directories are owned by user news, group news. Most problems arise from files being inaccessible to C News. Make it a rule for you to become user news using su before you touch anything in there. The only exceptions is setnewsids, which is used to set the real user id of some news programs. It must be owned by root and must have the setuid bit set.
In the following, we describe all C News configuration files in detail, and show you what you have to do to keep your site running.
Articles may be fed to C News in several ways. When a local user posts an article, the newsreader usually hands it to the inews command, which completes the header information. News from remote sites, be it a single article or a whole batch, is given to the rnews command, which stores it in the /var/spool/news in.coming directory, from where it will be picked up at a later time by newsrun. With any of these two techniques, however, the article will eventually be handed to the relaynews command.
For each article, the relaynews command first checks if the article has already been seen at the local site by looking up the message id in the history file. Duplicate articles will be dropped. Then, relaynews looks at the Newsgroups: header line to find out if the local site requests articles from any of these groups. If it does, and the newsgroup is listed in the active file, relaynews tries to store the article in the corresponding directory in the news spool area. If this directory does not exist, it is created. The article's message id will then be logged to the history file. Otherwise, relaynews drops the article.
If relaynews fails to store an incoming article because a group it has been posted to is not listed in your active file, the article will be moved to the junk group. relaynews will also check for stale or misdated articles and reject them. Incoming batches that fail for any other reason are moved to /var/spool/news /in.coming/bad, and an error message is logged.
After this, the article will be relayed to all other sites that request news from these groups, using the transport specified for each particular site. To make sure it isn't sent to a site that already has seen it, each destination site is checked against the article's Path: header field, which contains the list of sites the article has traversed so far, written in bang path style. Only if the destination site's name does not appear in this list will the article be sent to it.
C News is commonly used to relay news between UUCP sites, altough it is also possible to use it in a NNTP environment. To deliver news to a remote UUCP site --- either single articles or whole batches --- uux is used to execute the rnews command on the remote site, and feed the article or batch to it on standard input.
When batching is enabled for a given site, C News does not send any incoming article immediately, but appends its path name to a file, usually out.going/site/togo. Periodically, a batcher program is executed from a crontab entry, which puts the articles in one or more files, optionally compresses them, and sends them to rnews at the remote site.
Figure #cnewsfigflow#62> shows the news flow through relaynews. Articles may be relayed to the local site (denoted by ME), to some site named ponderosa via email, and a site named moria, for which batching is enabled.
[htbp]
figures/flow.epsf
(318,230)(0,-10) (290,28)(290,50)(273,50) (273,28)(290,28) (276,50)(276,53)(293,53) (293,31)(290,31) (25,28)(25,50)(8,50) (8,28)(25,28) (11,50)(11,53)(28,53) (28,31)(25,31) (115,28)(115,50)(98,50) (98,28)(115,28) (101,50)(101,53)(118,53) (118,31)(115,31) (100,148)(100,170)(83,170) (83,148)(100,148) (86,170)(86,173)(103,173) (103,151)(100,151) (215,178)(215,200)(198,200) (198,178)(215,178) (201,200)(201,203)(218,203) (218,181)(215,181) (178,113)(178,98) (176.000,106.000)(178.000,98.000)(180.000,106.000) (213,83)(213,98)(143,98) (143,83)(213,83) (318,83)(318,98)(248,98) (248,83)(318,83) (98,83)(98,98)(28,98) (28,83)(98,83) (63,83)(63,68) (61.000,76.000)(63.000,68.000)(65.000,76.000) (16.000,61.000)(18.000,53.000)(20.000,61.000) (18,53)(18,68)(108,68)(108,53) (106.000,61.000)(108.000,53.000)(110.000,61.000) (178,83)(178,48) (176.000,56.000)(178.000,48.000)(180.000,56.000) (283,83)(283,53) (281.000,61.000)(283.000,53.000)(285.000,61.000) (148,48)(218,48)(208,33) (138,33)(148,48) (61.000,106.000)(63.000,98.000)(65.000,106.000) (63,98)(63,113)(283,113)(283,98) (281.000,106.000)(283.000,98.000)(285.000,106.000) (208,148)(208,113) (206.000,121.000)(208.000,113.000)(210.000,121.000) (111.000,160.000)(103.000,158.000)(111.000,156.000) (103,158)(173,158) (165.000,156.000)(173.000,158.000)(165.000,160.000) (208,178)(208,163) (206.000,171.000)(208.000,163.000)(210.000,171.000) (178,163)(248,163)(238,148) (168,148)(178,163) (63,88)(0,0)[b]1012.0ttME (178,88)(0,0)[b]1012.0ttponderosa (283,88)(0,0)[b]1012.0ttmoria (178,38)(0,0)[b]1012.0ttmail (18,13)(0,0)[b]10