24.2. trn Configuration

trn is also the successor to an older newsreader, namely rn (which means read news). The “t” in its name stands for “threaded.” It was written by Wayne Davidson.

Unlike tin, trn has no provision for generating its threading database at runtime. Instead, it uses those prepared by a program called mthreads that has to be invoked regularly from cron to update the index files.

You can still access new articles if you're not running mthreads, but you will have all those “A GENUINE INVESTMENT OPPORTUNITY” articles scattered across your article selection menu, instead of a single thread you may easily skip.

To turn on threading for particular newsgroups, invoke mthreads with the list of newsgroups on the command line. The format of the list is the same as the one in the C News sys file:
$ mthreads ’comp,rec,!rec.games.go’

This command enables threading for all of comp and rec, except for rec.games.go (people who play Go don't need fancy threads). After that, you simply invoke mthreads with no options at all to make it thread any newly arrived articles. Threading of all groups found in your active file can be turned on by invoking mthreads with a group list of all.

If you're receiving news during the night, you will customarily run mthreads once in the morning, but you can also to do so more frequently if necessary. Sites that have very heavy traffic may want to run mthreads in daemon mode. When it is started at boot time using the –d option, it puts itself in the background, wakes up every ten minutes to check if there are any newly arrived articles, and threads them. To run mthreads in daemon mode, put the following line in your rc.news script:
/usr/local/bin/rn/mthreads -deav

The –a option makes mthreads automatically turn on threading for new groups as they are created; –v enables verbose log messages to the mthreads log file mt.log in the directory where you have trn installed.

Old articles that are no longer available must be removed from the index files regularly. By default, only articles with a number below the low-water mark will be removed.[1] Articles above this number that have been expired (because the oldest article has been assigned a long expiration date by an Expires: header field) may nevertheless be removed by giving mthreads the –e option to force an “enhanced” expiry run. When mthreads is running in daemon mode, the –e option makes mthreads put in such an enhanced expiry run once a day, shortly after midnight.

Notes

[1]

Note that C News (described in Chapter 21) doesn't update this low-water mark automatically; you have to run updatemin to do so.

mirror server hosted at Truenetwork, Russian Federation.