Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site mecc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!stolaf!umn-cs!mmm!rosevax!dicomed!mecc!sewilco From: sewilco@mecc.UUCP (Scot E. Wilcoxon) Newsgroups: net.news Subject: Re: subscribers script Message-ID: <360@mecc.UUCP> Date: Mon, 23-Sep-85 11:56:51 EDT Article-I.D.: mecc.360 Posted: Mon Sep 23 11:56:51 1985 Date-Received: Mon, 30-Sep-85 01:08:41 EDT References: <2161@ukma.UUCP> <2166@ukma.UUCP> <619@decuac.UUCP> <405@persci.UUCP> <2217@ukma.UUCP> Reply-To: sewilco@mecc.UUCP (Scot E. Wilcoxon) Organization: MN Ed Comp Corp, St. Paul, MN Lines: 38 Keywords: stat st_atime file status Summary: Additional reader detection by article file status In article <405@persci.UUCP>, bill@persci.UUCP writes: > All this discussion about .newsrc reading script presupposes that every user > maintains his .newsrc file. That is not true at this site. Some people are > subscribed to *everything* and never read news, others drop in on newsgroups > as they will, never subscribing/unsubscribing. I've been designing an automatic news feed blocker (more later) which has to know which groups are NOT being read. In my ignorance, I assumed that .newsrc might not be valid so I looked for another way to globally detect a group which is not being read. The "time last accessed" (st_atime in stat) lets you detect an article which has been read since the "time last modified" (st_mtime). Normally, an article is only written when it is created so st_mtime is time of creation. An article which has never been read will have st_atime == st_mtime. An unread newsgroup is one in which no articles have been read. However, news reading programs which use the "active" file might not bother scanning a newsgroup which has had no articles posted. So the stat information is only valid when a group has articles stored, thus a program to scan the groups probably should be run just before "expire" is run. A variation on the theme is checking if the group's directory has been accessed since it was modified. This can detect a news reader scanning a directory for expected articles, even if the directory is empty. On a site which is passing on batched news, the news batcher does "read" the articles which it passes on. That is a desirable side effect for my application. Possibly not for yours... Note that detecting a group which is not being read can be a slightly different problem than detecting one which is being read. It's a matter of whether it is safer to detect too few or too many groups of the desired status. -- Scot E. Wilcoxon Minn. Ed. Comp. Corp. circadia!mecc!sewilco 45 03 N / 93 15 W (612)481-3507 {ihnp4,uwvax}!dicomed!mecc!sewilco Brought to you by Super Global Mega Corp .com