INN Configuration

First one has to install INN of course. Slackware comes with INN and installs
it into /usr/lib/news.In addition, I suggest you look in the (Slackware only) 
/usr/lib/news/tools.linux directory for installation tips, scripts and faq. 
You may use either a preconfigured binary or a self-compiled one. I prefer to 
compiled my own and found an example-config.data for linux in the source. I 
had to reedit it bit so all the directory references match my Slackware 
locations (default was /usr/local/...ick). So I suggest you consult your 
systems setup for the location of INN, otherwise you can do like I did and 
install it in the /usr/lib/news directory.

INN runs as a daemon, so you don't need the nntp service defined in inetd.conf
file. Comment out the line and don't forget to restart inetd with a kill -HUP 
inetd-PID after you make the changes. 

If your installing INN for the first time or from the source like I did then 
you will have to make some changes in /usr/lib/news and its subdirectories.
I'll discuss the files to be configured one after another:

First some smaller files: /usr/lib/news/passwd.nntp and 
/usr/lib/news/nntpsend.ctl should only contain comments and nothing else.
You will also need to create the history files by executing the script 
/usr/lib/news/bin/makehistory as user news. 

/usr/lib/news/hosts.nntp contains only the following lines:

##  hosts.nntp - names and addresses that feed us news
##  Format
##      :
##      :
##   can be a name or IP address; no wildcards.  Any hosts not
##  listed here are handed off to nnrpd.
localhost:
f710.n125.z1.fidonet.org:

So only my own computer is allowed to access my NNTP-server.

/usr/lib/news/nnrp.access should look like this:

##  nnrp.access - access file for on-campus NNTP sites
##  Format:
##      ::::
##  Connecting host must be found in this file; the last match found is
##  used, so put defaults first.
##                Wildcard name or IP address
##                R to read; P to post
##                Username for authentication before posting
##                Password, for same reason
##              Newsgroup patterns that can be read or not read
##  To disable posting put a space in the  and  fields, since
##  there is no way for client to enter one.
##
## Default is no access, no way to authentication, and no groups.
*:: -no- : -no- :!*
##  Foo, Incorporated, hosts have no password, can read anything.
*:Read Post:::local.*
localhost:Read Post:::*
f710.n125.z1.fidonet.org:Read Post:::*

