1. Since version 1.9, leafnode uses GNU autoconf to determine what
   machines it runs on. Type
	sh ./configure
   to create an appropriate Makefile and config.h .

2. Type
	make
   There should be no errors.

3. Create a "news" user if you don't have one.

4. Type
	make install

5. If you are updating leafnode from a version before 1.6 (including
   1.6alpha), "make update". This will call the update.sh shell script
   provided with leafnode. Your groupinfo file will be reformatted and
   some other files will be moved around. In case something goes wrong,
   you will find your old groupinfo file in
   /var/spool/news/leaf.node/groupinfo.old. If everything works out
   correctly, you can delete this file (it is not needed any more).

6. Edit $(LIBDIR)/config. For documentation, see config.example and
   leafnode(8). It is absolutely necessary to change the "server"
   parameter to point it to your upstream news server (generally
   the one of your IP provider). Make sure $NNTPSERVER or
   /etc/nntpserver points to your own host so clients will talk to
   leafnode rather than try to go to the upstream server.
   If you want to use filtering of the incoming spool, see "FILTER FILE"
   below.

7. Set up a cron job (as user "news") to run texpire every night or
   maybe every week.  Here is my crontab line, which runs nightly:

0 4 * * * /usr/local/sbin/texpire

   I did "crontab -u news -e" as root to edit the crontab file, and added
   this line.  Substituting "1" for the third "*", thus:

0 4 * * 1 /usr/local/sbin/texpire

   tells cron to run texpire at 4am Monday morning.

8. Make sure fetch is run at the appropriate time.  If you have a
   full-time link, run it out of cron (as "news" again), if not, run it
   when your connection to the net is established.  If it is run as root,
   it will change user to "news". If you use PPP, you can run fetch from
   /etc/ppp/ip-up.

9. Edit /etc/inetd.conf so that $(BINDIR)/leafnode is executed for incoming
   NNTP connections.  Here is my inetd.conf line:

nntp    stream  tcp     nowait  news    /usr/sbin/tcpd /usr/local/sbin/leafnode

   This starts leafnode for all connections on the nntp port, subject to
   /etc/hosts/allow and /etc/hosts.deny screening.  If you don't have
   /usr/sbin/tcpd you might use this line instead:

nntp    stream  tcp     nowait  news    /usr/local/sbin/leafnode

   Using leafnode without tcpd is strongly discouraged since it opens up your
   news server to abuse.

   After these changes, force inetd to read the changed configuration file
   by sending it the HANGUP signal. To achieve this, issue the following
   command (as root):

kill -HUP `cat /var/run/inetd.pid`

10.If you have tcpd installed, write the following into /etc/hosts.deny

leafnode: ALL EXCEPT LOCAL

   to protect your news server from abuse. If you want to make leafnode
   accessible to additional IP numbers/domains, add them in /etc/hosts.allow
   in the format described above.

11.Run fetch.  The first run will take some time since fetch reads a list
   of all newsgroups from your upstream server.  With an 28.8 modem, it
   can take as long as 60 minutes (depending on how many newsgroups your
   provider offers). To see fetch working, run it with -vvv. If you
   update leafnode from a version previous to 1.6, the format of the
   groupinfo file has changed. You should therefore run fetch with the
   parameter -f.

12.Read news using an NNTP client (with $NNTPSERVER or /etc/nntpserver
   pointing to your own host). Select the groups you want to read in
   the future. You will find them empty except a default article.
   Reading this article is necessary with some newsreaders to select
   the groups for further fetching.

   After this, you should have empty files in
   /var/spool/news/interesting.groups/ for every group you want to read.

13.Run fetch again. This run should pick up all the groups you want
   to read.

Cornelius Krasel <krasel@wpxx02.toxi.uni-wuerzburg.de>

-------------------------------------------------------------

                         THE FILTER FILE

From version 1.8, leafnode supports filtering of incoming headers for
arbitrary regular expressions. This feature is by default deactivated.
To activate it, you must first write a file which contains the regular
expressions to be filtered (the "filter file") and in addition point
leafnode to this file by entering a line of the format

filterfile = /path/to/your/filterfile

into your $(LIBDIR)/config.
The format of the filterfile is as follows:
1) One regular expression per line
2) Comments start with # at the beginning of a line
3) Empty lines are allowed

Here is a short example which will kill everything posted to alt.flame:

^Newsgroups:.*[, ]alt.flame$
^Newsgroups:.*[, ]alt.flame,

You cannot use

^Newsgroups:.*alt.flame

because this will also kill postings to alt.flame.nice or comp.alt.flame.

You can find more information about regular expressions in the man page
for grep(1). Theoretically, there should be a separate man page about
regular expressions, but it is absent from most of the systems I have
come across. There is also a whole book about regular expressions
published by O'Reilly.
