home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 15
/
CD_ASCQ_15_070894.iso
/
vrac
/
msfilter.zip
/
MSFILTER.DOC
< prev
Wrap
Text File
|
1994-05-12
|
6KB
|
144 lines
MSFilter (c) 1994 by Doug McLean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do you feed from a MS-Dos system that sends you an annoying file attach
message for every tick file you get? Or is there someone on one or more
of the echos who you find really annoying and just won't go away???
Then try MSFilter.
MSFilter is a fido packet filter. What is does is examine packets in your
inbound, and remove from each packet any messages that are from anyone
you wish. The filtering is done before you import your mail, so filtered
messages aren't even imported (as opposed to some filters that delete the
messages once they have been imported, leaving "holes" in your message
areas). MSFilter looks only at packets, so it doesn't care what you run
for a tosser or BBS.
For example, when my feed sends along tick files, he also send a file
attach message. Since I don't want these messages cluttering up my
netmail area, I filter any messages from Tick v2.10.
You don't have to limit the filter to netmail, you can filter ANY standard
fido packet. So, if there is someone in a message area that you find
annoying, you can specify their name in the config file, and messages from
them will never be imported into your system. Note that you can only
filter messages based on who they are FROM, no other criteria are used.
You CANNOT filter messages based on node numbers, subject, etc. Maybe in
a future version...
Setting it up
~~~~~~~~~~~~~
Place the executable and config file wherever you want (I have mine in
Doors:MSFilter/). Edit the config file to include only the names of people
(or non-people) whose messages you want filtered. My config file is:
Tick v2
Bill Beogele
Annoying Person
There should be no spaces before or after the names (or the space will
become part of the name to check for!). Do not leave any blank lines
either at the beginning or the end of the config file!
While you CANNOT specify wild cards, the comparison when checking names
is based on the length of the names in the config file. So, if you specify:
Tick v2
messages from Tick v2.0, Tick v2.10, Tick v26.Beta4 etc will be filtered,
while messages from Tick v will not. If you specify:
Bill
all messages from anyone whose first name is Bill will be filtered, so
be careful with what you specify! Note that the comparison is NOT case
sensitive, so Tick is the same as tick is the same as TICK.
Also note that your config file may have a maximum of 20 names to filter,
each being 35 characters or less (FTS-0001 allows 36 characters for the
FROM field, including the null at the end).
Now all you have to do is run MSFilter before you import mail. I do this
in the aftersession batch file for TrapDoor. Since MSFilter works on
PACKETS, and NOT on bundles, you will have to un-archive any bundles
if you want MSFilter to process them. Here is the appropriate section
from my aftersession file:
failat 99
cd inbound:
list >t:msf.script ????????.(mo|tu|we|th|fr|sa|su)? lformat="rx xarc x %n"
execute t:msf.script
delete t:msf.script
delete ????????.(mo|tu|we|th|fr|sa|su)?
doors:MSFilter/MSFilter inbound: logs: doors:MSFilter/MSFilter.cfg
dmc process
First, use FAILAT to make sure an error won't abort the script (maybe there
are no packets or bundles), and then CD to the inbound directory (since
that is where the packets and bundles are).
Next extract the packets from the bundles. I use list with the lformat
option to generate a batch file that will use an arexx script to take apart
each bundle one at a time. The batch file is executed, and then deleted.
Now delete the bundles. This leaves just the packets that were within the
bundles in your inbound. If you don't delete the bundles, your tosser will
want to take them apart again!
Now run MSFilter. The command line is:
path/MSFilter inbound_directory: log_directory: path/config_file_name
The inbound: and log: directories MUST end in : or /. The config file
is the full path and file name (allowing you to specify different
config files, perhaps based on who the last session was with).
Finally, after you have run MSFilter, run your tosser. I use DLGMail, but
it doesn't matter what tosser (or BBS software) you use. All messages that
were not filtered will be imported as usual.
What happens when it runs
~~~~~~~~~~~~~~~~~~~~~~~~~
First, MSFilter reads the config file. Then, it checks the specified
inbound directory for packets. All packets in the inbound directory will
be processed.
For each packet, MSFilter builds a temporary packet, to which the packet
header and all non-filtered messages are copied. Filtered messages are
printed to the log file instead of the temporary file.
If a packet does not contain any messages to be filtered, the temporary
file is deleted.
If some of the messages were filtered, the original packet is deleted and
the temporary file renamed to the original packet name.
If all the messages were filtered, both the original packet and the
temporary file are deleted (this is often the case with those file attach
messages from Tick).
The log file will contain full info on each packet processed, and on each
message filtered (including the full message text).
NOTE THAT IF YOU FEED OTHER NODES, you will be filtering messages for them
too. Since the packets are processed by MSFilter before your tosser gets
ahold of them, filtered messages are kept from going to other nodes as
well as yours.
In the above example, all packets are filtered. However, since TrapDoor will
pass the node number of the session to the aftersession script, I have mine
set to run MSFilter only after connecting with my main feed. Connects with
other nodes to not invoke MSFilter. You could (for example) use a different
config file based on who you just connected with. If you have trouble
setting something like this up, let me know and I'll help you out...
That's all folks!
~~~~~~~~~~~~~~~~~
Well, that's all. Send comments/suggestions/bug reports/etc to Doug McLean
at fido 1:255/9.0.
Doug