So everybody has read and write access via NNRP (that's the protocol from
which newsreader's communicate with the newsserver) to the newsgroups, whose
name begins with local.*. They are not allowed to read any other newsgroups. 
On my own computer everybody has permission to read and write in every 
newsgroup.

Next you have to configure /usr/lib/news/inn.conf like this:

##  inn.conf -- inn configuration data
##  Format:
##      :
##  Used by various programs and libinn.  The following parameters are defined:
##      domain          Local domain, without leading period.
##      fromhost        What to put in the From line; default is FQDN
##                      of the local host.
##      moderatormailer Where to mail moderated postings, if not found
##                      in the moderators file; see moderators(5).
##      pathhost        What to put in the Path and Xref headers; default
##                      is FQDN of the local host.
##      organization    If $ORGANIZATION doesn't exist.  What to put in
##                      the Organization header if blank.
##      server          If $NNTPSERVER doesn't exist.  Local NNTP server
##                      host to connect to.
##
## orginization line will be substituted for your origin line in echomail
organization:-={OCEAN BEACH BBS....San Francisco, CA}=-
server:localhost
fromhost:f710.n125.z1.fidonet.org

The most important file of the INN-configuration is /usr/lib/news/newsfeeds
which defines, which newsgroups are exported to whom.

##  newsfeeds - determine where Usenet articles get sent
##  Format:
##	site[/exclude,exclude...]\
##		:pattern,pattern...[/distrib,distrib...]\
##		:flag,flag...\
##		:param
##  Summary of flags:
##	.*\
	::

overview\
	:*:Tc.WO:/usr/lib/news/bin/overchan
#
# My Fido feed
#
f33.n125.z1.fidonet.org/f33.n125\
	:fido.*,!fido.NET_125,!control*,!junk*,!local*\
	:Tf,Wfb,B16384/1024:
#
# My nets admin hub
#
f5109.n125.z1.fidonet.org/f5109.n125\
	:fido.NET_125,!fido.*,!local*,!junk*,!control\
	:Tf,Wfb,B16384/1024:
#
# My othernets feeds
#
f1.n211.z21.prognet.ftn/f1.n211\
	:prog.*,!fido.*,!local*,!junk*,!control\
	:Tf,Wfb,B16384/1024: 

f60.n9991.z96.surfnet.ftn/f60.n9991\
	:surfnet.*,!prog.*,!fido.*,!local*,!junk*,!control\
	:Tf,Wfb,B16384/1024: 


Then you have to configure /usr/lib/news/expire.ctl, which defines when which 
newsgroups expire.

##  expire.ctl - expire control file
##  Format:
##	/remember/:
##	::::
##  First line gives history retention; other lines specify expiration
##  for newsgroups.  Must have a "*:A:..." line which is the default.
##		wildmat-style patterns for the newsgroups
##		Pick one of M U A -- modifies pattern to be only
##			moderated, unmoderated, or all groups
##			Mininum number of days to keep article
##		Default number of days to keep the article
##			Flush article after this many days
##  , , and  can be floating-point numbers or the
##  word "never."  Times are based on when received unless -p is used;
##  see expire.8

##  If article expires before 14 days, we still remember it for 14 days in
##  case we get offered it again.  Depending on what you use for the innd
##  -c flag and how paranoid you are about old news, you might want to
##  make this 28, 30, etc.
/remember/:30

# Keep all newsgroups minimal 3, maximal 90 and normaly 5 days (from arrival) 
*:A:3:5:90
*:U:3:5:90
# Keep moderated newsgroups a bit longer
*:M:5:9:90

# Keep the moderated c.o.l.* 1 month.
comp.os.linux.*:M:5:30:30

# Keep fido some longer as default.
fido*:A:3:9:90

# Remove the junk very quick.
fido.junk:A:3:4:90

Of course you may define this on your own needs.  But you shouldn't decrease
the default-times (especially for Fido) too much, as the messages take a long
time to your system and so might expire immeadiately.

Now you need to add some Fido echomail areas to your news active file. You can
do this two ways, first by running the script /usr/lib/news/bin/newgroup or 
second by manually editing the /usr/lib/news/active file. I prefer the later. 
The format of a new newsgroups record in the active file is : 
 <10 0's> <9 0's & 1> 
fido.LINUX 0000000000 0000000001 y
fido.PASCAL 0000000000 0000000001 y

Now copy the file etc/ifmail/misc/inn/send-ifmail to /usr/lib/news and 
change the owner to news.news. send-ifmail is called periodically from a 
crontab as user news to place the spooled articles in /var/spool/news/out.going
into /var/spool/ifmail/outb for ifcico to deliver.

To get the news exported, there must be a batch-directory for them, which is 
called /var/spool/news/out.going, with owner news.news and permission 775. In
contrast to cnews there mustn't be any subdirectories in this directory for the
newsfeeds, as INN uses only one file per feed which it creates itself. If you 
"upgrade" from cnews to INN, you should delete the existing directories.

As INN works with a daemon, which always runs, it must be started in the 
boot-process.  Add the following at the end of /etc/rc.d/rc.M before the call
of rc.local:

  /usr/lib/news/etc/rc.news &

For the first test of INN this script can be started manually (as user news).
But be careful, that only one innd is running at the same time. Remember do not
run any other program of INN's unless you su to user news.

In some distributions another NNTP-daemon (nntpd) is defined for cnews in 
/etc/inetd.conf.  Then innd can't be started, as the TCP-port is already busy.
That's why you have to comment out this line and restart inetd with a 
kill -HUP inetd.PID.

To make INN work properly you have to add the following to the crontab of
the user news:

SHELL=/bin/sh
MAILTO=news
#=========================================================================
# INN crontab:
#=========================================================================
#
# Offer spooled news batches to ifnews of outgoing echomail
#
30 */3 * * *		/usr/lib/news/send-ifmail f33.n125.z1.fidonet.org

# Send spooled news to uucp uplink
#
#35 */3 * * *		/usr/lib/news/send-uucp "uucp-feed-name"

# Run news.daily every morning at 6am
#
0 6 * * *		/usr/lib/news/bin/news.daily < dev/null

# offer spooled news (that was spooled into /news/in.coming directory when the
# innd server wasn't available) again to the innd server.
#
13,33,53 * * * *	/usr/lib/news/rnews -U

Every third hour at half past the hour, the batches for all Fido-systems and 
the UUCP-system are packed (without a UUCP-connection you can skip the last 
part of course). Furthermore there's a daily clean-up, which is reported via 
mail. Then all accidentally not-delivered articles will be processed.

The next thing we've got to do is creating the newsgroups.  Therefore and for 
almost all other changes in the news system only the command ctlinnd is used. 
It should be called only by the user news and you can find it in the directory
/usr/lib/news/bin.

New newsgroups are created with ctlinnd newgroup fido.LINUX (where fido.LINUX
is only an example). You can use various options, which are explained in the
manpage of ctlinnd(8). You should create the newsgroups control, junk and
fido.junk, which contain the control-messages (e.g. cancel), articles for 
unknown newsgroups and articles for not in /etc/ifmail/areas defined
areas.

To find the descriptions of the newsgroups in the newsreader, you may want to 
create the file /usr/lib/news/newsgroups, which contains the name of a 
newsgroup and its description (seperated by a TAB) in every line. The order of
the groups is irrelevant, from a duplicate line only the first one is shown.

As INN reports his log-messages via syslog, one should make these changes in 
/etc/syslog.conf:

news.crit                               /var/log/news/news.crit
news.err                                /var/log/news/news.err
news.notice                             /var/log/news/news.notice

Furthermore create the directory /var/log/news, and restart your syslogd.

For further information on INN, an upgrade from a cnews-system to INN,
problems etc. please read the very informative INN-FAQ and the manpages.