🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #33718

INN 2.1 How-To: constructive comments welcome!

#33718
From: Elena Samsonova
Date: Fri, 11 Dec 1998 00:00
562 lines
25693 bytes
This is a multi-part message in MIME format.

--------------1C09B836D7F0063BB7A59B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello everyone,

The promised INN 2.1 How-To version 1.0 is now released!  As every x.0
release, it is most probably full of bugs and forgotten features. :-o 
Therefore please comment *constructively* and contribute! 
(Constructively means: don't assert "Your How-To sucks!" but explain why
it sucks and suggest improvements.)

Again as promised, I attach a plain text version of the How-To to this
article, but it lacks the graphics and the formatting, of course.  So I
recommend you look at the HTML version at URL:

 
http://web.inter.NL.net/users/Elena.Samsonova/unix/general/INN/inn-open-source.html

For future updates, do you think I should continue posting plain text
versions here?

 
Regards
Elena

--------------1C09B836D7F0063BB7A59B
Content-Type: text/plain; charset=us-ascii; name="inn-open-source.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="inn-open-source.html"


                            InterNet News How-To

 Abstract This document is an attempt to plot out a deployment road map
          for INN 2.1. The document needs to be revised upon an upgrade.

 Author
          Elena Samsonova - World Access / Planet Internet

 Date
          December 11, 1998

 Version
          1.0

----------------------------------------------------------------------------
Instead a foreword

Since I only run one particular configuration and often follow plain vanilla
choices, I cannot know all the intricacies of other sites, therefore
contributions are welcome! All the author rights will be preserved, in the
sense that the author's name will appear next to his/her contribution.

Parts of the document that are not yet completed, are marked in blue.

This document is not a transcript of the manuals, and by no means a
replacement for them! Although it may be a great disappointment to those who
don't like to RTFM :) I'm still not going to copy and paste manuals into
here. Instead, every section that talks of programs or scripts, lists
relevant manual pages on the right. As one of the greatest difficulties in
installing INN is finding the right man page, this is supposed to help.

