🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by Craig Dewick Wed, 09 Apr 1997 00:00
Cleaning out news spool directories after changing expire.ctl
#16839
Author: Craig Dewick
Date: Wed, 09 Apr 1997 00:00
46 lines
2679 bytes

The news spool on my server (running SunOS 5.5.1 and Inn 1.5.1) keeps
filling up, and after manually looking through some of the directories in
the news spool, I've found something strange.

I've recently done some tuning of the expire.ctl file (inn 1.5.1), and I
found that after the completion of the first run of expire following my
changes to expire.ctl, lots of articles have been left behind that should
have been deleted because they are very definitely too old.

As an example, in one directory for a newsgroup, I changed the default
expire setting from 10 to 4 days, and I noticed that there were articles
that arrived during December, January, Febraury and March still in the
directory. They weren't all in one contiguous group of article numbers
either.

My presumption is that these articles are somehow being removed from the
history file, and then they exist in limbo because expire doesn't know they
still exist (because they're not in the history file), so they won't get
deleted. Does this sound like a plausible theory? How could they get removed
from the history file and not be deleted though? Something wrong with expire
in a previous release of Inn prior to 1.5.1?

I don't think my tuning of expire.ctl has necessarily resulted in all these
old articles getting left behind, since some of them date back to last year
and early this year. Something else must have happened along the way.

So, is there a way with something in the inn package to go through the
entire news spool and purge all articles that are really, really old and
appear to be getting left behind and ignored? My news server only takes
about 210 newsgroups, but I don't feel like manually going through every
directory looking for very old articles which should have been removed when
they expired. 8-)

Any suggestions?

Regards,

Craig.
-- 
            Craig Dewick. Send email to 'cdewick@lios.apana.org.au'
   Point a web browser at 'http://lios.apana.org.au/~cdewick/sun_ark.html' to
       access my collection of Sun information and links to other places.

Re: Cleaning out news spool directories after changing expire.ctl
#16948
Author: Joerg Lehners
Date: Mon, 14 Apr 1997 00:00
100 lines
3201 bytes
In <5ifodh$1m0$1@lios.apana.org.au> cdewick@lios.apana.org.au (Craig Dewick) writes:
>[... old article files left ...]
>My presumption is that these articles are somehow being removed from the
>history file, and then they exist in limbo because expire doesn't know they
>still exist (because they're not in the history file), so they won't get
>deleted. Does this sound like a plausible theory? How could they get removed
>from the history file and not be deleted though? Something wrong with expire
>in a previous release of Inn prior to 1.5.1?

I think you have a glitch in your expire setup.

>[...]
>So, is there a way with something in the inn package to go through the
>entire news spool and purge all articles that are really, really old and
>appear to be getting left behind and ignored? [...]

I'm slightly paranoid and I'm using the following script once in a week:

#!/bin/sh
#
# ~news/local/checkold		Joerg Lehners, March 1997
#				Joerg.Lehners@Informatik.Uni-Oldenburg.DE
#
##  =()<. @<_PATH_SHELLVARS>@>()=
. /usr/local/lib/inn/bin/innshellvars
#
PROGNAME=${0}
LOG=${MOST_LOGS}/checkold.log
#
REASON='checkold running'
#
echo "${0}: starting."
#
# ctlinnd throttle ${REASON}
${NEWSLIB}/local/throttle ${REASON}
#
cd ${SPOOL}
#
find . -type f -mtime +14 -print 2>/dev/null |
while read FILE
do

  if [ ! -f ${FILE} ] ; then
    continue
  fi

  echo -n "${FILE} "
  MSGID=`sed -n -e '
/^$/q
/^Message-ID: /{
        s/.*: *\(.*\)/\1/p
        q
}' ${FILE}`

  if [ X"${MSGID}" = X ] ; then
    echo "NO Message-ID"
    rm -f ${FILE}
    continue
  fi

  echo -n "${MSGID} "

  case `grephistory ${MSGID} 2>&1` in
    [nN]ot*   ) GONE=true ;;
    /dev/null ) GONE=true ;;
    ''        ) GONE=true ;;
    *         ) GONE=false ;;
  esac

  if [ "${GONE}" = true ] ; then
    rm -f ${FILE}
    echo "REMOVED"
  else
    echo
  fi

done > ${LOG}
#
ctlinnd go ${REASON}
ctlinnd renumber ''
#
echo "${0}: done."


The script checks all articles older a certain date and removes them
when it can't find an entry in the history db.

You probably want to tweak the '+mtime <days>' value, or else lots
of good articles will be checked unnecessarily.

Don't forget to check the log file.

  Joerg
-- 
Mail: Joerg.Lehners@arbi.Informatik.Uni-Oldenburg.DE
Real: Joerg Lehners, FB 10 Informatik ARBI, Uni Oldenburg, D-26111 Oldenburg
Unwoerter: Kostensenkung - Gewinnmaximierung - billig, billig, billig

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