home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
networking
/
uucp
/
amigauucpsupport
/
trimspool
/
trimspool.doc
next >
Wrap
Text File
|
1994-06-29
|
19KB
|
566 lines
"TrimSpool"
User Documentation
##################
## ## ##
#### ### #####
#### #### ####
#### ##### ###
#### ###### ##
#### ### ###
##################
Version 1.0
(The "Singing For Mothra / Monster Zero" Release)
by Gregg Giles
Copyright © 1994 by Gregg M. Giles
06.04.1994
-----------------------------------------------------------------------
PUBLIC RELEASE VERSION - FREEWARE - SPREAD AT WILL - POPULATE THE EARTH
-----------------------------------------------------------------------
###########################################################################
#
# Purpose
#
###########################################################################
TrimSpool is designed as an aid to those running a system receiving a
UseNet feed. Simply, its purpose it to scan through the spool directory and
delete any files equal to or over a certain age (in days) specified by you.
If you run AmigaUUCP 1.16 or earlier, you'll know that there is no easy
way to have any bad or unprocessed mail packets deleted for you - more
often than not, you have to go through the spool directory manually and
delete old mail packets. TrimSpool was written to keep you from having to
do that.
For a complete list of improvements since the last version of this
program, see the section "Revisions & Planned Enhancements".
###########################################################################
#
# Features
#
###########################################################################
TrimSpool has the following features:
* Permits trimming files equal to or over a certain age (in days) specified
* Permits you to specify the spool directory to process
* Can be run from any script (ideal for use with BBS systems)
* Quiet operation possible
* Debugging features built-in for reporting problems to the author
###########################################################################
#
# Requirements
#
###########################################################################
In order to use TrimSpool, you must have the following:
* An Amiga computer
* An active UseNet feed with UUCP software installed and working. (The
"AmigaUUCP" package by Matt Dillon will permit you to connect your
system to another UseNet system - see that package for details or ask
your local Internet guru for help.)
* Workbench 2.0 or better
* ARexx (must be installed - see your Amiga manual for details)
* The "TrimSpool.rexx" ARexx script (supplied)
What you do NOT need to use TrimSpool:
* TrimSpool does NOT require any special BBS package. It can, however, be
used with ANY bulletin board system package with no problems. (TrimSpool
operates completely independently of both AmigaUUCP and any BBS software
which you may have in operation.)
* TrimSpool does NOT require any special registration keys to work.
###########################################################################
#
# Installation
#
###########################################################################
TrimSpool can be run from anywhere. For best results, ensure that it is
located in a directory within your machine's search path. An ideal location
is in your C: directory.
There are no other requirements for installation.
###########################################################################
#
# Usage
#
###########################################################################
TrimSpool is not currently executable from the Workbench, so it must be
used from the Shell. The usage for this program is:
rx TrimSpool SOURCE <spool_dir> DAYS <days> [DEBUG=<level>] [QUIET]
For further details on what each of these command line parameters do,
see the section titled "Command Line Flags".
###########################################################################
#
# Command Line Flags
#
###########################################################################
The program makes use of command line "flags", also known as command
line "arguments", which will greatly enhance the program's utility and
power. Flags are not case sensitive, but must be spelled correctly to be
understood by the program.
The current flags available are:
###########################################################################
# DAYS
###########################################################################
Flag Name : DAYS
Template : DAYS <days>
Default : n/a
Description:
Specifies the cut-off age in days which TrimSpool will use to delete files
from the spool directory. Any files which were received or created by your
system and have an age (in days) equal to or older than this specified date
will be deleted. Caution: if you have any outbound mail which has not been
processed, it will also be subject to deletion.
WARNING: A "DAYS" value of 1 will delete *all* files in your spool
directory! Use this value with extreme caution, and *only* after you are
positive that you have properly delivered and processed all incoming and
outgoing mail, and that you are aware that any log files stored in your
spool directory will be deleted.
As a safety precaution (please read the section titled "Mail Processing
While Running TrimSpool"), it is recommended that you set your DAYS value
to no fewer than 3 days when running TrimSpool from a Cron. The recommended
expirate age is 7 days. Only use a value below 3 if you are positive that
your incoming and outgoing UseNet mail is being properly processed by your
system.
CAUTION: If you value any UUCP logfiles which are stored in spool, it's a
good idea to back them up before they fall victim to old age and are
deleted by TrimSpool (it's a good idea to back up your logfiles nightly if
you want to keep them for future reference).
###########################################################################
# DEBUG
###########################################################################
Flag Name : DEBUG
Template : DEBUG=<debugging_level>
Default : DEBUG=0
Description:
When supplied, debugging information is displayed on the screen. A value
of 1-9 must be supplied; the higher the number, the more verbose the output
will be. The following values will yield the following results:
0 No debugging output (default)
1 Display name of data files and source directorie
2 <not implemented>
3 <not implemented>
4 <not implemented>
5 Show file information, keyword stubs, variable values
6 Show library and file openings and closings, display function calls,
important comments
7 <not implemented>
8 <not implemented>
9 <not implemented>
Note: when any debugging level greater than 0 is active, no files will be
deleted, even if they are equal to or older than the specified expiration
date given with the DAYS parameter. This is done so that a user may
successfully get debugging information without harming the files in
question.
###########################################################################
# SOURCE
###########################################################################
Flag Name : SOURCE
Template : SOURCE <spool_dir>
Default : n/a
Description:
Specifies the source directory (your system's spool directory) which
TrimSpool will examine. This value may be either a complete drive/path name
or a logical assignment (ie: "sys:"). If you specify a directory, it isn't
necessary to end it with a slash, since TrimSpool will check for this and
add one if absent.
###########################################################################
# QUIET
###########################################################################
Flag Name : QUIET
Template : QUIET
Default : n/a
Description:
Suppresses all screen output, with the exception of error messages.
Debugging information is not effected by the QUIET flag.
###########################################################################
#
# Usage Examples
#
###########################################################################
The following example will run TrimSpool as a background task, and will
delete any files in the specified spool directory that are equal to or over
3 days old:
run rx TrimSpool SOURCE <spool_dir> DAYS 3
The following example will display no output (except for any error
messages) to the Shell; any files in your spool directory equal to or older
than 3 days will be deleted:
rx TrimSpool SOURCE <spool_dir> DAYS 3 QUIET
The following example will display debugging information which can be
used to report problems to the program author (note: when debugging is
active, the files in the spool directory will not be deleted, even if they
are equal to or older in age than the specified expiration date given by
the DAYS parameter):
rx TrimSpool SOURCE <spool_dir> DAYS 6 DEBUG=5
###########################################################################
#
# Script File Usage
#
###########################################################################
TrimSpool can be run from an AmigaDOS or ARexx script. In an AmigaDOS
script, add the line:
rx TrimSpool SOURCE <spool_dir> DAYS 5
In an ARexx script, add the line:
address command 'rx TrimSpool SOURCE <spool_dir> DAYS 5'
... where SOURCE is your spool directory. You will need to fill in the
<spool_dir> value with the appropriate directory name or assignment.
###########################################################################
#
# Running TrimSpool From A Cron
#
###########################################################################
TrimSpool can be run from a Cron just like any normal ARexx script. This
can be useful if you are running a system which receives a large amount of
mail, and you need to ensure that you have as much storage free as possible
(since old mail in the spool directory can often accumulate). See your
Cron's documentation for details.
It is recommended that you run TrimSpool at least once per week, if not
more frequently. The recommended minumum expiration age is 3 days (see the
section titled "Mail Processing While Running TrimSpool" for details).
The following example is placed within the "EventList.TAB" file used by
Matt Dillon's "CyberCron" event handler; it runs TrimSpool every Sunday
(day 0) midnight, deleting all files equal to or over 7 days old:
0 0 0 * * rx TrimSpool SOURCE <spool_dir> DAYS 7
The next example also uses CyberCron, and runs TrimSpool at 18:00, every
Tuesday (day 3) and Saturday (day 6) evening, deleting all files equal to
or over 3 days old:
0 18 3,6 * * rx TrimSpool SOURCE <spool_dir> DAYS 3
Note that TrimSpool's processing time is completely dependent upon how many
files must be processed as well as your system speed.
###########################################################################
#
# Troubleshooting
#
###########################################################################
It is possible that you will encounter an error in some form or another
during your use of this program. All error messages generated by the
program are listed and explained below.
Message : "Error: cannot open rexxsupport.library"
Explanation: The ARexx library "rexxsupport.library" could not be opened.
What to do : Ensure that the file "libs:rexxsupport.library" exists. If it
does and you still experience this problem, panic. :)
Message : "Error: couldn't get file information on <filename>"
Explanation: The file being examined was probably in use
What to do : Nothing. Odds are that the file which TrimSpool is trying to
get information on is a temporary file being received by your
system. (Since it is a new file, there really is no problem to
worry about.)
Message : "Error: invalid DAYS value supplied"
Explanation: The command line argument "DAYS" was given a bad value.
What to do : Use a value of 1 or greater (see section titled "Command Line
Flags" and "Mail Processing While Running TrimSpool" for more
details about the DAYS flag).
Message : "Error: invalid DEBUG value - not displaying debug information"
Explanation: The command line argument "DEBUG" was given a bad value.
What to do : Use a debugging value of 1-9 (see section titled "Command Line
Flags" for more details about the DEBUG flag).
Message : "Error: no source directory specified"
Explanation: No source directory was given at all.
What to do : Specify your source directory using the "SOURCE" flag. See the
section titled "Command Line Flags" for details on how to use
this flag.
Message : "Error: source directory doesn't exist (<directory name>)"
Explanation: The specified source directory doesn't exist
What to do : Check to make sure you gave the correct path and spelling for
your source directory. Next make sure that the directory
actually exists.
###########################################################################
#
# Mail Processing While Running TrimSpool
#
###########################################################################
If you're concerned about TrimSpool harming unprocessed mail, or about
running TrimSpool while your system is receiving mail, don't be. It is
assumed that you process your inbound mail on a regular basis, generally
immediately after a UUCP session has completed; if you do this, then you
are safe. Since TrimSpool is usually told to work only on old files, it
is not possible for it to harm new inbound or outbound mail.
If you would like to test TrimSpool without harming your spool files
just to convince yourself it works, issue this command (where <spool_dir>
is your spool directory, and you want to delete any files equal to or older
than <x> days):
rx TrimSpool SOURCE <spool_dir> DAYS <x> DEBUG=1
The above command will process all files in your spool directory
normally, but it will not delete them. The age of each file is displayed
during the directory processing, proving that it's doing what it's supposed
to be.
CAUTION: TrimSpool can really only delete unprocessed incoming or
outgoing mail if something prevents your mail from being processed or
delivered properly. If your incoming or outgoing mail sits around in your
spool for long enough for some reason, it is quite likely that it will fall
victim to old age and be deleted by TrimSpool. Your unprocessed mail could
fall victim to old age for one of these reasons:
1) Your inbound mail isn't being processed properly by your system,
builds up in your spool directory, and thereby ages itself.
2) Your outbound mail isn't being delivered properly to your host system
due to some technical problem (your feed goes down, your system goes
down, problems connecting with the feed, etc.), collects in your
spool directory, and thereby ages itself.
There is nothing that can be done about this except making sure that
your system operates properly and that all incoming and outgoing mail is
processed on time. As a safety, it is discouraged to use an expiration age
of one day - three days is actually a recommended minimum, and seven days
is a safe setting to use (if your system is working correctly and hasn't
been able to process a mail packet for seven days, chances are pretty
darned good that the mail packet is bad). :)
###########################################################################
#
# Program Background
#
###########################################################################
I got sick of having to delete old, unprocessed (error) mail piling up
in my spool directory manually, I couldn't find a utility to do it for me,
and I was bored, so I wrote this. :)
###########################################################################
#
# Revisions & Planned Enhancements
#
###########################################################################
The following changes have been made to this program since the previous
version:
* No previous version.
Known bugs in this version:
* None.
Planned Enhancements:
* None planned, unless somebody wants them.
###########################################################################
#
# Legalese
#
###########################################################################
This program is freeware and may be copied and distributed freely
without the consent of the author for non-commerical purposes where no
charge is made for the copying or distribution of this program.
Commerical sale or use, duplication, distribution, or modification of
this program is forbidden without the consent of the author.
The following people and organizations are entitled to include this
program in their public domain collections as a thank-you for all of the
work they have done to promote the Amiga and provide scum like us with
decent public domain software:
* Fred Fish
* AmiNet (all sites)
* Walnut Creek CD-ROM [Restriction: I must receive one copy of any
CD-ROM on which this utility appears since it is copyright.]
* Amiga Atlanta, Inc.
* Eugene/Springfield Amiga Users' Group (ESAUG)
* All other Amiga users' groups
###########################################################################
#
# Contacting The Author
#
###########################################################################
To contact the author of this program, use any of the following addresses:
US Mail Address : Gregg Giles
3330 Kinsrow 217
Eugene, OR 97401-8824 USA
FidoNet NetMail : 1:152/18 as "Sysop" (Sensory Overload BBS)
Internet Mail : ggiles@so.efn.org (your best best)
ggiles@efn.org (forwarded)
ggiles@cie-2.uoregon.edu (forwarded)
If those fail, try these last resort addresses...
ggiles@cie.uoregon.edu
ggiles@greylady.uoregon.edu
Sensory Overload: 503-484-1281, 14.4 kbps as "Sysop"
Donations and contributions will be accepted, but are not demanded.
###########################################################################
#
# Thanks For Inspiration/Entertainment
#
###########################################################################
LA Style, Wiz 'N' Liz, Red Dwarf, the fruit I'm eating at the moment and
can't remember the name of, that stupid Godzilla movie with those goofy
Japanese girls singing to Mothra, and Monster Zero.