home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
pofamuup.zip
/
POFAMU.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
2000-06-08
|
16KB
|
373 lines
ΓòÉΓòÉΓòÉ 1. PMMAIL Offline Folder Archive and Maintenance Utility ΓòÉΓòÉΓòÉ
This program is for the 'offline' maintenance of PMMAIL folders, meaning that
PMMAIL should not be running when it is invoked. It is designed for
user-programmers; i.e., not for the GUI-bred. The program is directed almost
entirely from a control file.
The program allows the user to specify selection criteria for mail messages
using the fields maintained by PMMAIL in its index files. These criteria are
assigned Reserved Names by POFAMU such as From_name, From_addr and are used to
form boolean expressions. These expressions are assigned user identifiers
called Spec-names. These Spec-names are used to assign specified actions to
selected groups of messages.
Support has been added to attempt to accomodate users of PMMail version 1.53
which has an ACCT.CFG file rather ACCT.INI.
What I would recommend is running this utility at some fixed interval (weekly
or so), rather than waiting until you are overrun with mail. I run it 3 times a
week (probably more than necessary) as part of a CRON arrangement.
ΓòÉΓòÉΓòÉ 2. Installation ΓòÉΓòÉΓòÉ
This isn't a GUI program, so I haven't considered building a desktop object for
it, as part of installation. Just copy POFAMU.EXE to any directory in your
PATH statement. You might want to copy a program template to the desktop and
build an object that references your 'daily' control file in the Parameters
field. Also copy CWIND.EXE to a directory in your PATH. This program sends a
polite WM_CLOSE to one or more windows in the Window List.
Using any ASCII text editor, edit your control file and place it in the working
directory referenced by the new program object.
You might want to add the invocation to your 'chron' or 'alarm clock' program
if you are running round the clock. As of Rel. 1.12, cwind.exe will be supplied
to allow the user to close PMMail from a script. In your script, invoke it with
'cwind PMMail'. This isn't the best implementation for this and better
'closers' may be found on Hobbes and LEO. There are also programs to open WPS
objects which may be used to restart PMMail after running maintenance.
You may also indicate a REXX script to be used via the PMMAIL Settings notebook
item and have the script execute in 'Force' mode on exit from PMMAIL. This does
not give you the opportunity to preview the results as does CheckOut, but it is
automated. See 'Mode' below.
POFAMU does not normally re-index your PMMAIL folders. It relies on the user
having kept his PMMAIL folders in order via the 're-index' menu function.
Before first use of POFAMU, it's advisable to re-index your folders. See the
indexing feature below.
INFO-ZIP and UNZIP are required for operation of the Archive function. The ZIP
switches -m -j -@ are used.
ΓòÉΓòÉΓòÉ 3. Indexing, Threading, and Duplicate Control ΓòÉΓòÉΓòÉ
Beginning with version 1.13 POFAMU will provide a means to Re-Index your PMMail
folders, as well as thread a folder and check for duplicate messages. For any
of these features, the message indexing feature will be enabled. 'MessageIndex
= yes' builds a hash table for all the 'Message-ID' header strings in every
message, in every Folder. This table is used to directly determine whether
duplicate messages exist in the folder tree. This is the Duplicate Control
feature. When message indexing is enabled, large amounts of virtual storage,
cpu cycles, and disk accesses may occur.
Since all the headers of specified folders are being processed, it is possible
to re-index a folder at the same time. This has no direct relationship to
Duplicate Control, but takes advantage of the same code path, and so requires
'MessageIndex'. 'MessageIndex = yes' will automatically be set when either
'ReIndex = x' or 'ThreadSubj = x' is specified.
'ReIndex' should NOT be used with Release 2.x versions of PMMAIL and above. It
will not add the analyze or add the correct MIME-type fields to the FOLDER.BAG
file. Sorry.
Folders may be threaded according to the relationship between 'Message-ID' and
'In-Reply-To' headers. Not all listservers/mailers co-operate well in
providing an 'In-Reply-To' header for the purposes of threading. Immediately
after the 'Folder' statement, code the statement 'ThreadSubj'. Threading
implies re-indexing of that folder, with the subject line being modified to
begin with a sort string indicating in which thread group(s) this message
belongs. ThreadSubj will support the arguments 'UnRead', 'Read', 'Sent', and
'Replied' to indicate the state to which all the message files will be set in
the FOLDER.BAG (index) file.
ΓòÉΓòÉΓòÉ 4. Control File ΓòÉΓòÉΓòÉ
Using the configuration and rules information in the control file specified in
the invocation argument, manipulate the PMMail folders therein described.
The character set for non-quoted text in the control file is restricted to:
0123456789:<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_!abcdefghijklmnopqrstuvwxyz{|}
ΓòÉΓòÉΓòÉ 4.1. Keywords ΓòÉΓòÉΓòÉ
Control file statements have the form of keyword = value, one per line. The
operands of these statements are case insensitive, treated as upper-case, when
not within a quoted string.
Order IS important, since the Base entry is required prior to any Account or
Folder statements. Whitespace is the only delimiter for tokens within these
statements. Tabs and blanks constitute (normal) whitespace.
Only interlinear (# in 1st char) comments are allowed.
Possible statement keywords:
Mode
CheckOut, Run, or Force, defaults to CheckOut. CheckOut allows the
user to test his/her control file prior to use.
Logmode
Audit or Silent or Warn or Debug - how verbose the output, defaults
to 'Audit'.
Base
like e:\southsde\pmmail - your root PMMail directory; This is a
required parameter. The directory where pmmail.exe is stored.
MessageIndex
Required for Re-Indexing or Threading folders. Also required for
Duplicate Control. Any operand is considered 'yes'.
specname
boolex << relop '{' boolex > relop boolex '}' > specnames
Account
"Internal Account-Name". Begin processing the specified account.
PMMAIL has a habit of corrupting the account name by shifting a
control character into the the first character position of the name.
If you receive an "Invalid Account" error, view ACCT.INI with a
binary editor and check out the characters beginning x'80' offset
from the string 'DACCTNAME'. Include this character within the
quoted string for account-name.
All following specifications until the next Account keyword will
apply to this account.
Folder
"Internal Folder-Name" Nested folders are designated via multiple
strings; i.e. "Friends" "Joe". Take care to insure that all target
folder specifications have a token denoting account ('=' if current
account) and the complete, perhaps nested, specification of the
folder. All statements following this one apply to this folder. The
first such statement may be 'ThreadSubj' or 'ReIndex' as special
cases. These statements will all be of the form: 'action' =
specification-name-list including
ReIndex or ThreadSubj
which describe actions to be taken at the folder level.
Both ReIndex and ThreadSubj take a 'state' type as an optional argument.
These may be 'UnRead', 'Read', 'Sent', or 'Replied', and apply to all messages
in the indexed folder. The 'Sent Mail' and 'Trash' folders do not participate
in the indexing process.
ΓòÉΓòÉΓòÉ 4.2. Selection Criteria ΓòÉΓòÉΓòÉ
The boolean expressions used by POFAMU are of the form:
Reserved Word Operator Constant
The Reserved words are:
Subject
The subject line as stored in the FOLDER.BAG file. If the specified
constant string is a case-insensitive substring of this Subject line
than it is considered equal ('=').
From_name
The name (if any) in the From: line of the header. If the specified
constant string is a case-insensitive substring of this From_name,
than it is considered equal ('=').
From_addr
The email address (if any) in the From: line of the header. If the
specified constant string is a case-insensitive substring of this
From_addr, than it is considered equal ('=').
To_addr
The email address (if any) in the To: line of the header. If the
specified constant string is a case-insensitive substring of this
To_addr, than it is considered equal ('=').
To_name
The email address (if any) in the To: line of the header. If the
specified constant string is a case-insensitive substring of this
To_name, than it is considered equal ('=').
Status
The constants for comparison must be Read, Unread, Replied, or Sent.
This is the current FOLDER.BAG state of the message.
Size
The constants for size comparison must be numbers of bytes, without
a 'k' or 'm' suffix.
Age
This value means the age in hours of the message. The difference
between the current date/time and date/time stored in FOLDER.BAG.
The suffix 'd' or 'h' is mandatory.
ΓòÉΓòÉΓòÉ 4.3. Action Statements ΓòÉΓòÉΓòÉ
Actions are of the form:
action-name = specname <..specname> <Account-specifier>
The built-in actions are Move, Delete, Archive, and Copy.
A message file is the subject of an action statement once and only once during
a given run of POFAMU. That is, once a message has been selected for a move,
delete, or archive; it will participate in only that action for the run of the
program. This is to avoid some troublesome 'double-jeopardy' scenarios.
Archive = specname <..specname>
Messages meeting the criteria of any of the
specification names are ZIP-moved into the file
POFAMU.ZIP in the affected folder directory. The
message file is deleted. A file POFAMU.BAG within the
POFAMU.ZIP file is in standard PMMAIL index format.
Delete = specname <..specname>
Messages meeting the criteria of ANY of the
specification names in the list
Move = specname account-name
Messages meeting the criteria of the single
specification are moved to the specified account and
folder. If account-name is given as '=', then the
current account is assumed.
Migrate = target-path SIZE | AGE zipsize in k | zip age in days
Effective at the folder level, prior to processing the
first message eligible for archiving into the
folder-local POFAMU.ZIP. The current POFAMU.ZIP is
inspected for conforming size in k (1024 byte)
segments, or POFAMU.ZIP file age in days. If the
criterion is met, the POFAMU.ZIP will be copied to the
target path and assigned a name matching the name in
the target path with the '||' characters replaced with
alphanumerics not currently in use in the target
directory. A value of 0 for AGE or SIZE will force
migration of the last-written POFAMU.ZIP file. Enclose
the target-path in quotes. See below for an example of
a Migrate statement.
Copy = specname account-name
Copy is not implemented currently.
It is highly recommended that you test any new or modified control files with
Mode = CheckOut before using Mode = Run. If fact, you might want to leave the
Mode command out of your control file altogether. When you truly want to
commit the changes, use Run as the second command line argument.
ΓòÉΓòÉΓòÉ 4.4. Syntax ΓòÉΓòÉΓòÉ
account-name ::: PMMail internal account name | '=' (for current account)
folder-name ::: PMMail internal folder name
time_val ::: number || tqal
tqal ::: 'd' or 'h' days or hours
boolex ::: key_id operator comparator
operator ::: '=' or '>' or '<' or '<>'
comparator ::: "string" or number
relop ::: 'AND' or 'OR'
key_id ::: Age or From_addr or From_name or Status or Size or To_addr or
To_name or Subject
'OR' logic has not yet been tested. So don't expect it to work.
( For Status, the 'number' may be 'Unread', 'Read', 'Replied' , 'Sent',
or 0, 1, 2, or 3 )
ΓòÉΓòÉΓòÉ 5. Command Line ΓòÉΓòÉΓòÉ
Invoke the program like so:
pofamu control-file-path <runmode>
Control-file-path is mandatory. Runmode is optional and overrides the value
in the control file.
ΓòÉΓòÉΓòÉ 6. Sample Control File ΓòÉΓòÉΓòÉ
# initial test configuration file
#
# Base directory for PMMAIL folders
# must specify where to start looking
Base = e:\uupc\southsde\pmmail
# Execute mode
Mode = CheckOut
# Message (listing) mode
logmode = audit
# Here are the selection criteria
Bobs_3day = { From_name = "Bob Rocky" } AND { Age > 3d }
Hale_3day = { From_name = "Haley Landers" } AND { Age > 3d }
Golden_3day = { From_name = "Dave Goldenbugle" } AND { Age > 3d }
Rick_3day = { From_name = "Rick G. Shepherd" } AND { Age > 3d }
Paul_3day = { From_name = "Paul Brash" } AND { Age > 3d }
THE_author = { From_name = "Mark Hessling" }
Humor = From_name = "west@ib"
Weekold = Age > 7d
TwoWeekOld = Age > 14d
MonthOld = Age > 30d
# We have two accounts that are actively in use
Account = "Dave's Mail"
Folder = "Trash"
Move = Bobs_3day = "Friends" "Bob"
Move = Paul_3day = "Friends" "Bash"
Move = Hale_3day = "Friends" "Hale"
Move = Golden_3day = "Friends" "Goldenbugle"
Move = Rick_3day = "Friends" "Rick"
Move = THE_author = "Programming" "Hessling"
Move = Humor = "Humor"
Delete = TwoWeekOld
Folder = "Sent Mail"
Delete = MonthOld
Folder = "Programming" "MVS-OE"
Migrate = "f:\mailarc\mvsoe||.zip" SIZE 200
Archive = Weekold
Account = "Trish's Mail"
Folder = "Trash"
Delete = TwoWeekOld
ΓòÉΓòÉΓòÉ 7. Problem Diagnosis ΓòÉΓòÉΓòÉ
Beginning with version 1.9, if an exception occurs during operation, POFAMU
will output a short message and produce a file M2DUMP.nnn in your SPOOL
directory. If the reason for the exception isn't apparent, zip this file and
PMMAIL/Attach it to a message sent to the author.
A common problem is not specifying a folder target with a complete path, i.e.,
not providing a account-name (perhaps '=') or not specifying the complete path
of nested folders to the target folder.
ΓòÉΓòÉΓòÉ 8. Author ΓòÉΓòÉΓòÉ
This code is the work of :
Dave Serls
Internet: dave@dashs.denver.co.us
Thanks to Irv Thomae for assistance in enabling support for PMMail version 1.53
accounts.