FILTER MAINTENANCE Filters allow MR/2 to perform actions on groups of messages which meet certain conditions. This can include copying the message to a folder, automatically replying to it, or routing it to a rexx procedure for handling. DESCRIPTION Name - Enter the full name of the filter here. This can be as descriptive as you like: For example: MR/2 ICE Mail List Messages Nickname - Enter the short name for the filter here. For example: MR/2 List. SEARCH TYPE Simple Search Type - searches the search area specified for the search string specified. Search strings containing spaces do not have to be enclosed in double quotes to be handled correctly. For example: Multiple Recipients of MR/2 ICE Mail List Free-form Search Type - allows entry of extended search criteria using Boolean Match Logic. Keywords can be OR'd together, AND'd together and/or NOT'd. In addition, parenthesis can be used to control the evaluations of the test. There is also an operator that will match a word, remaining sensitive to case. Freeform filters strip any hard linefeeds the user has entered before saving the filter to disk. Support for quoted strings permits spaces and the special Boolean operator symbols to be used. Some simple examples: (OS/2 | OS2) & !WARP (OS/2 or OS2) and not warp Windows & OS/2 Windows and OS/2 Windows | OS/2 Windows or OS/2 ^warp warp, but ONLY if all lower case lettersThe "operator" symbols follow the conventions used by C and C++ for Boolean operations: & is the AND operator | is the OR operator ! is the NOT operator () cause the expression inside to be evaluated as a single expression. ^ causes a case-sensitive match to be performed. The word that follows must be found with matching capitalization to be considered a "match". ~ causes an exact word match to be required. String/phrase that follows must be found standing on it's own; not imbedded within another string. If the strings is embedded as part of some other word, it will not match. For example, searching for the word "owl" will match "owl", but also words like "knowledge" and "scowl". Using the search string "~owl" will match only with "owl" as a standalone word. The following will find all messages that contain one or two different words referencing OS/2 that also mentions "bugs". If the message doesn't match under this criteria, then it is tested for the words "Windows" and "slow" in the same messages: ((OS/2 | OS2) & bugs) | (Windows & slow) The following is somewhat similar. It will also find all messages that contain one of two different words referencing OS/2 that also mentions "bugs". If the message is found to match, then it is tested for the words "Windows" and "slow" in the same messages. If these words are both found, however, the message is eliminated (compliments of the "!" NOT operator): ((OS/2 | OS2) & bugs) & !(Windows & slow) A few more examples: ObjectPM | "Object PM" spaces are ignored unless within quotes "R&D" operator characters must be in quotes if part of a search string. R&D R&D finds either of the single letters anywhere in the message no matter what the case. If you intended to find the phrase R&D, the results here are not what you intended. The example previous to this one using the quote ' " ' character before and after the target string causes a match to be found only if that string is found within the message area being tested. "(ch | 0xFF)" more special characters within quotes. The operator characters will be treated as any other characters. In other words, the "(", the "|", and the ")" are searched for as ascii characters and do not affect the nature of the search. """Windows""" Looks funny? It will find the "Windows" in message but only if between quote marks. Two quotes together are treated as a single " mark, but they must still be part of an entire quoted string. ""Windows""WILL NOT WORK, and that ... "can you say ""neighbor""?" will find the phrase 'can you say "neighbor"?' The word neighbor must be within quotes to be considered a match. "&Windoze" Soundex (sounds like) search for anything sounding similar to "Windows". ^warp | phasers Looks for the word "warp" in all lower case, or the word "phasers" ^NT | ^Nick Looks for the capital letters "NT" or the string "Nick" where only the N is capitalized. {S}OS/2Matches "OS/2", only checking SUBJECT {F}"jim@gilliland.com" Finds ONLY message FROM Jim Gilliland {M}"Tim McClanahan" & !{FT}"Tim McClanahan" Finds references to Tim McClanahan inside any message text, but excludes messages FROM or TO him. {S}(MR/2 | MR2 | MR-2) Matches any of these three strings when they exist in the SUBJECT field. {Conclusion} Probably won't find what you want :) "{Conclusion}" Probably is what you want. Finds any occurrence of the word "Conclusion" that is enclosed between curly-brackets. Valid areas are From, To, Subject, Message and Header, represented by the letters F, T, S, M and H, respectively. The value 'H' may be followed by a header field "tag" to specify a specific header line. For example: {H:Cc}nick@secant.com will match all email cc'addressed to me !{H:X-Mailer}"" will find all messages without an X-MAILER header line. {H:X-Mailer}"MR/2"will find all messages with an X-MAILER header line containing "MR/2". {H:X-Mailer}"" & !{H:X-Mailer}"MR/2" will find all messages with an X-MAILER header line that does NOT containing "MR/2". Rexx Search Type - allows an external Rexx procedure to determine which message to filter. The external Rexx procedure should create mr2_rexx.$$$ if the message passed to it passes the filter criteria. This is the temporary file used to pass information back and forth between your Rexx procedure and MR/2 ICE. Special Search Type - allows selection of messages by attachments and size. Contains UUEncoded attachment(s) Contains MIME attachment(s) Contains BINHEX attachment(s) Message Size is greater than: Message Line Count is greater than: Smart Search Type - Future use. Translate - Future use. SEARCH AREAS for All Areas - Search for the search string anywhere in the message. Header - Search for the search string in the message header. Body - Search for the search string in the message body. From - Search for the search string in the message from: field. To - Search for the search string in the message to: field. Subject - Search for the search string in the message subject. FILTER TYPE Inbound - filters are processed "after" a message is received in the inbox. Outbound - filters are applied to each message *after* it is successfully sent. In/Out - filter is a single filter to be used as BOTH an inbound and outbound filter. Demand - filters are filters that never get invoked automatically. They are available for use only when manually selecting a filter. So, you may create a DEMAND auto-responder filter that sends off a canned message. This filter will never be automatically applied, but it is available by marking a message or a group of messages, user RMB->Filter->Select and picking this filter. ON EVENT PreSend - is processed after a connection is made with your sending server, right before the message is to be shipped. Presend can define a set of filter match criteria. Each message to be sent (queued messages) passes through this filter, and if found to match, can be passed through a REXX script. Most other options do nothing in this case, or have extremely minimal use. After the filter(s) is/are executed, the message is sent. This was implemented specifically for PGP signing and encrypting. It has other applications. To Outbox - Future use. PROCESS WHEN MESSAGE Matches - specified search criteria match. Doesn't match - specified search criteria does not match. Always - process filter for every message. DESIRED ACTION Copy to Folder - When filter meets the search criteria copy's message to designated folder. Auto-reply - Create a template to use for the auto reply. Autoreplies are added to the outbox for sending, but deleted on send. Any filter that auto-replies should test for the existence of "X-AutoReply: Yes" and NOT autoreply if found. Filter like: (whatever) & !{H:X-AutoReply}"Yes". Forward to - Future use. Notify via Popup Window - Future use. Link to secondary filter - Future use. Link to Rexx - Filters that start REXX commands do so minimized now. If a REXX process is called from a filter, it is performed FIRST, before any copying to folders or other actions are performed. REXX filters can now be forced to the foreground by simply adding a "*" to the beginning of the command sequence. For example: *maillist icemail.lst, would run the MR/2 ICE mailing list in the foreground. This allow REXX to prompt and accept input.. ENABLED Checking this button turns the filter on for processing. Unchecking disables the filter. FINAL DISPOSITION Show in Index - leaves the message in the inbox and visible in the inbox index even though the message may have been copied to another folder(s). Do not put in index - leaves the message in the inbox, but NOT in the index even though the message may have been copied to another folder(s). If you re-index your inbox the message will be put back into the index. Delete message NOW - deletes the message from the inbox after the messages meets the criteria of the filter. Delete also stops further processing of the message by any more filters in the list. Examples BAD MAIL filter Search type = Free-form: {S}"RETURNED MAIL: HOST UNKNOWN" | {S}"WARNING: COULD NOT SEND MESSAGE" | {S}"RETURNED MAIL: SERVICE UNAVAILABLE" | {S}"RETURNED MAIL: USER UNKNOWN" | {S}"RETURNED MAIL: CAN'T CREATE OUTPUT" | {S}"DELIVERY REPORT (FAILURE)" | {S}"RETURNED MAIL: WARNING: CANNOT SEND" | {S}"RETURNED MAIL: CANNOT SEND MESSAGE" | {S}"RETURNED MAIL: UNKNOWN MAILER ERROR" Process when matches; Type - inbound; Actions - copy to folder; Final disposition - delete NOW. Filter enabled; Note: You must pre-define a folder before you set up the filter. This should be one of the first filters in the list or the return error messages will still appear in your inbox or other folders that filters send them to. CORRESPONDENCE WITH AN INDIVIDUAL filter Search type = simple:APERSON@SECANT.COM; Search area - Header; Filter type - In/Out; Process when message - Matches; Copy to folder - APERSON; Final disposition - Delete message NOW. Note: This will put your replies to the person in the folder as well. MAIL LIST filter Search type = simple:MR2ICE.LIST@SECANT.COM; Search area - Header; Filter type - In/Out; Process when message - Matches; Copy to folder - MR/2 ICE List; Final disposition - Delete message NOW. Note: This will put your replies to the list in the folder as well. TAG LINE filter Search type = simple: No entry in field; Search area - none; Process when message - Always; Filter type - PreSend; Desired actions - Link to Rexx: C:\directory\rexx.cmd; Final disposition - Show in index. Note: There are several rexx procedures available for this purpose. You can find many of them at the ICE web site or the Geiger web site (http://www.amaranth.com/~whgiii). TIMEZONE filter Search type = simple:No entry in field; Search area - header; Process when message - Always; Filter type - Inbound; Desired actions - Link to Rexx: c:\directory\TZ1.cmd; Final disposition - Show in index. Note: The rexx procedure TZ1.CMD is written by William Geiger III and is available as part of his TIMEZONE application which is found on his web site (http://www.amaranth.com/~whgiii). TWIT filter Search type = Free-form: {F}twit1@twit1.com | {F}twit2@twit2.com | {F}twit3@twit3.com | ...etc.. Process when message - Matches; Filter type - Inbound; Final disposition - Delete message NOW; Note: The {F} = From field, the | = logical 'or'Select the "Delete Now" option & save.Your twit filter is ready to go. You can build your list as large as need be. You may wish to set up a twit folder and copy your messages there rather than deleting them. That way you can check out your file to insure it works before deleting messages. Make sure that your 'twit' filters are at the very top of your filter list. This prevents the messages from being copied to another folder before the twit filter can delete them. One might consider having two twit folders one for 'probationary twits' and one for 'confirmed twits'. The first doesn't warrant a 'delete NOW' disposition, while the second has already earned it. SORTING FILTERS Filters are processed in the order in which they appear on the window list. For example, you may have a "Twit" filter to delete incoming "Twit" messages and a filter to move incoming mailing list messages into a folder. If the "Twit" filter comes after the mailing list filter, the "Twit message" will be moved to the mailing list folder and not deleted. In the lower left corner of the Filter Maintenance dialog there is a pair of buttons with arrows on them. Highlight a filter, then click the buttons to move the filter up or down in the list. Make sure you click "Done" afterward to save your changes. In some cases you may not be concerned about the order of the whole list but may need to ensure that relationships between specific filters are maintained. For example that one filter always comes after or before another. This is not a problem if you have a small number of filters. However if you are continually adding, modifying or deleting filters, one way to ensure that the related filters maintain their correct precedence is to number them ("aaa-1", "aaa-2").