C News should be available in a prepackaged format for any modern Linux distribution, so installation will be easy. If not, or if you want to install from the original source distribution, then of course you can. No matter how you install it, you will need to edit the C News configuration files. Their formats are described in the following list:
The sys file controls which newsgroups your site receives and forwards. We discuss it in detail in the following section.
Not usually edited by the administration; contains directions for handling articles in each newsgroup the site handles.
This file should contain your organization's name, for example, “Virtual Brewery, Inc.” On your home machine, enter “private site,” or anything else you like. Most people will not consider your site properly configured if you haven't customized this file.
This file is a list of all newsgroups, with a one-line description of each one's purpose. These descriptions are frequently used by your newsreader when displaying the list of all groups to which you are subscribed.
Your site's mail name, e.g., vbrew.com.
Your site's name for news purposes. Quite often, the UUCP site name is used, e.g., vbrew.
You should probably edit this file to reflect your preferred expiration times for special newsgroups. Disk space may play an important role in your choices.
To create an initial hierarchy of newsgroups, obtain active and newsgroups files from the site that feeds you. Install them in /etc/news, making sure they are owned by news and have a mode of 644, using the chmod command. Remove all to.* groups from the active file, and add to.my-site, to.feed-site, junk, and control. The to.* groups are normally used for exchanging ihave/sendme messages, but you should list them regardless of whether you plan to use ihave/sendme or not. Next, replace all article numbers in the second and third field of active using the following commands:
# cp active active.old # sed 's/ [0-9]* [0-9]* / 0000000000 00001 /' active.old > active # rm active.old
The second command invokes the sed stream editor. This invocation replaces two strings of digits with a string of zeroes and the string 000001, respectively.
Finally, create the news spool directory and the subdirectories used for incoming and outgoing news:
# cd /var/spool # mkdir news news/in.coming news/out.going news/out.master # chown -R news.news news # chmod -R 755 news
If you're using precompiled newsreaders sourced from a different distribution to the C News server you have running, you may find that some expect the news spool in /usr/spool/news rather than /var/spool/news. If your newsreader doesn't seem to find any articles, create a symbolic link from /usr/spool/news to /var/spool/news like this:
# ln -sf /usr/spool/news /var/spool/news
Now you are ready to receive news. Note that you don't have to create the individual newsgroup spool directories. C News automatically creates spool directories for any newsgroup it receives an article for, if one doesn't already exist.
In particular, this happens to all groups to which an article has been cross-posted. So, after a while, you will find your news spool cluttered with directories for newsgroups you have never subscribed to, like alt.lang.teco. You may prevent this by either removing all unwanted groups from active, or by regularly running a shell script that removes all empty directories below /var/spool/news (except out.going and in.coming, of course).
C News needs a user to send error messages and status reports to. By default, this is usenet. If you use the default, you have to set up an alias for it that forwards all of its mail to one or more responsible person. You may also override this behavior by setting the environment variable NEWSMASTER to the appropriate name. You have to do so in news's crontab file, as well as every time you invoke an administrative tool manually, so installing an alias is probably easier. Mail aliases are described in Chapter 18, and Chapter 19.
While you're hacking /etc/passwd, make sure that every user has her real name in the pw_gecos field of the password file (this is the fourth field). It is a question of Usenet netiquette that the sender's real name appears in the From: field of the article. Of course, you will want to do so anyway when you use mail.
You can obtain the C News source distribution from its home site at ftp.cs.toronto.edu /pub/c-news/c-news.tar.Z