Filters
The J Street Mailer filters are accessed via the option on the Tools menu of the program's main window. The Inbound Mail Filters dialog lets you create, modify, delete, and rearrange filters. Filters are executed during each mail retrieval in the order in which they're listed in this dialog. If you want to move a filter's position in the execution order, just select it and press the Up or Down button until it is located where you want it.
The On/Off button turns a filter off if it's on, or turns it on if it's off. You can turn a filter off any time you want to prevent it from executing, without deleting it permanently. You can also turn a filter on or off, or make any other change to it, or just view its settings, by selecting it and pressing the Details button.
Always use the Save button to leave this dialog, if you want any changes you've made to be kept. Cancel will close the dialog without saving your changes.
To create a filter, press the New button. This brings up the Create New Filter dialog, where you specify the new filter's name and the type of filter you want it to be: Regular, List, or Java (see below). Then press the Next> button, to continue with the following dialog which is appropriate to the type you've specified. That following dialog shows the filter's name at the top, and an ON or OFF button which shows you the filter's current state, and toggles it to the opposite state if you press it. At the bottom are the fields where you can specify what you want the filter to do if it finds a match between the message and what it's looking for. These actions will be explained below. Between the top and bottom of these dialogs, is the area which is different depending on which type of filter you've created:
Regular filters
First you specify what part of the message you want the filter to search. For example, the From line, the To line, the Subject line, the entire set of message Headers, the message Body, All Text (both headers and body), and various other choices. Then you specify whether you want that message part to contain the search string, to not contain it, to start with it, end with it, etc. Or you can even select exists, which means you don't specify a search string, but the filter action is activated if the specified message part is present at all. Then (if you haven't specified exists there) you type the search string, which can be a word, a part of a word, or multiple words. You can make the search case sensitive, if you like, by turning off the Ignore case checkbox. On the second line, if you wish, you may choose AND, OR, or XOR from the leftmost dropdown, and if you do, then you can also specify the same four types of information for a second search string in a second portion of the message.
So, for example, you might build a filter which performs some action if the Body of the message contains the string hello or HELLO, AND the Subject ends with on Sale.
List filters
First you specify where you want the message to search. If you select Message body contains any combination of the strings or Any header contains any combination of the strings, then the entry field to the right will be enabled to let you specify how many matches should be required in order to activate the filter. For example, if you say 3 there, and the message contains only 1 or 2 of your specified search strings, the filter will not be activated; if the message contains 3 or more, then it will. Or you can specify Received header contains any of the domains, From or Reply-To contains any of the domains, Any header contains any of the domains, From or Reply-To contains any of the user names, To, Cc, or Bcc contains any of the user names, or Any header contains any of the user names. These search criteria really do not differentiate between domains, user names, or any other type of string in any particular location. These options are named this way not because they do differentiate such things, but only to make it more obvious what the options might be used for. The search string will be found in the specified header line regardless of whether it's a domain name, a user name, or whatever.
Next, you specify the list of strings for which you want the filter to search. The list can be one entry long, or hundreds. If you have hundreds of entries, you probably have them in an ASCII text file, one entry per line, which you can import into the list box without typing them manually, by selecting the Import list from a file button on the right.
Java filters
You can write a Java class which will perform the work you want the filter to do, or you can write a Java class which will only return true or false and let the filter perform one or more of its own actions when the return is true. Sample.java and Sample.class files are provided along with the J Street Mailer package. This class takes a string as an argument, searches the Subject: header of the message for that string, and returns true if the string is found.
To create a Java filter, just select your class file, and optionally specify any arguments with which it should be called. Of course, the class file must reside in a directory which is on your class path in order for the program to be able to execute it.
Filter actions
For each filter, you can specify up to four actions. Each of the possible actions requires different additional information in order to do whatever it's supposed to do, so the middle and right hand fields are activated or not depending on which action you select on the left.