Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

24.3. nn Configuration

nn, written by Kim F. Storm, claims to be a newsreader whose ultimate goal is not to read news. Its name stands for “No News,” and its motto is “No news is good news. nn is better.”

To achieve this ambitious goal, nn comes with a large assortment of maintenance tools that not only allow thread generation, but also extensive database consistency checks, accounting, gathering of usage statistics, and access restrictions. There is also an administration program called nnadmin, which allows you to perform these tasks interactively. It is very intuitive, so we will not dwell on these aspects, but deal only with the generation of the index files.

The nn threads database manager is called nnmaster. It is usually run as a daemon, started from an rc file at boot time. It is invoked as:
/usr/local/lib/nn/nnmaster -l -r -C

This enables threading for all newsgroups present in your active file.

Equivalently, you may invoke nnmaster periodically from cron, giving it a list of groups to act upon. This list is very similar to the subscription list in the sys file, except that it uses blanks instead of commas. Instead of the fake group name all, an empty argument of "" should be used to denote all groups. A sample invocation looks like this:
# /usr/local/lib/nn/nnmaster !rec.games.go rec comp

Note that the order is significant. The leftmost group specification that matches always wins. Thus, if we had put !rec.games.go after rec, all articles from this group would have been threaded nevertheless.

nn offers several methods to remove expired articles from its databases. The first is to update the database by scanning the newsgroup directories and discarding the entries whose corresponding article has exceeded its expiration date. This is the default operation obtained by invoking nnmaster with the –E option. It is reasonably quick, unless you're doing this via NNTP.

The second method behaves exactly like a default expiration run of mthreads; it removes only those entries that refer to articles with numbers below the low-water mark in the active file. It may be enabled using the –e option.

Finally, the third strategy discards the entire database and recollects all articles. It may be enabled using the –E3 option.

The list of groups to be expired is given by the –F option in the same fashion as above. However, if you have nnmaster running as daemon, you must kill it (using –k) before expiration can take place, and restart it with the original options afterward. Thus the proper command to run expiration on all groups using the first method is:
# nnmaster -kF ""
# nnmaster -lrC

There are many more flags that fine-tune the nn's behavior. If you are concerned about removing bad articles or assembling article digests, read the nnmaster manual page.

nnmaster relies on a file named GROUPS, which is located in /var/lib/nn. If it does not exist when nnmaster is first run, it is created. For each newsgroup, it contains a line that begins with the group's name, optionally followed by a time stamp and flags. You may edit these flags to enable certain behavior for the group in question, but you may not change the order in which the groups appear.[1] The flags allowed and their effects are detailed in the nnmaster manual page, too.

Notes

[1]

Their order has to agree with that of the entries in the (binary) MASTER file.

 
 
  Published under the terms of the Creative Commons License Design by Interspire