Forum

 
Current User: Guest Login Register
Please consider registering


Register? | Lost Your Password?

Use of Javascript as a filter.

Add a New Topic Reply to Post
UserPost

9:09 am
March 12, 2010


onlyme

USA

Member

posts 6

What do you think of the efficiency of utlizing FSO (FileSystemObjects) to read in a textstream file of "matching criteria" for a filter?  I envision being able to maintain a long set of REGEX matching criteria (A Blacklist) in a Windows text file.  THe format of the file would be "one regex string per line" and I'd loop through the input using FSO's ReadLine method.  This approach makes maintaining the list of filter criteria much easier than via the TBird3 filter manager interface.  My concern is whether the resource and time efficiency of opening and parsing the file with Javascript for each incoming mail message will be too much overhead.  I'd appreciate your input on this approach.

A similar capability would be possible if one could utilize an addressbook as a storage mechanism for this set regex's.  Of course, I'd need to be able to specify that the "Is in Address Book" condition be looking at a field other than the email address (i.e. Notes or Customx fields).

Green just makes sense.

9:36 am
March 12, 2010


rkent

Admin

posts 140

My understanding is that the issues with js and filters are likely to be if you constantly switch between C++ objects and js objects, which you do not need to do. Javascript itself is considered now to be a first-class language for Mozilla development. Also, filtering of incoming messages is not really a time sensitive task (though it is on the main user interface thread, so you risk locking the interface if too slow.) But my gut feeling would be that opening a file, reading in a list of RegExes per message, and applying those to the subject would not be too slow. Applying that to the body is a different matter, though it is my understanding that SpamAssassin does that.

You might consider doing your own custom filter rather than relying on FiltaQuilla. The only thing hard is the XBL for the dropdown list.

rkent

Reply to Post

Reply to Topic:
Use of Javascript as a filter.

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
10 + 4