From owner-freebsd-questions Fri Jun 2 14:50:35 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.hiwaay.net (fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (Postfix) with ESMTP id 9383C37B7CF for ; Fri, 2 Jun 2000 14:50:31 -0700 (PDT) (envelope-from dkelly@mail.hiwaay.net) Received: (from dkelly@localhost) by mail.hiwaay.net (8.11.0.Beta1/8.11.0.Beta1) id e52LoTn12739; Fri, 2 Jun 2000 16:50:29 -0500 (CDT) Date: Fri, 2 Jun 2000 16:50:29 -0500 (CDT) From: David Kelly Message-Id: <200006022150.e52LoTn12739@mail.hiwaay.net> To: questions@FreeBSD.ORG, webmaster@wmptl.com Subject: Re: duplicate messages Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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