[ lamepage · Linux · News · sp4si ]

** sp4si Script package for Suck & INN **

0.99 2000-12-16



This script package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The package is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY.
(c) 1998-2000 Peter Sobisch, All rights reserved.

Because of many questions at the begin and the because of nobody wants to read long and tedious manual, I decided to write this as a question-answer like document. This text is written as WWW-Page and is also the regular manual (included to sp4si package).


  1. What is sp4si ?
  2. What does sp4si and what it doesn't ?
  3. Why and when I need sp4si ?
  4. What I need to use sp4si ?
  5. How does it works ?
  6. Syntax and functions
    1. configuration: env and newshosts
    2. active - scripts: get.active and rebuild.active
    3. spool - scripts: nntp.up, nntp.down, uucp.batch and uucp.cico
    4. subscription - scripts: subscribe and wwwsubscribe
    5. Installation script: install.sh
  7. Installation
  8. Configuration: first steps
  9. Tips
    1. inserting of local newsgroups
    2. self-maintainance of sp4si
    3. extended configuration
    4. sp4si and CNFS
  10. Where to get sp4si ?

1. What is sp4si ?

sp4si is a script package, which makes the management with INN and suck much easier. It keeps the configuration level be increased number of newshosts on the same level. sp4si is originated because of misery and is designed for everybody who uses a dial-up internet connection and wants to read the news offline on his own local INN newssystem or for everybody who just wants to expand his INN newssystem.

In the beginning sp4si was just a small script for auto-subscribing of newsgroups on the local INN system and it becames an full automatical multihost- and multitaskingable spool tool for INN and suck newssystems.


2. What does sp4si and what it doesn't ?


3. Why and when I need sp4si ?


4. What I need to use sp4si ?

You will need the following packages: It requires a configured and running INN newssystem (local configuration) and UUCP (if needed). To get more information how to configure INN system easily you can read in the german (sorry) manual from Carsten Voss "Einrichtung eines News-Systems unter Linux". Furthermore you must have suck package installed and the suck command must be in your PATH environment (for example you can copy it to /usr/local/bin directory).


5. How does it work ?

sp4si consists of some shell scripts which can be divided into three main parts and two configuration files: newshosts and env. The newshosts file contains the site- and hostnames which should be spooled. The env file contains the environment variables and will be included on the runtime by the most scripts of sp4si. The first part of the sp4si does the active file management, the second part spools the news articles and the last part takes care of newsgroup's auto subscribing.

Almost all scripts will evaluate the newshosts file and use its entries. This is an advantage, if you want to add a new newshost, you have only to do this in the newshosts and newsfeeds (INN) files. Because of the centralized environment, sp4si makes the management much easier and increases the productivity of your newssystem. If you want to use the spool frontend spool.news (is strong recommended), all spool activities will be logged and you can send optionally spool reports with the spool result by email or post it to a given newsgroup.


6. Syntax and functions

6.1. Configuration files

Almost all scripts allow to invoke them giving the -h or --help or -? parameters to show the syntax and online help.


6.2. active scripts


6.3. Spool scripts


6.4 subscribe script


6.5. Installation script


7. Installation

ATTENTION: UUCP and HTTP-daemon installation and configuration description don't belong to this package and you have to get them from other resources (e.g.: HowTo). The sp4si package consists of following parts: The archive must be unpacked first by typing tar xvfz sp4si-0.99.tar.gz. After that, you must change in the created subdirectory sp4si by typing cd sp4si and start the install.sh script. The install.sh script expects no parameters. The innshellvars file of your INN installation will be found and parsed. Only the destination directory for the sp4si installation will be asked manually. If the innshellvars file couldn't be found, all othe required paths will be asked too.
CGI Script installation:
on the installation you will be asked for the name of the account of your HTTP-daemon. If you don't know about it, you can find it out as follows:
ps@comm:~ > ps -fC httpd
root     10389     1  0 Dec08 ?        00:00:04 /usr/sbin/httpd -f /etc/httpd/httpd.conf -D PERL -D PHP
wwwrun   10392 10389  0 Dec08 ?        00:00:07 /usr/sbin/httpd -f /etc/httpd/httpd.conf -D PERL -D PHP
wwwrun   11064 10389  0 Dec08 ?        00:00:07 /usr/sbin/httpd -f /etc/httpd/httpd.conf -D PERL -D PHP
ps@comm:~ >
After the install.sh script finished, you will have to copy the wwwsubscribe script manually into the cgi-bin directory and to set the right permissions.  You can set the permissions by typing: chmod 755 wwwsubscribe.


