As long as PPP is active, it will be possible to read news online. There are several available programs. One can use the "rtin" or "trn", one can configure "pine", or even use a WWW-browser.
The only thing required in terms of configuration in most cases is to do (usually once and for all in the file ".profile"):
export NNTPSERVER=news.acme.com
To be able to read news while offline, and thus reduce phone bills and give greater flexibility, one must set up a local news-spool of one sort or the other. This requires some configuration, and there will also be a certain amount of disk space involved. After initial setup, things should run more or less by themselves, with only some attention needed from time to time.
The solution described here is based on the news-server Cnews and the NNTP protocol. Cnews was originally targeted towards another sort of configuration, but is flexible enough to handle our situation too. One might also use the new and popular Inn news server, but it might require a bit more in terms of resources. Any way, be careful not to install both; they don't live together easily.
It is crucial that all maintenance of news is done while logged in as user "news", and that all configuration files is placed in "/usr/lib/news". One way of handling this is, while logged in as "root" to write "su news; cd".
The most important files in the configuration are:
Dirk Gently's Holistic Detective Agency
ME:all/all::
sn/acme.com:all,!junk/all:FL:
mkdir /var/spool/news/out.going/acme
Cnews needs a certain degree of daily maintenance, but this can be specified once and for all via the command "crontab -e" issued as user "news". A suggested setup follows; it can be tuned as required:
# maintain incoming and outgoing batches
10,40 * * * * /usr/lib/newsbin/input/newsrun
# expire C-news, once a day
30 0 * * * /usr/lib/newsbin/expire/doexpire
# monitor and report if needed
00 2 * * sat /usr/lib/newsbin/maint/addmissing
40 3 * * * /usr/lib/newsbin/maint/newswatch
50 3 * * * /usr/lib/newsbin/maint/newsdaily
Newsrun moves articles in and out (twice every hour), doexpire
will delete articles as they get old (every night at 00:30), and
the three last commands does various supervisory and error
correcting tasks.
One should also ensure that things are cleaned up when starting the machine. As user root, add the following line to "/etc/rc.d/rc.local":
su news -c /usr/lib/newsbin/maint/newsboot
News may be collected via the program "slurp", picking news from
an NNTP-server. The program can for instance be found at:
ftp://sunsite.unc.edu/pub/Linux/apps/comm/slurp-1.10.tar.Z
Setting up "slurp" is quite simple. The program itself may be copied to til /usr/lib/news. You should also create a /usr/lib/news/slurp.sys that describes which newsgroups that you want to read. A simple example, collecting all linux groups in addition to rec.humor.funny:
news.acme.com:comp.os.linux.*,rec.humor.funny
Note that Slurp uses "*" instead of "all".
Additionally, a file must be created for each news-server, in our case "slurp.news.acme.com". The contents of this file reflects the latest date/time that news have been collected, and will be updated for every news batch. The file must be initialized (initial date may be set as desired):
960101 000000
To fetch articles, user "news" issues the following command (assuming communication via PPP or similar is up):
slurp news.acme.com
The option "-d" gives continuous printout to the screen.
Most ISPs will not allow posting of news by the NNTP IHAVE-procedure, only POST. This requires special handling of news posting. A suitable tool can be collected from:
ftp://ftp.sn.no/user/egilk/postit.tar.gz
Article transfer may then be performed by:
postit news.acme.com acme
To control disposal of articles as they get old, a file "explist" is required. The comments in this example should explain what we want to do:
# hold onto history lines 14 days, nobody gets >120 days
/expired/ x 14 -
/bounds/ x 0-1-120 -
# retain these for 2 months
comp.sources,comp.os.linux.all x 60 -
# noise gets thrown away fast
junk,control x 2 -
# default: 14 days, no archive
all x 14 -
ALT In a small news-spool, one will often not need the newsgroup "control". The traffic is huge compared to the usefulness. The main point is that articles will be canceled, and that groups may be created automatically. To ensure that control messages containing "newgroup" not shall mess up things for us, a file called "newgroupperm" specifies what we will allow:
comp.os.linux tale@uunet.com yv
all any nq
In this example, all proper groups under comp.os.linux will be
created (y), and the user "news" will be notified (v).
Everything else will be silently (q) ignored (n). The last line
is sufficient if you want to create all groups manually.
ALT An alternative to slurp/postit is "suck", that is not using the NNTP NEWNEWS command. This program is simple, although quite improved compared to the earliest versions. Version 2.51 will be replaced by 2.6:
ftp://sunsite.unc.edu/pub/Linux/system/News/suck-2.5.1.tar.gz
ALT A different solution altogether is to install the integrated package "leafnode". This will handle all tasks required for a personal news spool, and is easy to configure. It is available from:
http://www.troll.no/freebies/leafnode.html