Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jun 2000 16:50:29 -0500 (CDT)
From:      David Kelly <dkelly@mail.hiwaay.net>
To:        questions@FreeBSD.ORG, webmaster@wmptl.com
Subject:   Re:  duplicate messages
Message-ID:  <200006022150.e52LoTn12739@mail.hiwaay.net>

next in thread | raw e-mail | index | archive | help
> Is it possible to filter out duplicate messages?

Of course its possible, what do you think this is, a Microsoft product?
:-)

Easiest way I can think of is to install nmh from the ports. Run your
mail thru slocal using the ~/.forward hook. In your ~/.maildelivery
filter rules simply default everything back to the system mailbox.
(sorry, don't have an example of this under my fingertips, think it
involves calling mail.local from slocal)

Then, the final thing, is you create a file named ~/.maildelivery.db,
and magically slocal will write the message-id: of everything it
sees to that file. It will drop any message with a message-id already
in that database.

This is a good way to quickly create a zero length file. The % 
symbol is your shell command prompt:

% :> ~/.maildelivery.db

Occasionally you will have to zero your ~/.maildelivery.db as it
will grow infinitely. Just type the above command again.

Procmail has a way to do this also too. When I last looked into it
looked like procmail did a linear search on message-id and limited
its data file to 32k. And once it reached that size might have been
rewriting the entire file each time it deleted one and added another.
Slocal uses the dbm routines in libc.

--
David Kelly N4HHE, dkelly@hiwaay.net (hm)
======================================================================
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006022150.e52LoTn12739>