Man de Leafnode

 

leafnode(8)                                           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,  fetchnews  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/groupinfo contains the information about
       each  USENET  group.   In  case  of harm, it is rebuilt by
       fetchnews(8).

       /usr/lib/leafnode/news-server-name contains  the  informa-
       tion  about  every  USENET  group on each news server.  In
       case of harm, it is rebuilt by fetchnews(8).

       /usr/lib/leafnode/news-server-name.active is an empty file
       created  when  fetchnews(8)  get  information  about every
       USENET group on each news server.

       /usr/lib/leafnode/config contains the configuration param-
       eters 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 arti-
       cles 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/out.going  contains  local  postings  that
       fetchnews(8) is to pass to the upstream NNTP server.

       /var/spool/news/failed.postings  contains  local  postings
       that the upstream server rejected.  fetchnews(8) will cre-
       ate files in this directory, but none of the leafnode pro-
       grams 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 typi-
       cally 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   0-byte
       file  for  each  group  an  NNTP client has asked to read.
       leafnode will touch the the relevant  file  when  a  LIST-
       GROUP, XOVER, XHDR, STAT, HEAD, BODY or ARTICLE command is
       issued immediately after a GROUP command  is  issued,  and
       fetchnews(8)  will retrieve all new articles in all groups
       whose files have been either

              - touched during the past timeout_short  (see  CON-
              FIGURATION below) days, or

              -  touched more than once, and at least once within
              the past  timeout_long  (see  CONFIGURATION  below)
              days.

       /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/leafn-
       ode/config.  There is no GUI configuration tool yet.

       The file is in the common UNIX format: One line per  argu-
       ment,  white space allowed, # starts a comment which lasts
       until the end of the  line.   Here  is  an  example  which
       demonstrates all the bells and whistles:

            server=news02.bigprovider.com
            server=newspost.otherprovider.ne.jp
            port=128
            username=username
            password=password
            newsgroups=otherprovider
            newsgroups=fj.*
            server=nntp.throught.ssh
            viahost=localhost
            port=1234
            preconnect  =  su  ssh-local-user  -c  "ssh  -f -C -L
            1234:nntp.throught.ssh:119  -l  ssh-remote-user  ssh-
            server sleep 20 > /dev/null"
            supplement=sex.and.warez.com
            # avoidances to fetch articles
            timeout_short=2    #  some users read newsgroups only
            once unfortunately.
            timeout_long=21   # some news groups don't have  many
            article, so keep it long.
            timeout_active=14  #  each  14  day,  check new news-
            groups.
            expire=7               # don't use much space.
            groupexpire=local.* 21 # preserve local news.
            groupexpire=*linux* 3  # don't use much space.
            maxfetch=1000          # again, don't use much space.
            initialfetch=3000      # again, don't use much space.
            maxold=10              # again, don't use much space.
            maxlines=1000          # again, don't use much space.
            maxgroups=5            # hate too much cross-posting.

       "server"  is  used  by  fetchnews(8)  to  select what NNTP
       server to retrieve news from.   You  can  specify  several
       servers.   And  you  can add and decrease servers.  But at
       least one "server" is required.

       "port" is used by fetchnews(8) to choose a port number  to
       connect to the NNTP server.

       "username"  and  "password"  are  used  by fetchnews(8) to
       choose a user name and password to be  authorized  a  NNTP
       connection by the NNTP server.

       "newsgroups"  entries  are  used by fetchnews(8) to choose
       news groups which are feeded by the  NNTP  server.   If  a
       system  has  fnmatch(), a string is compared by it, so you
       can use shell-styled globbing rules like "*linux*".   Oth-
       erwise,  it  is  compared by strcmp() or strncmp(), so you
       can use only one asterisk at the  end  of  a  string  like
       "fj.*".

       "viahost" is used by fetchnews(8) to choose a host to con-
       nect to the NNTP server.  It is useful to use ssh  forwad-
       ing ability.

       "preconnect"  is  executed by fetchnews(8) before making a
       connection to the NNTP server.  It is used for  using  ssh
       forwading  ability.   Note:  you shouldn't break a line in
       the string.  You have to write as same as what you want to
       execute.

       "supplement"  is  old  leafnode's keyword.  On this leafn-
       ode+, it is same as "server" so that  use  "server"  entry
       instead of "supplement."

       "timeout_short"  is  a  number  of days.  Newsgroups which
       have not been read, or have been read  only  once,  during
       the  timeout  period  are  marked  as  uninteresting.  The
       default value is 2 days.

       "timeout_long" is also  a  number  of  days.    Newsgroups
       which  have not been read at all during the timeout period
       are marked as uninteresting. The default value is 7  days.

       "timeout_active"  is  again  a number of days.  The active
       database of each upstream server  is  checked  after  this
       number of days. The default value is 7 days.

       "expire"  is  the  number  of days a thread should be kept
       around.  This many days after it has  last  been  read,  a
       discussion  thread  will  be  deleted by texpire(8).  This
       parameter is mandatory.

       "groupexpire" is a set of one string  and  the  number  of
       days  separated  spaces.   A thread in a newsgroup matched
       with the string should be kept around the number of  days.
       If  a system has fnmatch(), a string is compared by it, so
       you can use shell-styled globbing  rules  like  "*linux*".
       Otherwise, it is compared by strcmp() or strncmp(), so you
       can use only one asterisk at the  end  of  a  string  like
       "fj.*".   This  many  days  after it has last been read, a
       discussion thread will be deleted by texpire(8).

       "maxfetch" specifies the maximum number of articles fetch-
       news(8)  should  fetch  from  the  upstream server in each
       group.  This limits the size of the backlog a reader of  a
       group  will  see when first subscribing.  By default there
       is no limit, so a new reader will see all of the available
       postings.

       Warning: If you set maxfetch too low, regular readers of a
       group may not see all of the traffic  in  that  group.   I
       recommend   setting   it  to  at  least  1000-1500.   ini-
       tialfetch=3000 #again, don't use much space

       "initialfetch" specifies the maximum  number  of  articles
       fetchnews(8) should fetch from the upstream server in each
       group at the first connection to the server.   By  default
       there  is  no  limit,  so a new reader will see all of the
       available postings.

       "maxold" specifies the maximum dates  of  articles  fetch-
       news(8)  should  fetch  from  the  upstream server in each
       group.  By default there is 10 days limit, so a new reader
       will see only new postings.

       "maxlines"  specifies the maximum number of lines of arti-
       cles fetchnews(8) should fetch from the upstream server in
       each group.  By default there is no limit, so a new reader
       will see all of the available postings.

       "maxgroups" specifies the maximum number  of  cross-posted
       news groups of articles fetchnews(8) should fetch from the
       upstream server in each group.  By  default  there  is  no
       limit, so a new reader will see all of the available post-
       ings.

       In addition, "maxage" and "maxcrosspost" are also used  as
       same  as Cornelius's leafnode.  They are added to increase
       compatibility.

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 fetchnews(8).

       LAST   Moves the article pointer back by 1.

       LIST   Lists the available USENET groups.

       LISTGROUP
              Lists the articles present in the current group, or
              the argument group if an argument is present.

       MODE   Accepted and blithely ignored.

       NEWGROUPS
              Accepted  but the reply is always empty.  This com-
              mand does not make sense for this server.

       NEWNEWS
              Accepted but the reply is always empty.  This  com-
              mand 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 fetchnews(8).

       QUIT   Quit reading news.

       SLAVE  Accepted but ignored.

       STAT   Return  the  availability of an article.  See ARTI-
              CLE.

       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 AND LICENCE
       Written by Arnt Gulbrandsen <agulbra@troll.no>  and  copy-
       right  1995  Troll  Tech AS, Postboks 6133 Etterstad, 0602
       Oslo, Norway, fax +47 22646949.

       Modified by Kazushi (Jam) Marukawa <jam@pobox.com>.  Copy-
       right of the modifications 1998.

       Use, modification and distribution is allowed without lim-
       itation, warranty, or liability of any kind.

       The development of leafnode has been paid for  by  Uninett
       AS (http://www.uninett.no/).

SEE ALSO
       tcpd(8),  hosts.allow(5), fetchnews(8), texpire(8), check-
       groups(8), RFC 977

Troll Tech AS              30 Oct 1995                          1

Retour haut de la page