sn,v0.3.8(8) | System Manager's Manual | sn,v0.3.8(8) |
sn - The sn news system.
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.
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 (harold-sn@nb.com.sg) am interested in bug reports, comments, and suggestions.
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.
When retrieving articles, there is a window of time between when an article is first marked as wanted and when it is committed to the news spool. Within this window it is possible to have the same article committed by a separate process. This defeats the aliasing feature so you could end up with more than one copy of an identical article.
The ID database will only store one instance of an articles {ID,group,serial} tuple. After the second copy is committed to the spool, snstore will try to commit it in the ID database, and will fail. So it is possible that after the article has been expired, another copy will still remain, but be inaccessible if requested by its ID.
sn doesn't sync the ID database after each write, so it
could get corrupted. If you suspect it is corrupted, delete the files
/var/spool/sn/.table, /var/spool/sn/.chain, and
/var/spool/sn/.newsgroup, making sure snntpd and snget
aren't running or scheduled to do so. Then run
cd /var/spool/sn; snscan -n * |snprimedb
This will recreate the ID database.
sncat(8), sndumpdb(8), snexpire(8), snfetch(8), snget(8), snmail(8), snnewgroup(8), sndelgroup(8), snntpd(8), snprimedb(8), snscan(8), snstore(8), snsend(8)
Harold Tay | N.B. |