Re: Deleting duplicate messages with formail/procmail
On Mon, Sep 24, 2001 at 11:02:31AM -0400, Jason Rashaad Jackson wrote:
> OK. Due to some ignorance on my part (errors with my procmail filters as
> well as using 'formail -s procmail' with extreme prejudice) I now have many
> many MANY copies of individual messages in all my mail folders. Is there a
> way that I can run a filter to delete all but the original (or just all
> copies) message out of a specific folder? I tried including dupcheck.dc
> from the procmail-lib package, then running formail -s procmail with the
> source as the original folder and the output to a new folder, but I wound up
> with the same info in both folders. As always, any help offered will be
> much appreciated.
I'm not sure about what you are doing with formail currently, but I have the
following at the top of my .procmailrc script and it works great:
# avoid duplicate messages
:0 Whc: msgid.lock
| formail -D 16384 Admin/msgid.cache
:0 a:
Admin/duplicates
Duplicates get dumped into the file duplicates in ~/Main/Admin just in case I
want to see them. A nightly cron job removes them by moving that mail file to
duplicates.old.
I would go through your procmail script and make sure that it isn't creating
duplicates when it shouldn't be. I would go light on the 'c' flag... it should
only be used when you want a duplicate made.
--
John Patton patton66@home.com
"The trouble with the world is that the stupid are cocksure
and the intelligent are full of doubt." - Bertrand Russell
Reply to: