procmail
[Top] [All Lists]

KalvjaNoDupProcmailrc

2001-07-23 14:35:40
Hi there!

Can some of you experts comment on the procmail script below:


# No duplicate bodies below this point
# ====================================

 :0
        * !^Subject:.*KalvjaPass
        {
                CHECKSUM =`sed 1,/^$/d |grep -v ^$ |cksum`

                :0 a W h f
                |formail -i "Message-Id: $CHECKSUM"

                :0 a W h: DupCache.lock
                |formail -D 32768 .ProcmailDupCache

                :0 W h f
                |formail -R Message-Id X-Message-CheckSum  -u Old-Message-Id 
|formail -R Old-Message-Id Message-Id -U X-Message-CheckSum
        }


This script removes any message that has a body that has been seen before,
provided its checksum is still in the checksum cache.  Bodies are consider
to be the same even if the number of blank lines is different.  The script
works fine, but can it be made better?

Best wishes,

Kalvis

PS: Could you send a copy of any email on this subject to 
procmail(_at_)semireal(_dot_)com
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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