SetExpire 1.0 - Documentation
*****************************

Copyright
*********

   SetExpire (C) 1995 kMel, Klaus Melchior

   This program is freely distributable, but copyrighted by me. This
means you may freely copy it as long as you do not charge more than a
nominal fee for copying. This program may be put on PD disks,
especially on Fred Fish's CDROMs, Meeting Pearls CDs or other cheap
CDROMs. If you want to distribute this program you MUST keep this
document with it. The program and the documents must be distributed in
their original unmodified form.

   This program cannot be used for commercial purposes without written
permission by the author.  The author can not be made responsible for
any damage which is caused by using this program.


-----------------------------------------------------------------------
This program is GiftWare. If you like it and use it regularly, you
should consider to send a small donation to the author in order to
honor the work he has put into this program.
-----------------------------------------------------------------------

   Send comments, suggestions or bug reports, and the gifts to:

     Klaus Melchior, Schulstrasse 17
     D-52156 Monschau, Germany
     Phone: +49 (0)2472 4710
     
     DE:   kmel@eifel.tng.oche.de
     BIG:  kmel@et1.etechnik.fh-aachen.de
     ADSP: kmel@eifel.adsp.sub.org
     FIDO: 2:242/158.2@fidonet

What is SetExpire ?
*******************

   SetExpire is an UMS tool, which scans the message base for
non-expired messages and expires them.

   * different list for groups and folders

   * messages can be expired by age, number or size

   * groups or folders are selected by pattern matching

   * a report can be sent

   * preference is stored in 'ums.config'

   * UMS V11 tool

   SetExpire uses different lists for the mail of the users and the news
of the system. Users are asked which mails they want to expire, these
messages are checked, all other users must allow the expiration.
Users, which have not this mail list variable, can't expire any mails.

   SetExpire expires messages, which are not expired, not deleted, not
archived, exported and read. With options you can allow SetExpire to
expire archived, not exported or not read messages (see: Installation).

   SetExpire can be switched in Test, Delay or/and Quiet mode (see:
Arguments).

   A command to clear the expire flag on every message is supported
(see: Arguments).

CLI arguments
*************

   TEMPLATE:
     USER=NAME/A,PASSWORD/A,SERVER/K,
     CLEAREXPIRED/S,
     TEST/S,DELAY/K/N,QUIET/S

CLEAREXPIRED/S
     comand, clears expire flag of expired messages

DELAY/K/N
     use SetExpire as background task, all actions are delayed, low task
     priority, set here the time for Delay() in 1/50 sec

PASSWORD/A
     password of the user

QUIET/S
     no output text

SERVER/K
     name of the server, optional

TEST/S
     switches SetExpire into test mode, no messages are expired

USER=NAME/A
     name of the user with sysop access

What you need !
***************

   - Kickstart >= 2.0

   - Workbench >= 2.0

   - UMS (Universal Message System) >= v11 (see: References)

   - Several additions in 'ums.config' (see: Installation)

How to install
**************

Binaries
========

   Copy the "UMS/bin/" files to a place where all the executables of UMS
are stored, normally this is "UMS:bin/" or "Mail:bin/".

     copy UMS/bin/#? Mail:bin/

UMS config
==========

   These are the global UMS config variables.

SetExpire.News
     Expirelist of the news groups, pattern is related to the name of
     the group

SetExpire.Mails
     Expirelist of mail-folders, pattern is related to the folder name,
     all user without an own "SetExpire.Mails" variable use this one

   These UMS config variables should be set local to every user:

SetExpire.Mails
     Expirelist of mail-folders, pattern is related to the folder name

Expire lines
============

   'SetExpire.Mails' and 'SetExpire.News' could contain several lines
with a pattern, the kind of expire and a number. Options follow them
like arguments.

   One condition per line, at least three arguments. All arguments must
be seperated with at least one space.

     <Pattern> <Expire kind> <Number> [Options]

   A ; in front of marks the line as comment.

Expire kind
===========

days
     Message will be expired, wich are older than specified days.

msgs
     Specified number of messages are left the message base, the others
     are expired.

size
     Set here the maximum size in bytes of the messages, which should
     stay in message base.

     Every line can contain more then one kind of expiration, then every
     group or folder is expired in a fixed sequence: 'days' -> 'msgs' ->
     'size'.

Recognized Options
==================

New
     Also new messages can be expired.

NotExported
     Messages, which are not exported, can be expired.

Archive
     Messages with the archive flag can be expired, too.

Example
=======

     ( SetExpire.News
         "adsp.#?                           days    14\n"
         "eifel.#?                          days    14 New Archive\n"
         "; comment\n"
         "fidonet.AMIGA.GER                 msgs   500\n"
         "#?                                days     2\n"
     )
     ( SetExpire.Mails
         "#?                                days     0\n"
     )
     ( SetExpire.ReportUser sysop )
     ( SetExpire.ReportFolder report )
     
     ( Exporter
         ( Name downtown )
         ( SetExpire.Mails
             "music.alstewart                   days     7 New\n"
             "music.#?                          days    14\n"
             "report                            days     3 msgs 100 New\n"
             "forwarder                         size 10000 New\n
             "#?                                days    14\n"
         )
         ( ... )
     )

History of SetExpire
********************


           26.03.95  * initial
                     * first working version
     
           27.03.95  + documentation
      0.1            * beta to wowbagger
     
           28.03.95  + messages to expire: check deleted flag
     
           02.04.95  + check exporter
                     - fixed bug in 'expire number of msgs' routine
                     + local UMS variable SetExpire.Mails [kb]
                     + removed SetExpire.Users [kb]
                     + check all users found with CfgNextUser
     
           03.04.95  + check to-expire-mails if no user needs them [mh]
                     + SetExpire.UserFlag
      0.2            * beta to wowbagger
     
           14.04.95  + use link library, save about 2 kbytes
     
           15.04.95  - mails: no user login anymore
                     - removed SetExpire.Userflag variable
                     - fixed bug in display routinge [kb]
                     + rewritten folder-expire-routine
                     - NOPROGRESS/S removed
                     + QUIET/S implemented
                     + SetExpire.ReportUser, SetExpire.ReportFolder
                     + report can be written
      0.3            * beta to wowbagger
     
           17.04.95  + check sysop access [op]
     
           20.04.95  - really removed NOPROGRESS/S [rg]
     
           23.04.95  - changed return values [ms]
     
           17.07.95  + support of FlexIcons
     
      1.0  19.07.95  * first release

What is to do in future ?
*************************

   - new expire with size routines

   - delay routines

   - CTRL-C handling

   - command to expire whole message base to shrink it into a specified
     size

References
**********

UMS
     UMS - Universal Message System (c) Copyright 1992-95 by Martin
     Horneffer

     Aminet: comm/ums/      *Note* v11 is only available as public beta

Thanks are going to ...
***********************

   - Martin Horneffer [mh] for UMS

   - Kai Bolay [kb], Olaf Peters [op], Ralf Garbade [rg], Matthias
     Scheler [ms]

   - and all I forgot to mention ...

Index
*****



 Arguments                              Arguments
 Authors address                        Copyright
 Bug reports                            Copyright
 Changes in 'ums.config'                Installation
 CLI arguments                          Arguments
 Comments                               Copyright
 Copyright                              Copyright
 Credits                                Credits
 Description                            Description
 Distribution                           Copyright
 E-Mail                                 Copyright
 GiftWare                               Copyright
 History                                History
 Installation                           Installation
 References                             References
 Requirements                           Requirements
 SetExpire                              Description
 Template                               Arguments
 Thanks                                 Credits
 ToDo                                   ToDo
 UMS variables                          Installation

