procmail
[Top] [All Lists]

filtering duplicates - a gotcha

1999-12-11 13:22:41
Last night, I added filtering of duplicates to my procmail script.
The main reason I added this was that one mail list I'm on had
gone bonkers and is sending out duplicate messages.  I thought
adding the capability to filter out dups. was a Good Thing also
to fileter out cross-posts, but have discovered one gotcha
with that approach:  If someone replies to an email that
I've sent to a mailing list, via a "reply all", I'll receive
two replies, one direct to me, and one to the list.  The direct
reply arrives first, and the second reply to the list is detected
as a duplicate, and _not_ filed.  Here's script I'm using:

#
# Discard incoming duplicates
#
:0
* ? formail -D 10000 ~/.dup_id_cache
dup-mail


Is the following a reasonable way to change this, so that
only messages not addressed to me directly are checked
for duplicates?

#
# Discard incoming duplicates, unless they're addressed to me.
#
:0
* ! ^TO_gary(_at_)[^ ]*intrepid.com
* ? formail -D 10000 ~/.dup_id_cache
dup-mail

Or would it be better to add this line to each mailbox filter?
* ? formail -D 10000 ~/.dup_id_cache

I'm thinking the latter approach of adding to each mailbox
filter is better, because there is an advantage to keeping
the duplicate check at the top level, to prevent receive mail
that is perhaps sent repeatedly by mass mailers, or broken
mail clients.

<Prev in Thread] Current Thread [Next in Thread>