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.

Delete Message
This option deletes the message and also prevents any further filters from trying to do anything to it.
Copy to Folder
You must specify the folder to which you want to copy the message.
Move to Folder
Just like Copy to Folder, above, except that the message will be moved instead of being copied. This option also prevents any further filters from trying to do anything to the message.
Copy to Directory
You must specify the directory to which you want to copy the message.
Move to Directory
Just like Copy to Directory, above, except that the message will be moved instead of being copied. This option also prevents any further filters from trying to do anything to the message.
Reply Now
You must specify a reply file which contains (nothing but) the message body text you would like to have sent as your reply. Your reply will be sent immediately, as if you pressed the Send Now button on the compose window.
Reply Later
Just like Reply Now, above, except that the reply will go into the OUTBOX folder, as if you pressed the Send Later button on the compose window.
Forward Now
Just like Reply Now, above, except that along with the contents of the reply file (if you specify one), the text of the incoming message will also be sent, and you must also specify the address of the person to whom you want to forward the message. Or, to forward it to multiple recipients, type the addresses with a comma between each one and the next.
Forward Later
Just like Forward Now, above, except that the forwarded message will go into the OUTBOX folder, as if you pressed the Send Later button on the compose window.
Bounce Now
You must specify the address(es) of the person(s) to whom you want to bounce the message. The bounced message will be sent immediately, as if you pressed the Send Now button on the compose window.
Bounce Later
Just like Bounce Now, above, except that the bounced message will go into the OUTBOX folder, as if you pressed the Send Later button on the compose window.
Copy to Account
You must specify the J Street Mailer account to whose INBOX you want the message to be copied.
Move to Account
Just like Copy to Account, above, except the message is moved instead of being copied. This option also prevents any further filters from trying to do anything to the message.
Set Color Code
This option applies a color code to the message just like the option on the Message menu.
Play Sound
If you don't specify an audio (.AU) file here, the program will just beep when a message matches the filter's search criteria. If you do specify a valid audio file, the program will play it instead.
Show Message
This option displays the message in a window like the "unformatted" Preview Mail window.
Print Message
This option copies the message to the Print Queue folder.
Notify by Email Now
You must specify the file which contains (nothing but) the text you want to have sent as the notification, and the address(es) of the person(s) you want the filter to notify. Your notification message will be sent immediately, as if you pressed the Send Now button on the compose window.
Stop Filtering
This option causes the program to neglect to execute any further filters (lower than this one in the list on the Inbound Mail Filters dialog) against this message file after this filter has finished with it. If you don't select this action, then all filters will be executed against the message, regardless of whether the message matched this filter's search criteria or not. (Except that, as noted above, the options which move or delete messages also prevent further filters from trying to act upon those messages, as if this Stop Filtering option had been selected even if it wasn't.)