sn8
The sn news system.
Overview
If you think of a news spool as a black box, then sn is a bunch of programs to put articles in the box (snstore), to view articles in it (snntpd, sncat), remove old articles (snexpire,sncancel), generate a list of what's in it (snscan, snprimedb), or display that list (sndumpdb). In addition it can go find the articles to put in the box (snget).
The sn system is designed for small sites, spooling a few dozen to a few hundred newsgroups. It is not meant for sites carrying a full news feed. sn is suitable as a replacement for leafnode (ftp.troll.no, by Arnt Gulbrandsen). It doesn't have leafnode's intelligence when it comes to retrieving upstream articles, but is less demanding on the filesystem and takes up less disk space.
sn supports local news groups.
sn tries to create aliases for crossposts instead of storing the article multiple times.
sn can compress articles to save disk space. Compressing and uncompressing take place transparently.
sn doesn't use configuration files. Instead, you write small shell scripts to customize sn's behaviour.
Requirements
sn has been tested only against Linux ver. 2.0. It makes heavy use of mmap(2) in MAP_SHARED and MAP_WRITE mode, so it won't work on pre-1.3.45 or so. I ([email protected]) am interested in bug reports, comments, and suggestions.
News spool structure
The news spool is /var/spool/sn, which all sn programs need in order to run. It contains the group directories in news.group.name format rather than the traditional news/group/name. Each such directory contains article files, named serially from 1, 2, etc. Each article file consists of up to 10 articles, which reduces the number of files and inodes required. These article files are mmap(2)ed before use, and they are cached to reduce search time. sn tries to keep the headers of these articles bunched together, to reduce the memory footprint.
In addition to the article files, each newsgroup directory also contains files which control the behaviour of the sn system. All control files have filenames beginning with a dot, and they all reside in the group directory in which they are to have effect. In particular, if the group directory does not have a subdirectory .outgoing in it, it is considered a local news group.
Programs
sncat-
prints out the specified articles. This is useful if you want to transport the spool to another system.
sndumpdb-
dumps the ID database. It is not normally used.
snexpire-
expires articles in the spool.
snfetch-
is the back end of the article fetcher. You can use
suck(a separate package) instead.
snget-
is the front end of the article fetcher.
snmail-
converts a normal email message into a news article. It can be used to turn a mailing list into a local newsgroup.
snnewgroup-
is a script to create newsgroup directories.
sndelgroup-
is a script to delete newsgroup directories and flush the ID database of references to those articles.
snntpd-
is the news server (an nnrpd).
snprimedb-
feeds the ID database from formatted standard input. This database is what permits articles to be specified by their ID. This program is not used in normal operation.
snscan-
scans the specified articles and outputs a line consisting of the article's ID, newsgroup, and serial number within the newsgroup. This output is suitable for feeding to
snprimedb. This program is not used in normal operation.
snsend-
takes articles on standard input and distributes them according to the type of newsgroup.
snstore-
Like
snsend, but considers all newsgroups as local, so stores all articles locally only.
sncancel-
cancels articles, so they are no longer available locally.
Conventions
- Exit codes
-
All
snprograms exit 0 on success, 1 on invocation error; 2 on system error; 3 on format or protocol error. Other exit codes are possible.
Options-
snprograms take -d to enable verbose messages (may be repeated), and -V, which displays the version and exits. Where a network timeout is appropriate, this is specified with -t timeout, in seconds. -P indicates the pid should be included in any status output. Other options are possible.
Environment-
snprograms will take the contents of the SNROOT environment variable as the news spool rather than /var/spool/sn. If a program will need to run another, it appends /usr/sbin to its PATH variable if /usr/sbin is not already present.
Releases
11 releases since Debian 3.0 (Woody); the text changed 2 times.