home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 36 Tips / 36-Tips.zip / filters.txt < prev    next >
Text File  |  1999-04-10  |  14KB  |  480 lines

  1. FILTER MAINTENANCE
  2.  
  3. Filters allow MR/2 to perform actions on groups of messages which
  4. meet certain conditions.  This can include copying the message to
  5. a folder, automatically replying to it, or routing it to a rexx
  6. procedure for handling.
  7.  
  8.  
  9. DESCRIPTION
  10.  
  11. Name - Enter the full name of the filter here.  This can be as
  12. descriptive as you like:  For example:  MR/2 ICE Mail List
  13. Messages
  14.  
  15. Nickname - Enter the short name for the filter here.  For
  16.  
  17. example:  MR/2 List.
  18.  
  19.  
  20. SEARCH TYPE
  21.  
  22. Simple Search Type - searches the search area specified for the
  23. search string specified.  Search strings containing spaces do not
  24. have to be enclosed in double quotes to be handled correctly. 
  25. For example: Multiple Recipients of MR/2 ICE Mail List
  26.  
  27. Free-form Search Type - allows entry of extended search criteria
  28. using Boolean Match Logic.
  29.  
  30. Keywords can be OR'd together, AND'd together and/or NOT'd.  In
  31. addition, parenthesis can be used to control the evaluations of
  32. the test.  There is also an operator that will match a word,
  33. remaining sensitive to case.  Freeform filters strip any hard
  34. linefeeds the user has entered before saving the filter to disk. 
  35. Support for quoted strings permits spaces and the special Boolean
  36. operator symbols to be used.  
  37.  
  38. Some simple examples:
  39.     
  40. (OS/2 | OS2) & !WARP   (OS/2 or OS2) and not warp    
  41.  
  42. Windows & OS/2         Windows and OS/2    
  43.  
  44. Windows | OS/2         Windows or OS/2 
  45.  
  46. ^warp                  warp, 
  47.  
  48. but ONLY if all lower case lettersThe "operator" symbols follow
  49. the conventions used by C and C++ for Boolean operations:
  50.  
  51. &    is the AND operator
  52.  
  53. |    is the OR operator  
  54.  
  55. !    is the NOT operator 
  56.  
  57. ()   cause the expression inside to be evaluated as a single expression.
  58.  
  59. ^    causes a case-sensitive match to be performed.  
  60.  
  61. The word that follows must be found with matching
  62. capitalization to be considered a "match".
  63.  
  64. ~    causes an exact word match to be required.
  65.  
  66. String/phrase that follows must be found standing
  67. on it's own; not imbedded within another string.  If the strings
  68. is embedded as part of some other word, it will not match.  
  69.  
  70. For example, searching for the word "owl" will match "owl", but also
  71. words like "knowledge" and "scowl".  Using the search string
  72. "~owl" will match only with "owl" as a standalone word.  The
  73. following will find all messages that contain one or two
  74. different words referencing OS/2 that also mentions "bugs".  
  75.  
  76. If the message doesn't match under this criteria, then it is tested
  77. for the words "Windows" and "slow" in the same messages:   
  78.  
  79. ((OS/2 | OS2) & bugs) | (Windows & slow)
  80.  
  81. The following is somewhat similar.  It will also find all
  82. messages that contain one of two different words referencing 
  83. OS/2 that also  mentions "bugs".  
  84.  
  85. If the message is found to match, then it is tested for the words
  86. "Windows" and "slow" in the same messages.  If these words are
  87. both found, however, the message is eliminated (compliments of
  88. the "!" NOT operator):   
  89.  
  90. ((OS/2 | OS2) & bugs) & !(Windows & slow)
  91.  
  92. A few more examples:     
  93.  
  94. ObjectPM | "Object PM"
  95.  
  96. spaces are ignored unless within quotes  
  97.  
  98. "R&D" 
  99.  
  100. operator characters must be in quotes if part of a search string. 
  101.  
  102. R&D                    
  103.  
  104. R&D finds either of the single letters anywhere in the message no
  105. matter what the case.  If you intended to find the phrase R&D,
  106. the results here are not what you intended.  The example previous
  107. to this one using the quote ' " ' character before and after the
  108. target string causes a match to be found only if that string is
  109. found within the message area being tested.  
  110.  
  111. "(ch | 0xFF)"       
  112.  
  113. more special characters within quotes.  The operator
  114. characters will be treated as any other characters.   In other
  115. words, the "(", the "|", and the ")" are searched for as ascii
  116. characters and do not affect the nature of the search.
  117.  
  118. """Windows"""
  119.  
  120. Looks funny?  It will find the "Windows" in message
  121. but only if between quote marks.  Two quotes together are treated
  122. as a single " mark, but they must still be part of an entire
  123. quoted string. 
  124.  
  125. ""Windows""WILL NOT WORK, and that ...  
  126.  
  127. "can you say ""neighbor""?"
  128.  
  129. will find the phrase 'can you say "neighbor"?' 
  130. The word neighbor must be within quotes to be considered a match.
  131.  
  132. "&Windoze"
  133.  
  134. Soundex (sounds like) search for anything sounding similar to "Windows". 
  135.  
  136. ^warp | phasers
  137.  
  138. Looks for the word "warp" in all lower case, or the word "phasers"   
  139.  
  140. ^NT | ^Nick
  141.  
  142. Looks for the capital letters "NT" or the string
  143. "Nick" where only the N is capitalized. 
  144.  
  145. {S}OS/2Matches "OS/2",
  146.  
  147. only checking SUBJECT    
  148.  
  149. {F}"jim@gilliland.com"
  150.  
  151. Finds ONLY message FROM Jim Gilliland  
  152.  
  153. {M}"Tim McClanahan" & !{FT}"Tim McClanahan"
  154.  
  155. Finds references to Tim McClanahan inside any message
  156. text, but excludes messages FROM or TO him.  
  157.  
  158. {S}(MR/2 | MR2 | MR-2)
  159.  
  160. Matches any of these three strings when they exist in the
  161. SUBJECT field. 
  162.  
  163. {Conclusion}
  164.  
  165. Probably won't find what you want :)   
  166.  
  167. "{Conclusion}"
  168.  
  169. Probably is what you want.  Finds any
  170. occurrence of the word  "Conclusion" that is enclosed between
  171. curly-brackets.  Valid areas are From, To, Subject, Message and
  172. Header, represented by the letters F, T, S, M and H,
  173. respectively.  The value 'H' may be followed by a header field
  174. "tag" to specify a specific header line.  
  175.  
  176. For example:
  177.  
  178. {H:Cc}nick@secant.com
  179.  
  180. will match all email cc'addressed to me    
  181.  
  182. !{H:X-Mailer}""
  183.  
  184. will find all messages without an X-MAILER header line.     
  185.  
  186. {H:X-Mailer}"MR/2"will find all messages with an
  187.  
  188. X-MAILER header line containing "MR/2". 
  189.  
  190. {H:X-Mailer}"" & !{H:X-Mailer}"MR/2" 
  191.  
  192. will find all messages with an X-MAILER header line that does
  193. NOT containing "MR/2". 
  194.  
  195. Rexx Search Type - allows an external Rexx procedure to determine
  196. which message to filter.  The external Rexx procedure should
  197. create mr2_rexx.$$$ if the message passed to it passes the filter
  198. criteria.  This is the temporary file used to pass information
  199. back and forth between your Rexx procedure and MR/2 ICE.
  200.  
  201. Special Search Type - allows selection of messages by attachments
  202. and size. Contains UUEncoded attachment(s)   Contains MIME
  203. attachment(s)  Contains BINHEX attachment(s) Message Size is
  204. greater than:  Message Line Count is greater than:
  205.  
  206. Smart Search Type - Future use.
  207.  
  208. Translate - Future use.
  209.  
  210.  
  211. SEARCH AREAS for
  212.  
  213. All Areas - Search for the search string anywhere in the message.
  214.  
  215. Header - Search for the search string in the message header. 
  216.  
  217. Body - Search for the search string in the message body.
  218.  
  219. From - Search for the search string in the message from: field.
  220.  
  221. To - Search for the search string in the message to: field.
  222.  
  223. Subject - Search for the search string in the message subject.
  224.  
  225.  
  226. FILTER TYPE
  227.  
  228. Inbound - filters are processed "after" a message is received in
  229. the inbox.
  230.  
  231. Outbound - filters are applied to each message *after* it is
  232. successfully sent.
  233.  
  234. In/Out - filter is a single filter to be used as BOTH an inbound
  235. and outbound filter.
  236.  
  237. Demand - filters are filters that never get invoked automatically.  
  238. They are available for use only when manually selecting a filter.  
  239. So, you may create a DEMAND auto-responder filter that sends off a 
  240. canned message.  This filter will never be automatically applied,
  241. but it is available by marking a message or a group of messages, 
  242. user RMB->Filter->Select and picking this filter.
  243.  
  244.  
  245. ON EVENT
  246.  
  247. PreSend - is processed after a connection is made with your
  248. sending server, right before the message is to be shipped. 
  249. Presend can define a set of filter match criteria. Each message
  250. to be sent (queued messages) passes through this filter, and if
  251. found to match, can be passed through a REXX script.  Most other
  252. options do nothing in this case, or have extremely minimal use. 
  253. After the filter(s) is/are executed, the message is sent.  This
  254. was implemented specifically for PGP signing and encrypting.  It
  255. has other applications.
  256.  
  257. To Outbox - Future use.
  258.  
  259.  
  260. PROCESS WHEN MESSAGE
  261.  
  262. Matches - specified search criteria match.
  263.  
  264. Doesn't match - specified search criteria does not match.
  265.  
  266. Always - process filter for every message.
  267.  
  268.  
  269. DESIRED ACTION
  270.  
  271. Copy to Folder - When filter meets the search criteria copy's
  272. message to designated folder.
  273.  
  274. Auto-reply - Create a template to use for the auto reply. 
  275. Autoreplies are added to the outbox for sending, but deleted on
  276. send.  Any filter that auto-replies should test for the existence
  277. of "X-AutoReply: Yes" and NOT autoreply if found.  Filter like:
  278. (whatever) & !{H:X-AutoReply}"Yes".
  279.  
  280. Forward to - Future use.
  281.  
  282. Notify via Popup Window - Future use.
  283.  
  284. Link to secondary filter - Future use.
  285.  
  286. Link to Rexx - Filters that start REXX commands do so minimized
  287. now.  If a REXX    process is called from a filter, it is
  288. performed FIRST, before any copying to folders or other actions
  289. are performed.  REXX filters can now be forced to the foreground
  290. by simply adding  a "*" to the beginning of the command sequence.
  291. For example:  *maillist icemail.lst, would run the MR/2 ICE
  292. mailing list in the foreground.  This allow REXX to prompt and
  293. accept input..
  294.  
  295.  
  296. ENABLED
  297.  
  298. Checking this button turns the filter on for processing. 
  299.  
  300. Unchecking disables the filter.
  301.  
  302.  
  303. FINAL DISPOSITION
  304.  
  305. Show in Index - leaves the message in the inbox and visible in
  306. the inbox index even though the message may have been copied to
  307. another folder(s).
  308.  
  309. Do not put in index - leaves the message in the inbox, but NOT in
  310. the index even though the message may have been copied to another
  311. folder(s).  If you re-index your inbox the message will be put
  312. back into the index.
  313.  
  314. Delete message NOW - deletes the message from the inbox after the
  315. messages meets the criteria of the filter.  Delete also stops
  316. further processing of the message by any more filters in the
  317. list.  
  318.  
  319.  
  320. Examples
  321.  
  322.  
  323. BAD MAIL filter
  324.  
  325. Search type = Free-form:
  326.  
  327. {S}"RETURNED MAIL: HOST UNKNOWN" |
  328. {S}"WARNING: COULD NOT SEND MESSAGE" | 
  329. {S}"RETURNED MAIL: SERVICE UNAVAILABLE" | 
  330. {S}"RETURNED MAIL: USER UNKNOWN" | 
  331. {S}"RETURNED MAIL: CAN'T CREATE OUTPUT" | 
  332. {S}"DELIVERY REPORT (FAILURE)" |
  333. {S}"RETURNED MAIL: WARNING: CANNOT SEND" |                 
  334. {S}"RETURNED MAIL: CANNOT SEND MESSAGE" | 
  335. {S}"RETURNED MAIL: UNKNOWN MAILER ERROR"
  336.  
  337. Process when matches;
  338.  
  339. Type - inbound;
  340.  
  341. Actions - copy to folder;  
  342.  
  343. Final disposition - delete NOW.
  344.  
  345. Filter enabled;
  346.  
  347. Note:  You must pre-define a folder before you
  348. set up the filter.  This should be one of the first 
  349. filters in the list or the return error messages will 
  350. still appear in your inbox or other folders that 
  351. filters send them to.
  352.  
  353.  
  354. CORRESPONDENCE WITH AN INDIVIDUAL filter
  355.  
  356. Search type = simple:APERSON@SECANT.COM;
  357.  
  358. Search area - Header;
  359.  
  360. Filter type - In/Out;
  361.  
  362. Process when message - Matches;
  363.  
  364. Copy to folder - APERSON;
  365.  
  366. Final disposition - Delete message NOW.
  367.  
  368. Note:  This will put your replies to
  369. the person in the folder as well.
  370.  
  371.  
  372. MAIL LIST filter
  373.  
  374. Search type = simple:MR2ICE.LIST@SECANT.COM;
  375.  
  376. Search area - Header;
  377.  
  378. Filter type - In/Out;
  379.  
  380. Process when message - Matches;
  381.  
  382. Copy to folder - MR/2 ICE List;
  383.  
  384. Final disposition - Delete message NOW.
  385.  
  386. Note:  This will put your replies to
  387. the list in the folder as well.
  388.  
  389.  
  390. TAG LINE filter
  391.  
  392. Search type = simple:  No entry in field;
  393.  
  394. Search area - none;
  395.  
  396. Process when message - Always;
  397.  
  398. Filter type - PreSend;
  399.  
  400. Desired actions - Link to Rexx: C:\directory\rexx.cmd;
  401.  
  402. Final disposition - Show in index.
  403.  
  404. Note:  There are several rexx procedures available for this
  405. purpose.  You can find many of them at the ICE web site or the
  406. Geiger web site (http://www.amaranth.com/~whgiii).
  407.  
  408.  
  409. TIMEZONE filter
  410.  
  411. Search type = simple:No entry in field;
  412.  
  413. Search area - header;
  414.  
  415. Process when message - Always;
  416.  
  417. Filter type - Inbound;
  418.  
  419. Desired actions - Link to Rexx: c:\directory\TZ1.cmd;
  420.  
  421. Final disposition - Show in index.
  422.  
  423. Note:  The rexx procedure TZ1.CMD is written by William Geiger III
  424. and is available as part of his TIMEZONE application which is 
  425. found on his web site (http://www.amaranth.com/~whgiii).
  426.  
  427.  
  428. TWIT filter
  429.  
  430. Search type = Free-form:
  431.  
  432. {F}twit1@twit1.com | 
  433. {F}twit2@twit2.com |
  434. {F}twit3@twit3.com |
  435. ...etc..
  436.  
  437. Process when message - Matches;
  438.  
  439. Filter type - Inbound;
  440.  
  441. Final disposition - Delete message NOW;
  442.  
  443. Note:  The {F} = From field, the | = logical 'or'Select the 
  444. "Delete Now" option & save.Your twit filter is ready to go.  
  445. You can build your list as large as need be.  You may wish 
  446. to set up a twit folder and copy your messages there rather 
  447. than deleting them.  That way you can check out your file to 
  448. insure it works before deleting messages.  Make sure that your
  449. 'twit' filters are at the very top of your filter list.  
  450. This prevents the messages from being copied to another folder 
  451. before the twit filter can delete them.  One might consider 
  452. having two twit folders one for 'probationary twits' and one 
  453. for 'confirmed twits'.  The first doesn't warrant a 'delete NOW' 
  454. disposition, while the second has already earned it.
  455.  
  456.  
  457. SORTING FILTERS
  458.  
  459. Filters are processed in the order in which they appear on the
  460. window list. For  example, you may have a "Twit" filter to delete
  461. incoming "Twit" messages and a filter to move incoming mailing
  462. list messages into a folder. If the "Twit"  filter comes after
  463. the mailing list filter, the "Twit message" will be moved to the
  464. mailing list folder and not deleted. 
  465.  
  466. In the lower left corner of the Filter Maintenance dialog there 
  467. is a pair of buttons with arrows on them. Highlight a filter, 
  468. then click the buttons to move  the filter up or down in the list.  
  469. Make sure you click "Done" afterward to save  your changes.  
  470. In some cases you may not be concerned about the order of the 
  471. whole list but may need to ensure that relationships between 
  472. specific filters are maintained. 
  473.  
  474. For example that one filter always comes after or before another. 
  475. This is not a  problem if you have a small number of filters.  
  476. However if you are continually  adding, modifying or deleting 
  477. filters, one way to ensure that the related  filters maintain 
  478. their correct precedence is to number them ("aaa-1", "aaa-2").
  479.  
  480.