🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
4 messages
4 total messages Started by Elizabeth Zaenger Fri, 04 May 2001 14:50
Expire with cnfs
#52161
Author: Elizabeth Zaenger
Date: Fri, 04 May 2001 14:50
31 lines
2478 bytes
OK, here's something that keeps coming up for me.  I am running 2.3.1,
cnfs, tradindexed overview.  Things are working well, but at the end
of each semester, I am asked to "expire" all current articles in a class
newsgroup, so they can start clean.  The buffers for the class newsgroups
are big enough so that they essentially "never" expire, so this means I 
need to do it by hand.

So, how do I?  I have groupbaseexpiry set to "false" (I saw Russ's answer
to someone else about that last month or so).  I also currently have *all* of 
our local groups (not just class groups) in one cycbuff, although I *could*
put the class groups in one cycbuff by themselves, and expire all of them at
the end of the term.  If I change them from the current cycbuff to a new one,
would that just entail updating cycbuff.conf and storage.conf?  Would I "lose"
all the current postings, or would news still be able to track them, while
using the new cycbuff?  And *how* do I do the expiry on a single cycbuff if 
I do re-arrange things?

Right now, I rmgroup and newgroup the class groups as requested, but then I
also lose any "new" postings that have been made.  I would like to be able
to expire the articles based on posting dates (MessageID's would be cumbersome,
since there are lots of articles in these groups).  Oh, and currently, I only
expire the class newsgroups as requested--if I could continue to do that (I'm
willing to expire them all en masse if I gotta) that would be best.

Thanks!
-- 
Elizabeth Zaenger, Unix Support
Departmental Computing Organization
University of Michigan, Electrical Engineering and Computer Science Dept.
Re: Expire with cnfs
#52170
Author: Russ Allbery
Date: Fri, 04 May 2001 23:25
81 lines
4537 bytes
Elizabeth Zaenger <liz@eecs.umich.edu> writes:

> OK, here's something that keeps coming up for me.  I am running 2.3.1,
> cnfs, tradindexed overview.  Things are working well, but at the end
> of each semester, I am asked to "expire" all current articles in a class
> newsgroup, so they can start clean.  The buffers for the class newsgroups
> are big enough so that they essentially "never" expire, so this means I 
> need to do it by hand.

> So, how do I?  I have groupbaseexpiry set to "false" (I saw Russ's
> answer to someone else about that last month or so).

In that case:

 - Create a new entry just for the class newsgroups in storage.conf and
   give it its own class number.  You can continue to store them in the
   same cycbuff as your other groups; it just needs to have a different
   class.

 - Add a line like:

       <class>:0:150:150

   to expire.ctl where <class> is that new class number.  This will keep
   all of the messages in class newsgroups for 150 days by default.  You
   should also add rules for all of your other storage.conf class numbers
   with expiration times significantly longer than the cycbuff rollover
   rate so that you don't prematurely expire any other articles.

 - Add flags="-v1 -N" to the command line of your news.daily invocation in
   cron.  The -N flag says to use expire.ctl rules for CNFS articles
   (normally expire.ctl is ignored for CNFS because it's cyclic), allowing
   expire to "prematurely" remove articles before they've been overwritten.

 - At the end of each semester, edit expire.ctl and change :150:150 to
   :5:5.  All articles older than five days will then be expired in the
   next run of expire, and the next day you can change it back.

> I also currently have *all* of our local groups (not just class groups)
> in one cycbuff, although I *could* put the class groups in one cycbuff
> by themselves, and expire all of them at the end of the term.

That's another alternative, yes.

> If I change them from the current cycbuff to a new one, would that just
> entail updating cycbuff.conf and storage.conf?

And restarting INN.  Right.

> Would I "lose" all the current postings, or would news still be able to
> track them, while using the new cycbuff?

You wouldn't lose any of the current postings (they'd continue to be
available until cancelled, expired, or overwritten).

> And *how* do I do the expiry on a single cycbuff if I do re-arrange
> things?

Well, the dirty way is to stop INN, zero out the cycbuff with dd or the
like, and then start INN again.  The next run of expire will then clean up
all of the overview information.

> Right now, I rmgroup and newgroup the class groups as requested, but
> then I also lose any "new" postings that have been made.  I would like
> to be able to expire the articles based on posting dates (MessageID's
> would be cumbersome, since there are lots of articles in these groups).
> Oh, and currently, I only expire the class newsgroups as requested--if I
> could continue to do that (I'm willing to expire them all en masse if I
> gotta) that would be best.

Unless you're using groupbaseexpiry, you have to assign a storage class
number to every set of postings you want to set a different expiration
time for.  So you could do that and just set a separate class number for
every class newsgroup, but you may run out of storage classes.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Expire with cnfs
#52480
Author: bill davidsen
Date: Wed, 23 May 2001 22:04
50 lines
3246 bytes
In article <watwv7x2mot.fsf@che.eecs.umich.edu>,
Elizabeth Zaenger  <liz@eecs.umich.edu> wrote:
| 
| OK, here's something that keeps coming up for me.  I am running 2.3.1,
| cnfs, tradindexed overview.  Things are working well, but at the end
| of each semester, I am asked to "expire" all current articles in a class
| newsgroup, so they can start clean.  The buffers for the class newsgroups
| are big enough so that they essentially "never" expire, so this means I 
| need to do it by hand.
| 
| So, how do I?

  One server, right? If I had to do this, I would be tempted to take the
overview file, using 'getover' or similar, use 'cut' to extract the
Message-ID info, and then use shell/perl/sed to generate a script file
of ctlinnd commands for local cancel.

How easy is this? A three line script to take the names of the groups
and generate the output you need to cancel all the articles.
================================================================
deathstar:news> cat cancel.tmp
NewsServer="newssvr10"
getover ${NewsServer} "$@" | cut -f5 |
xargs -i /bin/echo ctlinnd cancel \"{}\"

deathstar:news> sh cancel.tmp local1.test local2.test >y.tmp
Getting local2.test
Getting local1.test

deathstar:news> head -10 y.tmp
ctlinnd cancel "<8tn1oh$5di0$1@newssvr04-int.news.local1.com>"
ctlinnd cancel "<3A07103D.AEEC8215@local1.net>"
ctlinnd cancel "<8ujh2g$coog$1@newssvr06-en0.news.local1.com>"
ctlinnd cancel "<8ujonv$eka8$1@newssvr06-en0.news.local1.com>"
ctlinnd cancel "<3A15BEF4.1020106@local1.net>"
ctlinnd cancel "<3A15D77E.9090106@local1.net>"
ctlinnd cancel "<3A24F6B7.5DE7A94D@local1.net>"
ctlinnd cancel "<3A253478.356C773D@local1.net>"
ctlinnd cancel "<3A25C9B0.7BE6AFD7@local1.net>"
ctlinnd cancel "<909127$ci4e$1@newssvr06-en0.news.local1.com>"
================================================================

  If you have a lot of cross-posting you can put a "sort -u" before the
xargs, just don't run out of temp space.

-- 
  bill davidsen <davidsen@tmr.com>  CTO, TMR Associates, Inc
"I am lost. I am out looking for myself. If I should come back before I
return, please ask me to wait."  -seen in a doctor's office
Re: Expire with cnfs
#52492
Author: those who know me have no need o...
Date: Wed, 23 May 2001 23:05
9 lines
1039 bytes
<9ehc4h$1fd4$1@newssvr05-en0.news.prodigy.com> divulged:

>xargs -i /bin/echo ctlinnd cancel \"{}\"

i think you'd need ' to be safe.

-- 
okay, have a sig then
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads