leafnode(8) UNIX System V (21 Nov 1998) leafnode(8)
NAME
leafnode - NNTP server for small (dialup) sites
SYNOPSIS
leafnode
DESCRIPTION
Leafnode is a USENET package intended for small sites, where
there are few users and little disk space, but where a large
number of groups is desired.
The design of leafnode is intended to self-repair after
problems, and to require no manual maintenance.
The leafnode program itself is the NNTP server. It is run
from /etc/inetd.conf when someone wants to read news. The
other parts of the package, fetch and texpire, are
responsible for fetching new news from another server, and
for deleting old news.
ACCESS CONTROL
No authentication or access control is supported. This is a
deliberate omission: Implementing this is a job which should
not be redone for each and every service.
I recommend that either firewalling or tcpd be used for
access control.
FILES
All these files and directories must be writable by user
"news".
/usr/lib/leafnode/config contains the configuration
parameters for leafnode. See CONFIGURATION below.
/var/spool/news contains the news articles; e.g.
/var/spool/news/alt/fan/agulbra contains the articles in the
alt.fan.agulbra group. Each directory contains articles in
numbered files (decimal numbers, monotonically increasing),
and a special file called .overview which contains the
"Subject", "From", "Date", "Message-ID", "References",
"Bytes" and "Lines" headers for each article in the group.
Several subdirectories are special:
/var/spool/news/leaf.node contains the files that leafnode
creates during operation, for example the groupinfo file
which contains information about each USENET newsgroup. This
Page 1 (printed 3/1/99)
leafnode(8) UNIX System V (21 Nov 1998) leafnode(8)
file is built by fetch (8). You can force a complete rebuild
of the groupinfo file by calling fetch with the parameter -f
(see fetch (8)).
/var/spool/news/out.going contains local postings that
fetch(8) is to pass to the upstream NNTP server.
/var/spool/news/failed.postings contains local postings that
the upstream server rejected. fetch(8) will create files in
this directory, but none of the leafnode programs will
delete anything in it.
/var/spool/news/message.id contains hard links to each
message; this is used in place of the dbz database typically
used by bigger servers. (A directory such as this is
probably more efficient for the small servers leafnode is
designed for but scales very badly.)
/var/spool/news/interesting.groups contains one file for
each group an NNTP client has asked to read. leafnode will
touch the the relevant file when a LISTGROUP, XOVER, XHDR,
STAT, HEAD, BODY or ARTICLE command is issued immediately
after a GROUP command is issued, and fetch(8) will retrieve
all new articles in all groups whose files have been either
- touched during the past two days, or
- touched more than once, and at least once within the
past week.
/etc/inetd.conf contains the line which starts leafnode. It
is strongly recommended to start leafnode as user news.
CONFIGURATION
All configuration is done using the file
/usr/lib/leafnode/config. There is no GUI configuration tool
yet.
The file has a rather standard Unix format: one line per
argument, comments are introduced by a hash mark (#) and
last until the end of the line. Below are examples on how
the various parameters are specified.
MANDATORY PARAMETERS
server = news02.bigprovider.com
"server" is used by fetch (8) to select what NNTP
server to retrieve news from and to post your articles
to (the primary news server). You need read and post
access to it. In the example above,
news02.bigprovider.com is the primary news server.
Page 2 (printed 3/1/99)
leafnode(8) UNIX System V (21 Nov 1998) leafnode(8)
expire = 5
"expire" is the number of days a thread should be kept
around. In the example, five days after the thread has
last been read, it is deleted by texpire (8).
SERVER-SPECIFIC OPTIONAL PARAMETERS
supplement = sex.and.warez.com
You can specify supplementary news servers, and
leafnode will try to read news from them in addition to
the primary server. It is possible to define more than
one supplementary server. If the supplementary server
allows posting, then your articles will also be posted
through it.
username = myname
If any of your news servers requires authentification,
you can enter your username on that server here. This
field may occur multiple times, once after each server
definition.
password = mypassword
If any of your news servers requires authentification,
you can enter your password on that server here. This
field may occur multiple times, once after each server
definition. Since the password is available in clear
text, it is recommended that you set the rights on the
config file as restrictive as possible, otherwise other
users of your computer will be able to get your
password(s) from that file.
timeout = 30
By default, leafnode tries to connect for 10 seconds to
a server and then gives up. If you have a slow server,
you can try for a longer time by setting the timeout
higher (in this example, 30 seconds). The timeout can
be tuned individually for each server.
nodesc = 1
Some servers do not deliver news groups descriptions
correctly because they cannot parse the LIST NEWSGROUPS
command. In that case, put this line after the
"server"/"supplement" line.
port = 8000
By default, leafnode tries to connect to its upstream
news servers on the NNTP port (119). If your servers
run on a different port, you can specify those here.
This field may occur multiple times, once after each
server definition.
GENERAL OPTIONAL PARAMETERS
Page 3 (printed 3/1/99)
leafnode(8) UNIX System V (21 Nov 1998) leafnode(8)
hostname = host.domain.country
By default, Leafnode tries to generate the message ID
of outgoing messages from the name of your computer.
However, some upstream servers demand message IDs of a
certain type. In this case, you can override the name
of your computer by setting "hostname" to a sensible
value. The use of "hostname" to create fancy message
IDs is possible, but strongly discouraged.
create_all_links = 1
Normally, fetch will store articles only in the
newsgroups which you consider interesting. If you set
"create_all_links", fetch will create hardlinks for all
newsgroups which it can find in the Newsgroups: header.
This may be of interest if you want to apply a score-
or killfile to the Xref: line.
maxfetch = 1000
"maxfetch" specifies the maximum number of articles
fetch (8) should fetch from the upstream server in each
group. Its use is not advised, because if you use it
you will not see all the traffic in a group. By default
there is no limit.
initialfetch = 1
"initialfetch" defines how many articles from a newly
subscribed group should be fetched. The default is to
fetch all old articles, which can get quite time-
consuming when subscribing to a very busy group. This
is equivalent to setting initialfetch to zero. If you
want to get no old articles when subscribing to a new
group, you should set initialfetch to one, as in the
example above.
groupexpire very.crowded.group = 1
groupexpire very.crowded.hierarchy.* = 1
"groupexpire" makes it possible to adjust expiry times
for individual groups. Expiry times are given in days.
This value is used by texpire (8). You can specify as
many groupexpire lines as you like. It is possible to
specify glob (7)-like wildcard expressions.
maxage = 10
If an article turns up on your upstream news server
which is older than "maxage" days it will not been
fetched even if you don't have it yet. This is useful
if your upstream server gets occasional "hiccups". The
default is set to 10. If you want to switch this
feature off, set maxage to some very large value, such
Page 4 (printed 3/1/99)
leafnode(8) UNIX System V (21 Nov 1998) leafnode(8)
as 100000 (this is equivalent to roughly 270 years).
maxlines = 2000
If you want to avoid receiving very large articles, you
may set the "maxlines" parameter to the maximal number
of lines an article should have. By default, this
feature is switched off.
minlines = 2
Sometimes newsgroups are spammed with empty postings.
To reject these postings, you can set the "minlines"
parameter. Setting minlines to a value larger 4 is
probably not a good idea since you will also start to
kill "real" postings then. By default, this feature is
switched off.
maxbytes = 100000
If you want to avoid receiving very large articles,
instead of using the "maxlines" parameter you can also
use the "maxbytes" parameter. By default, this feature
is switched off.
maxcrosspost = 5
If you want to combat spam, you can filter out all
postings that are posted to more than a certain number
of newsgroups. The number is defined by setting
"maxcrosspost". Setting this parameter to very low
values is probably a bad idea. This feature is switched
off by default.
filterfile = /usr/lib/leafnode/filters
Leafnode can filter the input headers for arbitrary
regular expressions. These are stored in a file
designated "filterfile". The format of "filterfile" is
very simple, one regular expression per line. If one of
the regular expressions fits to a header to be
downloaded, the body of that article will be rejected.
This feature is switched off by default.
timeout_short = 2
By default, a group that has been accidentally touched
is being fetched for two days. You can change this time
by changing timeout_short.
timeout_long = 7
By default, a group that has not been read at all is
being fetched for seven days before being unsubscribed.
This interval can be changed by setting timeout_long to
a different value.
timeout_active = 90
By default, active files from the upstream servers are
Page 5 (printed 3/1/99)
leafnode(8) UNIX System V (21 Nov 1998) leafnode(8)
re-read every 90 days. This interval can be changed by
setting timeout_active to a different value. Be aware
that reading an active file transfers about one MB of
information if the server that you are using carries a
reasonable number of groups (i.e. around 20000).
delaybody = 1
With this option set, fetch (8) fetches only the
headers of an article for visual inspection. Only when
the headers have been read, the bodies of the articles
will be retrieved the next time fetch (8) is called.
This can save a huge amount of download time and disk
space.
debugmode = 1
With this option set, fetch (8), texpire (8) and
leafnode (8) will start to log lots of debugging output
via syslog (8) to news.debug. Use it for tracking down
problems with your feed.
PROTOCOL
Here are the NNTP commands supported by this server.
ARTICLE
Return the headers and body text of an article.
Leafnode supports this imperfectly; the message-id and
article number of the article may not be reported in
the reply line. This does not affect any tested NNTP
clients.
BODY Return the body text of an article. See ARTICLE.
GROUP
Sets the current USENET group and article pointer, and
returns the status information about this group.
HEAD Return the headers of an article. See ARTICLE.
HELP Accepted but I'm afraid it is not very helpful.
IHAVE
Known but rejected. See fetch(8).
LAST Moves the article pointer back by 1.
LIST Lists the available USENET groups.
LIST OVERVIEW.FMT
List some extensions.
LISTGROUP
Page 6 (printed 3/1/99)
leafnode(8) UNIX System V (21 Nov 1998) leafnode(8)
Lists the articles present in the current group, or the
argument group if an argument is present.
MODE Accepted and blithely ignored.
NEWGROUPS
Lists newsgroups which have been newly created.
NEWNEWS
Accepted but the reply is always empty. This command
does not make sense for this server.
NEXT Moves the article pointer forward by 1.
POST Post a new article. Only scant syntax checking is
performed. The article is sent to the upstream NNTP
server by fetch(8).
QUIT Quit reading news.
SLAVE
Accepted but ignored.
STAT Return the availability of an article. See ARTICLE.
XHDR Accepted, but supported only for the "Subject", "From",
"Date", "Message-ID", "References", "Bytes" and "Lines"
headers.
XOVER
Returns the "Subject", "From", "Date", "Message-ID",
"References", "Bytes" and "Lines" headers for the
indicated article(s).
The rest of the commands given in the NNTP RFC or added in
other servers are left out in order to keep the server
simple and bug-free.
BUGS
None known.
AUTHOR
Written by Arnt Gulbrandsen <agulbra@troll.no> and copyright
1995 Troll Tech AS, Postboks 6133 Etterstad, 0602 Oslo,
Norway, fax +47 22646949.
Modified by Cornelius Krasel <krasel@wpxx02.toxi.uni-
wuerzburg.de>, Randolf Skerka <Randolf.Skerka@gmx.de> and
Markus Enzenberger <enz@cip.physik.uni-muenchen.de>.
Page 7 (printed 3/1/99)
leafnode(8) UNIX System V (21 Nov 1998) leafnode(8)
Copyright of the modifications 1997-1999.
The initial development of leafnode has been paid for by
Uninett AS (http://www.uninett.no/).
SEE ALSO
tcpd(8), hosts.allow(5), fetch(8), texpire(8),
checkgroups(8), glob(7), RFC 977
Page 8 (printed 3/1/99)