[ Pobierz całość w formacie PDF ]
.One of the most e ective newsreaders is$ find var spool news -name ' 0-9 *' -exec cat ; | moreThis is the way un?x die-hards read their news.The ma jority of newsreaders, however, are much more sophisticated.They usually o era full-screen interface with separate levels for displaying all groups the user has subscribedto, for displaying an overview of all articles in one group.and for individual articles.At the newsgroup level, most newsreaders display a list of articles, showing their subjectline, and the author.In big groups, it is impossible for the user to keep track of articlesrelating to each other, although it is possible to identify responses to earlier articles.A response usually repeats the original article's subject, prepending it with Re: ".Additionally, the message id of the article it is a direct follow-up to may be given in theReferences: header line.Sorting articles by these two criteria generates small clusters infact, trees of articles, which are called threads.One of the tasks in writing a newsreader isdevising an e cient scheme of threading, because the time required for this is proportionalto the square of the number of articles.Here, we will not dig any further into how the user interfaces are built.All newsreaderscurrently available for Linux have a good help function, so you ought to get along.30219.1.tin Con guration 303In the following, we will only deal with administrative tasks.Most of these relate to thecreation of threads databases and accounting.19.1 tin Con gurationThe most versatile newsreader with respect to threading is tin.It was written by Iain Leaand is loosely modeled on an older newsreader named tass.1 It does its threading when theuser enters the newsgroup, and it is pretty fast at this unless you're doing this via NNTP.On an 486DX50, it takes roughly 30 seconds to thread 1000 articles when reading directlyfrom disk.Over NNTP to a loaded news server, this would be somewhere above 5 minutes.2You may improve this by regularly updating your index le with the -u option, or byinvoking tin with the -U option.Usually, tin dumps its threading databases in the user's home directory below.tin index.This may however be costly in terms of resources, so that you should want to keep a singlecopy of them in a central location.This may be achieved by making tin setuid to news,for example, or some entirely unprivileged account.3 tin will then keep all thread databasesbelow var spool news.index.For any le access or shell escape, it will reset its e ectiveuid to the real uid of the user who invoked it.4A better solution is to install the tind indexing daemon that runs as a daemon andregularly updates the index les.This daemon is however not included in any release ofLinux, so you would have to compile it yourself.If you are running a LAN with a centralnews server, you may even run tind on the server and have all clients retrieve the indexles via NNTP.This, of course, requires an extension to NNTP.Patches for nntpd thatimplement this extension are included in the tin source.The version of tin included in some Linux distributions has no NNTP support compiledin, but most do have it now.When invoked as rtin or with the -r option, tin tries to connectto the NNTP server speci ed in the le etc nntpserver or in the NNTPSERVER environmentvariable.The nntpserver le simply contains the server's name on a single line.1Written by Rich Skrenta.2Things improve drastically if the NNTP server does the threading itself, and lets the client retrieve thethreads databases; INN-1.4 does this, for instance.3However, do not use nobody for this.As a rule, no les or commands whatsoever should be associatedwith this user.4This is the reason why you will get ugly error messages when invoking it as super user.But then, youshouldn't work as root, anyway.19.2.trn Con guration 30419.2 trn Con gurationtrn is the successor to an older newsreader, too, namely rn which means read news.The t" inits name stands for threaded".It was written by Wayne Davidson.Unlike tin, trn has no provision for generating its threading database at run-time.Instead, ituses those prepared by a program called mthreads that has to be invoked regularly from cron toupdate the index les.Not running mthreads, however, doesn't mean you cannot access new articles, it only means youwill have all those Novell buys out Linix!!" articles scattered across your article selection menu,instead of a single thread you may easily skip.To turn on threading for particular newsgroups, mthreads is invoked with the list of newsgroupson the command line.The list is made up in exactly the same fashion as the one in the sys le:mthreads comp,rec,! rec.games.gowill enable threading for all of comp and rec, except for rec.games.go people who play Go don'tneed fancy threads.After that, you simply invoke it without any option at all to make it threadany newly arrived articles.Threading of all groups found in your active le can be turned on byinvoking 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 needed.Sites that have very heavy tra c may want torun mthreads in daemon mode.When it is started at boot time using the -d option, it puts itselfin the background, and wakes up every 10 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 -deavThe -a option makes mthread automatically turn on threading for new groups as they are created;-v enables verbose log messages to mthreads ' log le, mt.log in the directory where you have trninstalled.Old articles no longer available must be removed from the index les regularly.By default, onlyarticles whose number is below the low water mark will be removed.5 Articles above this numberwho have been expired nevertheless because the oldest article has been assigned an long expirydate by an Expires: header eld may be removed by giving mthreads the -e option to force anenhanced" expiry run.When mthreads is running in daemon mode, the -e option makes it put insuch an enhanced expiry run once a day, shortly after midnight.5Note that C news doesn't update this low water mark automatically; you have to run updatemin to doso.Please refer to chapter 17.19.3.nn Con guration 30519.3 nn Con gurationnn, written by Kim F.Storm, claims to be a newsreader whose ultimate goal is not to read news.It's name stands for No News", and its motto is No news is good news.nn is better."To achieve this ambitious goal, nn comes along with a large assortment of maintenance tools thatnot only allow generation of threads, but also extensive checks on the consistency of these databases,accounting, gathering of usage statistics, and access restrictions.There is also an administrationprogram called nnadmin, which allows you to perform these tasks interactively.It is very intuitive,hence we will not dwell on these aspects, and only deal with the generation of the index les.The nn threads database manager is called nnmaster.It is usually run as a daemon, startedfrom the rc.news or rc.inet2 script.It is invoked asusr local lib nn nnmaster -l -r -CThis enables threading for all newsgroups present in your active le.Equivalently, you may invoke nnmaster periodically from cron, giving it a list of groups to actupon.This list is very similar to the subscription list in the sys le, except that it uses blanksinstead of commas.Instead of the fake group name all, an empty argument of "" should be used todenote all groups
[ Pobierz całość w formacie PDF ]