[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cc'ing (was Re: Mozilla goes GTK+ instead of Qt)

Manoj Srivastava wrote:
>         Filter on the ISP. Get duplicate suppression on. 

Some of us use Netscape Communicator as out MUA.  Communicator lets you
script filters with JavaScript.  Since I face a lot of problems with
duplicate emails I wrote a Netscape Communicator JS mail filter that
helps me weed out the duplicates.  I thought I'd share it -

% head -n 6 ~/.netscape/mailrule

% more ~/.netscape/filters.js

// JavaScript filter to filter duplicate email
// Copyright (C) 1997 Sudhakar Chandrasekharan <thaths@netscape.com>
// You can redistribute and/or modify this program under the terms of
// GNU General Public License (GPL).

var listOfIds = {};

function deleteDuplicates(message) {
        var id = message["Message-ID"];
        if (true != listOfIds[id]) {
                // No such previous message
                listOfIds[id] = true;
                return false;
        } else {
                // A message with the same ID already exists
                message.folder = "mailbox:Duplicates";
		// message.trash;
                return true;

* The above will work for Netscape Communicator 4.0X

* If using Netscape Communicator 4.5X with an IMAP server the mailrule
and filters.js file exist in ~/ns_imap/imap_server.domain.com/  I don't
know where the mailrule and filters.js file exist if you are using a pop

* For more information on scripting your own JS filters refer to

Marge:  Well, we'll just going to have to cut down on luxuries. 
Homer:  Well, you know, we're always buying Maggie's vaccinations for
        diseases she doesn't even have. 
Sudhakar C13n   http://people.netscape.com/thaths/   Indentured Slave

Reply to: