home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 17
/
CD_ASCQ_17_101194.iso
/
vrac_os2
/
ntmgr98p.zip
/
NETMGR.DOC
< prev
next >
Wrap
Text File
|
1994-09-05
|
28KB
|
914 lines
===================================================================
NetMgr - "The Swiss Army Knife for Netmail"
Copy, move, delete, file, change and bounce netmail..
(c) 1992,93,94 Gerard van Essen (2:281/527)
===================================================================
! NetMgr uses the Squish MSGAPI by Scott Dudley.
! Squish is a trademark of Scott J. Dudley
! JAM(mbp) - Copyright 1993 Joaquim Homrighausen, Andrew Milner,
Mats Birch, Mats Wallin.
ALL RIGHTS RESERVED.
┌──────────────┬─────────────────────────────────────────────────
│ Introduction │
└──────────────┘
NetMgr is a program that will scan the messages in one or more area(s)
(the netmail area(s)), and analyse the headers of those messages. The
messages can be stored in *.MSG, Hudson, Squish or JAM format.
NetMgr will check if any of the headers meet the criteria specified in the
configuration file (a 'mask'), created by the user. If any of those
headers are found, NetMgr can perform several actions on that message,
like moving or copying it to another message area, deleting it, changing
it etc.
┌─────────────────────────────────────┬─────────────────────────────
│ Copyright, license and disclaimer.. │
└─────────────────────────────────────┘
* "NetMgr" refers to the executables and documentation in the
original distribution archive. NetMgr is copyrighted material by
Gerard van Essen. It may only be used in agreement with the
conditions set out in this license agreement.
* You are entitled and encouraged to copy and distibute NetMgr,
provided you do not change the contents of the NetMgr archive or
the program itself, and no money or any other compensation is
asked or accepted for NetMgr (without written permission from the
author).
Distibution of modified or incomplete archives is prohibited.
* Although care has been taken to write and test a program that
does what this document states, the program is provided as is,
without warranty or guarantee of any kind, either expressed or
implied, as to the quality or performance of this program,
except that it will occupy disk space.
* The author, Gerard van Essen, will not be held liable to you or
anyone for (but not limited to) any direct, indirect, incidental
or consequential damages, including any lost profits, lost
savings which may result from the use or inability to use this
program.
Gerard van Essen is in no way obligated to provide future
versions of, or support for this software.
Your use of the program constitutes your agreement to this
license and disclaimer and your release of the author from any
form of liability or litigation.
* COMMERCIAL use of the program: you are a commercial user if you
make a profit from running NetMgr, or if you use NetMgr in a
commercial environment (ie. business, governmental organization,
association, school, foundation, or any other form of juridical
person). In case of doubt, contact the author.
* For NON-COMMERCIAL use, it is REQUIRED that you register the
program.
However, if you really cannot afford to register (mainly a concern
to 'eastern block' countries, the former USSR etc.), permission is
hereby granted to use an unregistered version.
Remember, if you register, you are paying for something that you
already have! Registration does not mean you can force me to
implement new features that you like.
Finally: I know some people that do not want to register software
that is still in the beta stages. I will repect this principle. If
you really feel this way, you can hold off registration of NetMgr
until version 1.00 is released.
* For COMMERCIAL use of the program, you should always register
the program. You are, however, granted an evaluation period of
30 days. After these 30 days, you must either register the
program, or stop using it. Using an unregistered version of
NetMgr in a commercial environment for more than 30 days is
prohibited!
* You only have to register once. Your registration will also be
valid for all future releases of NetMgr.
* Registration is valid for all versions of NetMgr. At this moment,
there are DOS and OS/2 versions of the program available.
Registering NetMgr entitles you to run the DOS version, the OS/2
version, or both :-)
* A registration is PERSONAL. It cannot be transferred to other
parties. It could, however, be used in different places (but: by
the same PERSON). Think of it as a book in this regard: you can
take the book from your home to the office (and read it there).
* Versions of NetMgr prior to version beta 0.97 were freeware and could
not be registered. You may continue to use THESE OLDER VERSIONS
without registration, even in a commercial environment.
* The author reserves the right to change this license without
prior notice, for newer versions of the program.
┌────────────────────────────────────┬─────────────────────────────
│ A 'MASK', NetMgr's driving force.. │
└────────────────────────────────────┘
A MASK consists of six parts:
fromname, fromaddress, toname, toaddress, subject, attributes
(1) (2) (3) (4) (5) (6)
So 6 parts, seperated by a comma. In the config file you use the keyword
MASK to specify a mask:
MASK fromname, fromaddress, toname, toaddress, subject, attributes
-=-
NAME : fromname, toname.
A 'name' is just a string, leading and trailing spaces found in the config
file are stripped, spaces *within* a string are allowed.
So writing " Gerard van Essen " will be the same as "Gerard van Essen".
(Note that leading and trailing spaces are stripped, while the space
between "Gerard" and "van" is still there...)
A name can start with a tilde (~). This indicates that you are not looking
for an exact match of the string, but that you are looking for a
substring. As long as the string you specify is located somewhere in the
name, it will be a match.
So, if you specify '~essen' as a name, it will be a match if the name is
'Gerard van Essen', and also if it is 'Art van Essen' etc.
A name can also start with an exclamation mark (!). This indicates that you
are looking for a string that does NOT match what you specify. So if you
specify '!Gerard van Essen', NetMgr will work on messages where the string
is NOT 'Gerard van Essen'.
You can also combine the '~' and '!' tokens. The '!' MUST be always the
first token if you do that!
For example: !~essen will look for string that do NOT contain 'essen'
anywhere in the string. In that case 'Gerard van Essen' will not be a
match, 'Art van Essen' will not be a match, but 'Kasper Kwant' will be a
match.
-=-
SUBJECT:
A subject is just a string, exactly like a 'name'. Everything that applies
to a 'name' also applies to a 'subject'. See the paragraph above..
-=-
ADDRESS: fromaddress, toaddress.
An address is *always* full 4D, write a '*' for any part you don't care
about:
60:*/*.* - all messages coming from zone 60
2:281/527.* - msg from any point from 281/527, or .0
*:500/*.* - all msgs from nodes/points in a net 500, any zone
2:281/527.0 - only messages from 2:281/527.0
Just one exception (to the "always 4D" rule): specifying just a '*' only
for the address, is allowed (strictly speaking, it is not full 4D :-), and
is the same as *:*/*.*.
An address can also start with an exclamation mark. That indicates that you
are looking for messages where the address does NOT match what you are
specifying here.
For example: !2:*/*.* will let NetMgr work on all addresses that are NOT
zone 2. And !2:281/527.0 will let NetMgr work on all addresses that are NOT
2:281/527.
-=-
ATTRIBUTES.
Attributes can be one or more of the following:
p = private
c = crash
r = received
s = sent
a = attach
i = forward/intransit
o = orphan
k = kill
l = local
h = hold
f = file request
n = scaNned
d = Direct
u = Update request
q = return receipt reQuest
y = return receipt
m = iMmediate
t = TFS
e = KFS (erase)
z = Archive sent
■ Important note:
Several of these extra attributes can only be represented in the '^AFLAGS'
kludge (that is NOT supported by Squish, but is by Frodo and several other
programs), in some message base formats (like *.MSG and Squish).
If you do NOT want to use this FLAGS kludge (because you use Squish in a
Binkley environment), you can put the keyword 'NOFLAGS' in your config.
This gives you the ability to use 'direct' (in the peculiar way that Squish
supports it).
You can NOT use: IMM, TFS, KFS or Archive Sent in this ('NOFLAGS') mode for
Squish and *.MSG areas!
NetMgr will NOT write out a FLAGS kludge in this ('NOFLAGS') mode, so
rewriting a message that has these FLAGS will make these FLAGS disappear!!
The JAM message base format supports ALL attributes without any kludges.
Every attribute must have a '+' or a '-' in front of it.
A '+' means: must be present.
A '-' means: must *not* be present.
An example:
+l+p
A message only matches this, if the L)ocal bit, and the P)rivate bits are
set. The other (possible) attributes are not important.
-f+l
A message matches this, if it is *not* a F)ile request, and the L)ocal bit
is present.
+c+l+p-s
A message matches this, if the C)rash bit is set, the L)ocal bit is set
and the P)rivate bit is set. Apart the that, the message must *not* be
S)ent already..
-=-
Some examples of a complete 'MASK'.
-----------------------------------
Mask Gerard van Essen, *, *, *, *, +s
All messages, coming from "Gerard van Essen" on any address (*), written
TO: anyone (*) on any address (*), with any subject, that are already
flagged as S)ent.
IE: all messages written by me that have already been packed/sent.
--
Mask *, 2:281/527.*, uucp, 2:281/527.0, *, +l-h-p-k
Message written by anyone (any name: '*'), on node 2:281/527 (.* so it can
be the NODE 2:281/527 or any of its points, like 2:281/527.40).
Written TO: a guy named "UUCP" on node 2:281/527.
The L)ocal bit must be set, and the H)old, P)rivate and K)ill bits must
*not* be set.
The subject doesn't matter.
--
Mask *, 2:281/527.*, postmaster, 2:281/527.0, *, *
Message written by anyone (any name: '*'), on node 2:281/527 (.* so it can
be the NODE 2:281/527 or any of its points, like 2:281/527.40).
Written TO: a guy named "Postmaster" on node 2:281/527.
The subject and message attributes that are (not) present are not
important.
--
Mask *, *, raid, 2:281/527.0, *, *
All messages, coming from anyone on any address, but addressed to RAID on
2:281/527. The subject & message attributes don't matter.
--
Mask *, *, ~essen, 2:281/527.0, ~timed, *
All messages, addressed to a name that contains the string 'essen', on
node 2:281/527, that have the string 'timed' somewhere in the subject.
--
Mask ~gerard, !2:281/527.0, *, *, *, *
All messages, coming from someone whose name contains 'gerard', but whose
address is NOT 2:281/527.
So it will be from someone with a nice name, but it won't be from me :-)
--
Mask *, *, !~essen, 2:281/527.0, *, *
All messages with node 2:281/527 as their destination, but not addressed
to anyone who has the string 'essen' in his/her name.
So messages addressed to my system, but not for me personally (most likely
a message for one of my BBS users).
┌────────────────────────┬─────────────────────────────────────────────
│ MASK's partner: ACTION │
└────────────────────────┘
A MASK is never alone, it is always accompanied by one or more ACTION
statements. This ACTION statement tells NetMgr what should be done with
messages that match a certain MASK.
The following ACTIONs are valid:
■ COPY <destination area> - Copy msg to area
■ MOVE <destination area> - Move msg to area
■ DELETE - Delete message
■ FILE <output text file> - Write message to file.
■ HDRFILE <output text file> - Write message header to file.
■ SEMAPHORE <path+filename> - Generate/touch a semaphore (0 byte file)
■ REWRITE <mask> - Rewrite header
■ UUCPREWRITE <mask> - Rewrite header, add 'toname' field to the
body, at the top.
A rewrite mask may contain the wildcard token ('*') as well.
All fields where a '*' is specified will be left unchanged.
■ BOUNCE <address> <bounce text file>
Return message to the sender, add bounce text at the top.
This action returns a copy of the entire message, including the header
information.
The address used as origination address (in the origination address,
MSGID) is the first item you specify. As all addresses in Netmgr.cfg, this
needs to be a full 4D address.
■ EMPTYBOUNCE <address> <bounce text file>
Return message to the sender, add bounce text at the top.
This action returns nothing, apart from the 'bouncetext', there will be no
information in the message body.
The address used as origination address (in the origination address,
MSGID) is the first item you specify. As all addresses in Netmgr.cfg, this
needs to be a full 4D address.
■ HDRBOUNCE <address> <bounce text file>
Return message to the sender, add bounce text at the top.
This action returns the message header, in addition to the 'bouncetext'.
The body of the original message will not be sent back, however.
The address used as origination address (in the origination address,
MSGID) is the first item you specify. As all addresses in Netmgr.cfg, this
needs to be a full 4D address.
■ FORWARD <mask>
This action will forward the message (showing both header and body, like
'bounce' does) to someone else.
The header of the message will be constructed using the mask you specify.
Example:
Action Forward Gerard, 2:281/527.0, Kasper Kwant, 2:500/144.0, Test!, +l+c
In this case, it will look like this:
From: Gerard, 2:281/527
To : Kasper Kwant, 2:500/144
Subj: Test!
Attr: Loc, Crash
----------------------------------
* Forwarded by NetMgr+ 0.98
Original message:
From:
To : <--- header of original message.
Subj:
----------------
Bla, bla <--- body of original message.
■ MAKEMSG <file for body> <mask>
This will generate a new message, using the Mask you specify as the
header, and the contents of a file you specify as the body.
Example:
Action MakeMsg c:\txt\body.txt Art, 2:281/527.0, SysOp, 1:138/211.0, Poll me!, +l
This will generate a message to SysOp on 1:138/211, with body.txt as the
body of the message.
■ CHANGEPATH <new path>
This action replaces the path of files found in the subject line. It makes
sense to only use this for file attach messages, as you will get a
terribly messed up subject line otherwise :-)
Example:
Action ChangePath c:\frodo\infiles
In the above example, the subject line:
Subj: c:\tmp\myfile.txt d:\outfiles\test.txt
will be rewritten to:
Subj: c:\frodo\infiles\myfile.txt c:\frodo\infiles\test.txt
If a file does not have a path at all, the defined path will be added:
Subj: test.txt
will get:
Subj: c:\frodo\infiles\test.txt
If the defined change will lead to a subject line that is too long (the
new path is longer than the old one, and the subject would get longer than
71 chars) the message will not be changed.
■ ECHOCOPY <address> <area> <seenby> :
Copy, add origin, and (optionally) SEEN-BY: line.
The address used as origination address (in the origin, MSGID) is the
first item( <address>). As all addresses in Netmgr.cfg, this needs to be a
full 4D address.
Leave SEEN-BY: info out if you don't want it. The text put here is just
duplicated in the SEEN-BY line, so you can put more than one address here.
■ ECHOMOVE <address> <area> <seenby> :
Move and add origin, SEEN-BY..
--
In the ACTIONs mentioned above, <destination area> can be any for the
following formats:
*.MSG : give the path of the *.MSG area (c:\fd\rcvd\).
Squish : give the path + basename of this area, and put a '$' in front of
it, to indicate Squish format ($c:\squish\netmail).
JAM : give the path + basename of this area, and put a '!' in front of
it, to indicate JAM format (!c:\fe\msgs\saved).
Hudson : give the board number of this area, and put a '#' in front of
it, to indicate Hudson format (#102).
In the config file, you specify an action using the ACTION keyword.
Some examples:
Action Delete
Delete the message
--
Action Move $c:\bink\msgs\net2
Move a message to the Squish style (leading $) area c:\bink\msgs\net2.
--
Action Move c:\msgs\rec_msg
Move a message to the *.MSG style (no leading $, ! or #) area
c:\msgs\rec_msg\.
--
Action Copy !c:\jammsgs\saved
Copy a message to the JAM style (leading '!') area c:\jammsgs\saved.
--
Action Rewrite *, *:*/*.0, *, *, *
Change a message header.
Any field that has a '*' will be left untouched (in this case the
Fromname, the fromaddress zone, net and node parts), the toname, the
toaddress and the attributes.
So, to be more precise: only the pointnumber of the message sender will
be changed. Messages coming from 2:281/527.40, for example, will be
changed to a message coming from 2:281/527.0.
--
Action ReWrite *, *, Pietje Puk, *, *
This will rewrite the 'toname' part of a message, it will put "Pietje Puk"
in the TO: name-field.
--
You can also tell NetMgr to change the attributes of a message. Again, any
attributes must be preceded by a '+' or '-'.
A '+' in this case means: set this bit.
A '-' in this case means: turn this bit off.
so..
+p+l+k-c-f
.. will turn ON the P)rivate, L)ocal and K)ill bits, and turn OFF the
C)rash and F)ile request bits. Other attributes are left untouched.
Example:
Action *, *, *, *, -c+p
Turn off the crash bit for that message. Turn ON the P)rivate bit.
--
Action Bounce nojoe.txt
This will write a bounce-message (a message that is addressed to the
sender of that message), the message body will contain the header and body
of the original message.
Also, NetMgr will add the contents of a textfile at the top of the
body. In this case the contents of the file 'nojoe.txt' will be added.
The contents could be:
-=- <begin> -=-
Sorry, but Joe's modem had a heart attack, so he is currently not
available. The message you wrote will remain 'on hold' until he has a new
modem.
The original text of your message:
::::
-=- <end> -=-
And that will be added at the top.
The original message will NOT be deleted. If that is what you want, you
must add the another ACTION for that MASK, to DELETE the message.
NetMgr accepts more than one 'ACTION' for a certain mask.
You can also, for example, first rewrite a message, and then move it, etc.
--
Action EchoCopy 2:281/527.0 #57 281/527 528
This will copy a message to the Hudson style area, board number 57, and
add 281/527 528 to the SEEN-BY. The text listed will be copied literally,
so be VERY CAREFUL what you specify here! Test it thoroughly (together
with any downlinks) before using it!!
The newly created achomail message will show 2:281/527 as its origination
address in the origin.
--
Action File, c:\msgs\netmsgs.txt
This will write out a message to the file c:\msgs\netmsgs.txt. If the file
doesn't exist, it will be created. If it does exist, the message will be
appended to the file.
--
Action UUCPrewrite, *, *, postmaster, 2:281/527.0, *, +p+k+l
This will take the name from the TO: field, and add it at the top of the
message body (TO: <toname>). The message itself will be readdressed to
postmaster at 2:281/527, and have the attributes p)rivate, k)ill and
l)ocal added.
This can be useful for people who gate messages to internet.
--
Action Semaphore c:\frodo\sems\areafix.sem
This will create (or touch) a semaphore called areafix.sem. You may use
this to create semaphores that will start Areafix only when a message to
areafix was actually encountered by NetMgr (as opposed to running areafix
after every mailtoss).
┌───────────────────────────────┬────────────────────────────────────
│ MASK and ACTION in NetMgr.cfg │
└───────────────────────────────┘
A MASK must *always* have one or more corresponding ACTION(s) in
netmgr.cfg. NetMgr will NOT run if anything is wrong in the config.
So there are always 'pairs':
Mask *, *, Harry Twit, *, *, *
Action Delete
Any message that matches the MASK will be deleted.
--
Mask *, *, *, 60:*/*.*, *, *
Action Move !c:\bink\msgs\net2
Any message addressed to a zone 60 address will be moved.
--
Mask *, *, *, *, *, +r
Mask Move $c:\msgs\received
All received messages will be moved.
etc.
However, it is also possible to specify SEVERAL actions for one mask:
Mask *, *, Pietje Puk, 2:281/527.0, *, *
Action Bounce 2:281/527.0, c:\txt\newaddr.txt
Action File c:\msgs\pietje.txt
Action Forward Art, 2:281/527.0, Pietje Puk, 2:300/1.0, Readdressed mail, *
Action Delete
Take a while to check this out. What is does is this:
Whenever a mail address to 'Pietje Puk' on 2:281/527 is encountered, this
message will be bounced back to the sender. The contents of the file
'c:\txt\newaddr.txt' will be added at the top of the message (possibly
explaining that Pietje now has a new email address).
Then, the contents of the message will be written to a file (pietje.txt).
The message will also be forwarded to 'Pietje Puk' on '2:300/1', which is
Pietje's new netmail address (so he gets his message anyway).
And finally, the original message is deleted.
As you might imagine, creative minds can go a long way with NetMgr.
But, you can also use more than one Mask, and combine it with one or more
actions!
For example:
Mask Gerard van Essen, 2:281/527.0, *, *, *, +s
Mask *, *, Gerard van Essen, 2:281/527.0, *, +r
Action Move $c:\fastecho\rcvdsent
This will take all messages FROM Gerard van Essen (2:281/527) that are
'sent', and all message TO Gerard van Essen (2:281/527) that are received
and moves thes to a Squish message area (rcvdsent).
In other words: all received and sent netmail is moved out of my primary
netmail area.
Of course, you can also combine several masks with several actions.
Mask Gerard van Essen, 2:281/527.0, *, *, *, +s
Mask *, *, Gerard van Essen, 2:281/527.0, *, +r
Action File c:\msgs\oldmail.txt
Action Delete
This will write all received and sent netmail to a file, and then delete
it.
┌────────────────────────────────────┬─────────────────────────────────
│ Areas to scan: the ScanDir keyword │
└────────────────────────────────────┘
There's one more important keyword in NetMgr.cfg, and that's the ScanDir
keyword.
This will give NetMgr an area to Scan for messages that match a Mask.
Example:
ScanDir c:\fd\netmsgs
The default is a *.MSG area, but:
A '$' in front of an area indicates a Squish style area.
A '!' in front of an area indicates a JAM style area.
A '#' in front of an area indicates a Hudson style area.
You can have as many of these as you like, NetMgr will scan each and every
one of them. But, just as a certain action is related to a certain mask,
certain action/mask combinations are related to a ScanDir statement.
When a ScanDir statement is found in NetMgr.cfg, all Mask/Action
combinations following that ScanDir up to the next ScanDir statement will
(only) be valid for that particular ScanDir.
ScanDir c:\fd\netmail
Mask A
Action ..
Action ..
Mask B
Action ..
Mask C
Action ..
ScanDir c:\fd\usenet
Mask D
Action ..
In the above example, c:\fd\netmail will be scanned for Mask A, B and C,
but not for Mask D.
c:\fd\usenet will (only) be scanned for Mask D.
You can also specify more than one ScanDir, followed by one or more Masks.
All ScanDirs will be scanned for those masks.
ScanDir c:\fd\usenet
ScanDir $c:\fd\netmail
Mask E
Action
In the above example, both c:\fd\usenet and $c:\fd\netmail will be scanned
for mask E.
┌──────────────────────────────┬────────────────────────────────────
│ Other keywords in netmgr.cfg │
└──────────────────────────────┘
HOME
====
Example:
Home 2:281/527.0
Your address. The zone is used as a default value for 'zoneless' messages
(only *.MSG style areas)...
ORIGIN.
=======
Origin NetMgr, (c) 1992-'94 Gerard van Essen
An originline, will be used for EchoCopy and EchoMove.
LOG.
====
Log c:\tc\netmgr\netmgr.log
The location and name of your logfile. Leave this keyword out if you don't
want a logfile.
HUDSONPATH
==========
The location of your Hudson message base. Use this only if you actually
have a Hudson base.
Hudsonpath C:\Tosser\Msgbase
┌─────────────────────────┬─────────────────────────────────────────
│ Command line parameters │
└─────────────────────────┘
There are only three:
-D
For 'debugging' purposes you can start netmgr with the -d command line
switch. This will send NetMgr's interpretation of your config file to
stdout.
While scanning your netmail area, it will also send some info about the
headers of the messages to stdout.
You can easily redirect it to a file (netmgr -d > debug.txt) for
inspection.
--
-C
Here you can specify the name of an alternative Config file. For example:
NetMgr -Cc:\netmgr\mycfg.txt
--
-Q
Enables 'quiet' mode. Hardly anything is written to the screen in this
case. This speeds up processing a bit.
┌─────────────┬─────────────────────────────────────────────────────────
│ Errorlevels │
└─────────────┘
Three possibilities:
0 : No errors, no work done.
1 : No errors, something done (move, copy, bounce or whatever. Anything.)
254 : Error occurred (outa mem, config error etc).
Some bits and pieces..:
* NetMgr was compiled using Borland C++, v3.1 (DOS version) and Watcom
C/C++ v10.0 (OS/2 version - 32 bit).
* NetMgr source code is not and will not be available.
The author can be reached...
The best thing is to hook into the ARTWARE support echo. I give support for
my products there. It can be found in several places (see support.txt).
It's also on the American Backbone!
Gerard van Essen
FidoNet: 2:281/527
Contrast BBS, 31-70-3234903 (V34, V32bis, V32Terbo, V.FC, HST 16k8)
Usenet: art@beard.nest.nl
Have fun.