Copyright notice: some of the graphics may resemble those pesented by MIB
software (http://www.mibsoftware.com/usenet), but they are not the same.
Resemblance is unavoidable since we are talking about the same software
package.

Request for input

Some of the functionalities are not covered in this How-To simply because I
have insufficient knowledge on them, therefore please contribute!! At least
the following parts are not covered:

   * actived
   * overview usage
   * cyclical buffer and hashed spool formats
   * other?

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

 Table of Contents

  1. SYSTEM ARCHITECTURE
        o Overview
        o Centralized System Architecture
        o Distributed System Architecture
             + Server Level
             + Process Level
             + Architectural Details
                  + Readers
                  + Feeder
  2. IMPLEMENTATION GUIDE
        o Centralized System
        o Distributed System
             + Readers
             + Feeder

List of Figures

  1. Overal architecture of a centralized system
  2. Overal architecture of a distributed system: server level
  3. Overal architecture of a distributed system: process level
  4. Distributed system: INN reader architecture
  5. Distributed system: INN feeder architecture

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

 System Architecture                             Table of
                                                 Contents

Overview
----------------------------------------------------------------------------

INN is a package of various programs and scripts meant for different
purposes, and different system and server configuration may require
different programs. This section describes several most commonly used
configurations, as far as I got input on those that I don't run myself.

For now, the section contains two configurations: centralized and
distributed with separate multiple readers and a single feeder. Input about
other configurations is welcome.

In a centralized system, one machine runs a set of programs that handle
incoming feed, outgoing feed and user connections for reading and posting. A
stand-alone configuration is also possible when the server is used for
internal purposes only and no incoming or outgoing feed is needed.

In a distributed system not every machine runs the same programs. INN, being
a package of multiple programs working together, offers many mix-and-match
possibilities.

Centralized System Architecture
----------------------------------------------------------------------------

Figure 1 depicts overal architecture of a centralized system. This section
is meant to shed some light on the interaction of the processes on the
system, it does not explain how to get those processes to behave this way.
See section Implementation Guide for further details.

 The system runs an innd daemon which handles incoming       innd
 feeds, manages the active and history files, as well        nnrpd
 as the article spool, and listens on port 119 and           inn.conf
 accepts user connections. For each accepted                 nnrp.access
 connection it spawns a child nnrpd process which            moderators
 handles further interaction with the user.

 Each nnrpd process reads the active and history files       active
 to find article information, fetches requested              history
 articles from the spool and sends them to the user.
 It also accepts user postings.

 User postings are first pulled through a filter,
 filter_nnrpd, which is a Perl script. It is loaded
 when nnrpd starts up for subsequent use. The filter
 may reject certain postings, in which case the user
 gets an error back ( see note ). If a postings passes
 through the filter, nnrpd passes it on to innd. nnrpd
 does not attempt to store user postings in the spool.

      Note: I am currently evaluating a patch to nnrpd
      which will allow to reject certain postings
      without returning an error message to the users.

 innd is configured to accept incoming feed from             incoming.conf
 several external peers. All the incoming articles are       news
 first pulled through a filter which is loaded at            news.log
 startup. One of the popular filter scripts is               cleanfeed
 cleanfeed. Contributions about other filters are            control.ctl
 welcome! The filter drops rejected articles silently.
 It does however log relevant information.

 When an article makes it through cleanfeed, innd            newsfeeds
 registers it in the active and history file and             moderators
 stores it in the article spool. If configured, innd
 also sends the article to the corresponding external
 peer, either via a channel or via a batch.

 For peers that receive low volume feed, innd uses the       nntpsend
 batch method. It therefore spools relevant articles         nntpsend.ctl
 to batch files (one per peer) for further processing.       passwd.nntp
 nntpsend is called on a regular basis from cron which       innxmit
 examins the batch files and spawns one innxmit              cron
 process per peer, according to peer configuration.
 innxmit establishes connection with the peer,
 transfers the articles and closes the connection when
 done. Note that when a peer goes down ungracefully
 (without closing connection), innxmit hangs. It is
 possible to install a script on the feeder which
 checks for peers and kills hanging innxmit processes
 if necessary.

 For peers that receive high volume feed, as well as         innfeed
 for peers that receive identical feed, innd uses the        innfeed.conf
 channel method. It spawns innfeed at startup and
 opens a channel to it. Every time innd finds an
 article to be fed to the peers, it sends it to the
 innfeed channel. innfeed is configured to feed
 multiple peers with the same articles from the
 channel. It manages connections to the peers and
 writes backlogs in case a peer is unavailable or too
 slow. innfeed writes one backlog file per peer. The
 backlog is truncated to a specified length in order
 to prevent disk space overflow. When this happens,
 the peer is said to miss articles. innxmit does not
 process backlogs; a separate program (e.g. innxmit)
 should be called to do that afterwards.

 news.daily is run daily for article expiration, log         news.daily
 file rotation and reporting purposes. For article           expire
 expiration news.daily spawns expire which processes         expire.ctl
 the history database purging entries for articles to        fastrm
 be expired. It produces a list of articles to be
 removed from the spool, and renumbers the active file
 to reflect changes. expire calls fastrm to actually
 remove the articles on the expire list from the
 spool.

 For log rotation and reporting purposes, news.daily         scanlogs
 calls scanlogs, which analogous to the one on the           innreport
 readers, rotates the log files and calls innreport to
 process them, create a report and mail it to the news
 administrator.

 There is a separate program that maintains innd,            control.ctl
 called ctlinnd, and another special program that            ctlinnd
 watches over innd, called innwatch. News group              innwatch
 maintenance is also done with ctlinnd. See                  innwatch.ctl
 Implementation Guide for further details.

Distributed System Architecture
----------------------------------------------------------------------------

Server Level

Figure 2 depicts overal architecture on server level. Functions of the
readers are all identical, so there may be as many of them as necessary to
cope with the load, which provides for horisontal scaling.

The readers accept user connections, read articles from the spool and
deliver them to the users, and accept user postings and forward them to the
feeder. The readers do not write to the spool.

The feeder accepts incoming feeds from external peers and user postings from
the readers and writes them to the spool and sends them out to the internet
to the external peers. Note that the feeder replicates external newsfeed.

The newsstore is merely a filer which hosts shared data.

Because of this functional split, the readers and the feeder are called the
frontend, and the newsstore is called the backend.

Process level

Figure 3 depicts overal architecture on process level. The figure shows only
one reader because all the readers have identical architecture.

The readers run nnrpd which handles user connections and spawns one process
per user. It reads article information from the active and history files and
the articles from the spool, and delivers them to the users. It accepts user
postings and stores them in a batch. rnews is run periodically, it reads
user postings from the batch and sends them to the feeder for propagation.
The readers do not store user postings in the spool.

The feeder runs innd which handles newsfeeds. It accepts incoming newsfeeds
from external peers and user postings from the readers, stores them in the
spool and updates the active and history files accordingly. It also
propagates newsfeed to external peers and sends out user postings. The
feeder runs expire daily to purge old articles from the spool.

All frontend machines also run innreport daily which scans the log files and
creates a daily report which is then mailed to the news administrator.

Architectural Details

This section is meant to shed some light on the interaction of the processes
on the reader and feeder systems, it does not explain how to get those
processes to behave this way. See section Implementation Guide for further
details.

     Readers

 Figure 4 depicts INN architecture on a reader.

 The system runs an nnrpd daemon (started up with the       nnrpd
 -D switch), which listens on port 119 and accepts          inn.conf
 user connections. For each accepted connection it          nnrp.access
 spawns a child nnrpd process which handles further         moderators
 interaction with the user.

 Each nnrpd process reads the active and history            active
 files to find article information, fetches requested       history
 articles from the spool and sends them to the user.
 It also accepts user postings.

 User postings are first pulled through a filter,
 filter_nnrpd, which is a Perl script. It is loaded
 when nnrpd starts up for subsequent use. The filter
 may reject certain postings, in which case the user
 gets an error back ( see note ). If a postings
 passes through the filter, nnrpd stores it in a
 batch to be sent to the feeder. nnrpd does not
 attempt to store user postings in the spool.

      Note: I am currently evaluating a patch to
      nnrpd which will allow to reject certain
      postings without returning an error message to
      the users.

 rnews is run on a regular basis from cron to send          rnews
 user postings to the feeder. It processes the batch        cron
 created by nnrpd and attempts to make a connection
 to the feeder. If the feeder is temporarily down or
 does not accept connections for some other reason,
 rnews leaves the articles in the batch. Next time it
 is started, it will try again. This way
 unavailability of the feeder does not impair users'
 ability to post.

 For log file rotation and reporting purposes,              news.daily
 news.daily is run daily. news.daily on the readers         scanlogs
 does not run expire. It spawns scanlogs which              innreport
 rotates the logs and calls innreport which analyses        innreport.conf
 them, creates a report and mails it to the news
 administrator.

     Feeder

 Figure 5 depicts INN architecture on the feeder.

 The system runs innd daemon which handles incoming          innd
 feeds and manages the active and history files, as          active
 well as the article spool.                                  history

 innd is configured to accept incoming feed from             incoming.conf
 several external peers and from the readers. Note           news
 that the feeder does not see any difference between         news.log
 external feed and user postings from the readers. All       cleanfeed
 the incoming articles are first pulled through a            control.ctl
 filter which is loaded at startup. One of the popular
 filter scripts is cleanfeed. Contributions about
 other filters are welcome! The filter drops rejected
 articles silently, as there is no user to issue the
 error to. It does however log relevant information.

 When an article makes it through cleanfeed, innd            newsfeeds
 registers it in the active and history file and             moderators
 stores it in the article spool. If configured, innd
 also sends the article to the corresponding external
 peer, either via a channel or via a batch.

 For peers that receive low volume feed, innd uses the       nntpsend
 batch method. It therefore spools relevant articles         nntpsend.ctl
 to batch files (one per peer) for further processing.       passwd.nntp
 nntpsend is called on a regular basis from cron which       innxmit
 examins the batch files and spawns one innxmit              cron
 process per peer, according to peer configuration.
 innxmit establishes connection with the peer,
 transfers the articles and closes the connection when
 done. Note that when a peer goes down ungracefully
 (without closing connection), innxmit hangs. It is
 possible to install a script on the feeder which
 checks for peers and kills hanging innxmit processes
 if necessary.

 For peers that receive high volume feed, as well as         innfeed
 for peers that receive identical feed, innd uses the        innfeed.conf
 channel method. It spawns innfeed at startup and
 opens a channel to it. Every time innd finds an
 article to be fed to the peers, it sends it to the
 innfeed channel. innfeed is configured to feed
 multiple peers with the same articles from the
 channel. It manages connections to the peers and
 writes backlogs in case a peer is unavailable or too
 slow. innfeed writes one backlog file per peer. The
 backlog is truncated to a specified length in order
 to prevent disk space overflow. When this happens,
 the peer is said to miss articles. innxmit does not
 process backlogs; a separate program (e.g. innxmit)
 should be called to do that afterwards.

 news.daily is run daily for article expiration, log         news.daily
 file rotation and reporting purposes. For article           expire
 expiration news.daily spawns expire which processes         expire.ctl
 the history database purging entries for articles to        fastrm
 be expired. It produces a list of articles to be
 removed from the spool, and renumbers the active file
 to reflect changes. expire calls fastrm to actually
 remove the articles on the expire list from the
 spool.

 For log rotation and reporting purposes, news.daily         scanlogs
 calls scanlogs, which analogous to the one on the           innreport
 readers, rotates the log files and calls innreport to
 process them, create a report and mail it to the news
 administrator.

 There is a separate program that maintains innd,            control.ctl
 called ctlinnd, and another special program that            ctlinnd
 watches over innd, called innwatch. News group              innwatch
 maintenance is also done with ctlinnd. See                  innwatch.ctl
 Implementation Guide for further details.

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

 Implementation Guide                             Table of
                                                  Contents

Centralized System
----------------------------------------------------------------------------

Input welcome!!

Distributed System
----------------------------------------------------------------------------

There are a couple of things to pay attention to when configuring machines
in a distributed system. This section describes those specific things. Note
that I only describe deviations from the norm because explanations for
standard values can be found in the manuals. However, the meaning and use of
the various configuration files is outlined here.

Readers

 nnrpd configuration:                                       nnrpd
      nnrpd is configured in inn.conf. This file            inn.conf
 contains configuration parameters for innd as well         rnews
 which are ignored on the readers.                          cron
                                                            crontab
 Having nnrpd write postings to a queue:
      To make sure that nnrpd stores user postings in
 a batch in queue/incoming directory, set spoolfirst
 to true.

 Running rnews:
      rnews should be run frequently enough to make
 sure your users don't complain. The postings will
 only appear on the news server (and will only be
 sent out to the Internet) when they are transmitted
 to the feeder. A sensible value is every 5 minutes.
      The following parameters are usually used:
 rnews -v -U.

 User access rights and closed groups:                      nnrp.access
      User access rights are configured in
 nnrp.access. Closed groups are also set up here. All
 standard stuff.

 Although it is all standard stuff, a good
 description of how to set up a closed group without
 turning on authentication for all the public groups
 as well, is wanted. Please contribute!

 Moderated groups:                                          moderators
      Moderated groups are marked as m in the active        active
 file. Moderator addresses are listed in the
 moderators file. nnrpd consults this file when an
 article is posted to a moderated group.
      See feeder section on how to set up a moderated
 group in the active file.

 Rotating logs and creating reports:                        news.daily
      Use news.daily to do it. Note that you need to        scanlogs
 explicitely turn off expire and renumber of the            innreport
 active file. Use the following parameters:                 innreport.conf

           news.daily noexpire norenumber

      news.daily calls scanlogs which in turn calls
 innreport. The latter is configured in
 innreport.conf.

Feeder

 innd configuration:                                        innd
      innd is configured in inn.conf. Configuration         inn.conf
 here is quite standard.

 Allowing readers to post:                                  nnrp.access
      I found it necessary to give the readers access
 to the feeder in the feeder's nnrp.access file.
 Otherwise rnews from the readers cannot connect.

 Setting up incoming feed:                                  innd
      Incoming feeds are handled by innd and are            incoming.conf
 configured in incoming.conf. Pay attention to the          newsfeeds
 peer ME which is your own news server. If this peer
 is not configured properly, the articles will not
 appear in your spool.
      The peer ME must also be configured in
 newsfeeds for the same reasons as above.

 Setting up outgoing feed:                                  newsfeeds
      Outgoing feeds are configured in newsfeeds            nntpsend.ctl
 which determines the method to be used to transfer         passwd.nntp
 the articles to the peer.                                  innfeed
      For low-volume feeds batched method may be used       innfeed.conf
 with the transfer handled by nntpsend (which calls
 innxmit for each peer). nntpsend is configured in
 nntpsend.ctl and passwd.nntp.
      For high-volume feeds channel method may be
 used with the transfer handled by innfeed, one
 instance of the program serving all the peers. It is
 configured in innfeed.conf.

 Setting up anti-spam filters:                              cleanfeed
      The feeder may run an anti-spam filter that
 checks every incoming article and drops "bad" ones.
 If it is a Perl script, it should be copied to the
 bin/filter/filter_innd.pl, if it is a Tcl/Tk script,
 it goes to bin/filter/filter_innd.tcl.
      One of the popular filters is cleanfeed which
 is configured in cleanfeed.conf.
      Input about other filters is welcome!

 News groups maintenance:                                   ctlinnd
      News groups are maintained (added, removed or         control.ctl
 changed attributes) with ctlinnd as well as
 automatically by innd.
      Automatic news group maintenance is controlled
 by control.ctl which defines how specific types of
 control articles are processed.

 Timely updates of active and history:                      active
      So that the readers would be able to access all       history
 the articles in the spool for all actions (including
 cancelling when they need to retrieve the article by
 message ID), active and history* files need to be
 updated frequently enough. If MMAP is used, then
 MMAP_SYNC must also be used with a sufficiently
 short interval.

 Watching over innd:                                        innwatch
      innwatch watches over innd and can be configure       innwatch.ctl
 to do a wide range of things in the configuration
 file innwatch.ctl.

 Running expire and rotating logs:                          news.daily
      Both these actions are performed by news.daily        expire
 which calls expire and fastrm for expiration,              fastrm
 ctlinnd renumber for active file renumbering, and          expire.ctl
 scanlogs that calls innreport for log file rotation        scanlogs
 and reporting.                                             innreport
      news.daily is run from cron on a daily basis.         innreport.conf
 To make sure that expire does not take for ever, the
 following parameters are given:

           news.daily delayrm

      Expiration policies depend on the storage
 method(s) used. For the traditional spool they are
 defined in expire.ctl. Please contribute for the
 other storage methods!
      Reporting is defined in innreport.conf that is
 used by innreport.

--------------1C09B836D7F0063BB7A59B--


Technical Details
Message-ID: <3670FD19.1D1BBF61@wxs.nl>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <3670FD19.1D1BBF61@wxs.nl>
Subject: INN 2.1 How-To: constructive comments welcome!
Date: Fri, 11 Dec 1998 00:00:00 +0000
From: Elena Samsonova <E.Samsonova@wxs.nl>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 421145970
Content-Type: multipart/mixed; boundary="------------1C09B836D7F0063BB7A59B"
X-Complaints-To: abuse@wxs.nl
X-Trace: reader3.wxs.nl 913374511 1939 195.121.4.60 (11 Dec 1998 11:08:31 GMT)
Organization: World Access / Planet Internet
Mime-Version: 1.0
NNTP-Posting-Date: 11 Dec 1998 11:08:31 GMT
Newsgroups: news.software.nntp