home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / msfilter.zip / MSFILTER.DOC < prev   
Text File  |  1994-05-12  |  6KB  |  144 lines

  1. MSFilter (c) 1994 by Doug McLean
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3.  
  4. Do you feed from a MS-Dos system that sends you an annoying file attach
  5. message for every tick file you get? Or is there someone on one or more
  6. of the echos who you find really annoying and just won't go away???
  7. Then try MSFilter.
  8.  
  9. MSFilter is a fido packet filter. What is does is examine packets in your
  10. inbound, and remove from each packet any messages that are from anyone
  11. you wish. The filtering is done before you import your mail, so filtered
  12. messages aren't even imported (as opposed to some filters that delete the
  13. messages once they have been imported, leaving "holes" in your message
  14. areas). MSFilter looks only at packets, so it doesn't care what you run
  15. for a tosser or BBS.
  16.  
  17. For example, when my feed sends along tick files, he also send a file
  18. attach message. Since I don't want these messages cluttering up my
  19. netmail area, I filter any messages from Tick v2.10.
  20.  
  21. You don't have to limit the filter to netmail, you can filter ANY standard
  22. fido packet. So, if there is someone in a message area that you find
  23. annoying, you can specify their name in the config file, and messages from
  24. them will never be imported into your system. Note that you can only
  25. filter messages based on who they are FROM, no other criteria are used.
  26. You CANNOT filter messages based on node numbers, subject, etc. Maybe in
  27. a future version...
  28.  
  29. Setting it up
  30. ~~~~~~~~~~~~~
  31. Place the executable and config file wherever you want (I have mine in
  32. Doors:MSFilter/). Edit the config file to include only the names of people
  33. (or non-people) whose messages you want filtered. My config file is:
  34.  
  35. Tick v2
  36. Bill Beogele
  37. Annoying Person
  38.  
  39. There should be no spaces before or after the names (or the space will
  40. become part of the name to check for!). Do not leave any blank lines
  41. either at the beginning or the end of the config file!
  42.  
  43. While you CANNOT specify wild cards, the comparison when checking names
  44. is based on the length of the names in the config file. So, if you specify:
  45.  
  46. Tick v2
  47.  
  48. messages from Tick v2.0, Tick v2.10, Tick v26.Beta4 etc will be filtered,
  49. while messages from Tick v will not. If you specify:
  50.  
  51. Bill
  52.  
  53. all messages from anyone whose first name is Bill will be filtered, so
  54. be careful with what you specify! Note that the comparison is NOT case
  55. sensitive, so Tick is the same as tick is the same as TICK.
  56.  
  57. Also note that your config file may have a maximum of 20 names to filter,
  58. each being 35 characters or less (FTS-0001 allows 36 characters for the
  59. FROM field, including the null at the end).
  60.  
  61. Now all you have to do is run MSFilter before you import mail. I do this
  62. in the aftersession batch file for TrapDoor. Since MSFilter works on
  63. PACKETS, and NOT on bundles, you will have to un-archive any bundles
  64. if you want MSFilter to process them. Here is the appropriate section
  65. from my aftersession file:
  66.  
  67. failat 99
  68. cd inbound:
  69. list >t:msf.script ????????.(mo|tu|we|th|fr|sa|su)? lformat="rx xarc x %n"
  70. execute t:msf.script
  71. delete t:msf.script
  72. delete ????????.(mo|tu|we|th|fr|sa|su)?
  73. doors:MSFilter/MSFilter inbound: logs: doors:MSFilter/MSFilter.cfg
  74. dmc process
  75.  
  76. First, use FAILAT to make sure an error won't abort the script (maybe there
  77. are no packets or bundles), and then CD to the inbound directory (since
  78. that is where the packets and bundles are). 
  79.  
  80. Next extract the packets from the bundles. I use list with the lformat
  81. option to generate a batch file that will use an arexx script to take apart
  82. each bundle one at a time. The batch file is executed, and then deleted.
  83.  
  84. Now delete the bundles. This leaves just the packets that were within the
  85. bundles in your inbound. If you don't delete the bundles, your tosser will
  86. want to take them apart again!
  87.  
  88. Now run MSFilter. The command line is:
  89.  
  90. path/MSFilter inbound_directory: log_directory: path/config_file_name
  91.  
  92. The inbound: and log: directories MUST end in : or /. The config file
  93. is the full path and file name (allowing you to specify different
  94. config files, perhaps based on who the last session was with).
  95.  
  96. Finally, after you have run MSFilter, run your tosser. I use DLGMail, but
  97. it doesn't matter what tosser (or BBS software) you use. All messages that
  98. were not filtered will be imported as usual.
  99.  
  100.  
  101. What happens when it runs
  102. ~~~~~~~~~~~~~~~~~~~~~~~~~
  103. First, MSFilter reads the config file. Then, it checks the specified
  104. inbound directory for packets. All packets in the inbound directory will
  105. be processed.
  106.  
  107. For each packet, MSFilter builds a temporary packet, to which the packet
  108. header and all non-filtered messages are copied. Filtered messages are
  109. printed to the log file instead of the temporary file.
  110.  
  111. If a packet does not contain any messages to be filtered, the temporary
  112. file is deleted.
  113.  
  114. If some of the messages were filtered, the original packet is deleted and
  115. the temporary file renamed to the original packet name.
  116.  
  117. If all the messages were filtered, both the original packet and the
  118. temporary file are deleted (this is often the case with those file attach
  119. messages from Tick).
  120.  
  121. The log file will contain full info on each packet processed, and on each
  122. message filtered (including the full message text).
  123.  
  124. NOTE THAT IF YOU FEED OTHER NODES, you will be filtering messages for them
  125. too. Since the packets are processed by MSFilter before your tosser gets
  126. ahold of them, filtered messages are kept from going to other nodes as
  127. well as yours.
  128.  
  129. In the above example, all packets are filtered. However, since TrapDoor will
  130. pass the node number of the session to the aftersession script, I have mine
  131. set to run MSFilter only after connecting with my main feed. Connects with
  132. other nodes to not invoke MSFilter. You could (for example) use a different
  133. config file based on who you just connected with. If you have trouble
  134. setting something like this up, let me know and I'll help you out...
  135.  
  136.  
  137. That's all folks!
  138. ~~~~~~~~~~~~~~~~~
  139. Well, that's all. Send comments/suggestions/bug reports/etc to Doug McLean
  140. at fido 1:255/9.0.
  141.  
  142. Doug
  143.  
  144.