8. Configuration: first steps

8.1. Step 1: newshosts configuration

After the installaion has successfully finished, the names of remote news servers can be inserted into the newshosts file (you will find this in your destination directory), it could be as follows:

newshosts (example):

# example for NNTP sites
# example for UUCP sites
# example

8.2. Step 2: download of active file

After you have added your remote news server names and saved into the newshosts file, you can attempt the second step, the download if the remote active files. By starting the script as shown below, all active files will be downloaded and stored in site/<site> subdirectories:

8.3. Step 3: newsfeeds configuration

After all active file are successfully downloaded, you have to attempt the difficultest step of the sp4si configuration: the newsfeeds (don't confuse with with newshosts) entries. You have to take a look at the (new downloaded) active files in site/<site> subdirectories and have to decide which newsgroups from which news servers you will spool to your local news server. You should decide so, that each newsgroup will be spooled only by one host, you avoid therewith to propagate newsgroups between your newsfeeds. Therefore you should read the man page for newsfeeds. You can look for an example in the german manual (sorry) too: "Erweiterung von INN & suck auf mehrere Newsserver".


8.4. Step 4: create new active file

After the newsfeeds file has been configured, a new active file for your INN can be created by typing:
On running this, a new active file will be created (regarding the localhost.active file) and moved to the INN's active file. For that, INN will be stopped, the config files reloaded and re-parsed (the changes on newsfeeds file will be active) and finally the INN will be restarted.

Ready !

So, we have finished our configuration of sp4si and you are able to spool all your configured news hosts now.
For your synopsis:
  1. enter <site> <newshost> and maybe <up/down> <packer> <gupmail> <password> too in newshosts file
  2. connect to internet and run get.active, than you can continue offline
  3. enter newsfeeds in newsfeeds file
  4. rebuild.active

9. Tips

sp4si is developed for decrease the news administration effort, here you will find some useful tips which can help you by your daily work with sp4si.


9.1. Inserting of local newsgroups

to add a new newsgroup f.e: my.newsgroup, it must be inserted in localhost.active file:

localhost.active (example):

localhost.test 0000000000 0000000001 y
localhost.spool 0000000000 0000000001 y
my.newsgroup 0000000000 0000000001 y
then rebuild.active must be restarted:
after that all we have now 3 local newsgroups.


9.2. self-maintenance if sp4si

sp4si needs no special maintenance if once the right things are made. This requires putting a few lines into the /etc/crontab file:
ACTIVE="su -l news -c /etc/news/sp4si/get.active"
REBUILD="su -l news -c /etc/news/sp4si/rebuild.active"
SPOOL="su -l news -c /etc/news/sp4si/spool.news"
ONLINE=/etc/ppp/ppp-on      # how to get online
OFFLINE=/etc/ppp/ppp-off    # how to get offline
0 6,16,21 * * * root $ONLINE; $SUBSCRIBE; $SPOOL; $OFFLINE
As you can see, it the spool will be startet 3 times in the day, but prior to spool, the subscribing will be checked first. Further every 1st day of the month, the active file will be updated and makes it up-to-date (you can do this often if you want). To get further information about the syntax of crontab please refer the man page: man 5 crontab.


9.3. Extended configuration: env

As mentioned above, sp4si can be configured by changing the env file. This file is regular script, which will be executed at first by the other scripts to make the settings be regarded. The env file consists of 2 parts: [Back]

9.4. sp4si and CNFS

sp4si has been adapted to be working with CNFS together. The sending articles would be uploaded one after another, this cause poor perfomance on high number of articles. This issue has to be improved in the future. It is planed to make a batch file with the outgoing articles and to spool it with the new version of rpost (>4.2.3 is able to handle rnews-batches). How to setup your INN to CNFS have a look at the german (sorry) how-to Umstellung der INN Konfiguration uuf CNFS.


10. Where to get sp4si ?

Please use one of the links listed below:


If you found any bugs or have any suggestions to make sp4si better please write me an email to: Peter Sobisch <petersob@gmx.net>.
I want to thank Carsten Voß, whose manual helped me to install my first INN news system.