[Top] [All Lists]

Re: Duplicate message handling filter

1997-10-27 16:23:51
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.

Adding the following before any other recipes implements what you want:


        :0 hW :$SUBJCACHE.lock
        |formail -R subject: message-id: -D 65536 $SUBJCACHE


PS.     I came across an interesting problem related to this the other
        day. To avoid my mail bouncing whenever the relevant disk
        partition is temporarily full, I passed procmail the -t switch
        to cause a requeue. But because of the formail -D at the top of
        my procmailrc, the mail is then rejected on the second delivery
        attempt, because its message-id was cached before the failed
        delivery. The only solution I came up with was to have this at
        the bottom of procmailrc:

                :0 W
                |false >$IDCACHE

        Has anyone tackled this before and solved it more elegantly?

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