procmail
[Top] [All Lists]

Re: Duplicate message handling filter

1997-10-28 07:30:25
On Tue, 28 Oct 1997 08:12:55 -0500,
wwgrol(_at_)sparc01(_dot_)fw(_dot_)hac(_dot_)com (W. Wesley Groleau x4923) 
wrote:
I was wondering if any of you have a small .procmailrc filter that
ignores duplicate mail with the same subject header.  Mind you,
not based on msg-id.
:0 hW :$SUBJCACHE.lock
|formail -R subject: message-id: -D 65536 $SUBJCACHE
Hey, this is cool.  Now more questions: 
1. Does this drop the old message-id or does it make two message-id fields?
3. Are there mail handling programs that will crash and burn when a message
has two IDs?

Probably. As a precaution, you can say

    formail -R Message-Id: Old-Message-Id: -R Subject: Message-Id: ...

Personally, I'm not sure duplicated Subjects are the way to go.
You could of course construct any key you want from the headers using
basically the same technique. 

2. Wouldn't this still ignore duplicate IDs as well as duplicate subjects?

Do you mean "filter"? Actually, it would appear that the originally
proposed solution will only look at the real Message-Id, whereas if
you rename the real Message-Id, it looks like it behaves as expected.
(This I determined only by +very+ brief testing, with what appears to
be formail 3.11pre4. Caveat implementor.)

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

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