procmail
[Top] [All Lists]

Re: filtering duplicates - a gotcha

1999-12-11 13:42:46
Gary asked,

| 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.

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

The best way to do it is to look at distributions through the list for
a List-Id:, Mailing-List:, X-Mailing-List:, Sender:, Resent-Sender:, or
other such header, or as a last resort the From_ line's envelope sender
address, to identify that copy as having been processed by the list software
and to distinguish it from a copy that the writer mailed directly to you.
Add that as a condition to the recipe that runs formail -D.

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

Well, no, that usually won't do the job, because the kind of mail you
describe shows your name on both copies, unless the mailing list removes
the names of direct addressees (few do; mine does, but many people would
argue that I'm in the wrong to do it that way).

| 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.

If you decide to do that and check all mail for duplicate ID's, put one
formail -D recipe near the beginning of your rcfile and let it filter all
mail.

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