procmail voodoo question
george at galis.org
Fri May 7 12:44:13 PDT 2004
On Fri, May 07, 2004 at 11:02:23AM -0700, Gregory K. Ruiz-Ade wrote:
>On Friday 07 May 2004 10:42 am, Gregory K. Ruiz-Ade wrote:
>> I'm thinking of doing an MD5 hash of an incoming email, caching the
>> hashes, and then filing any email that's a true duplicate (by MD5 hash)
>> in a "duplicates" folder instead of simply discarding them. This would
>> prevent re-sent email from getting squelched (because there will be
>> Resent-* headers, changing the messages overall hash) while still killing
>> duplicates due to email alias overlaps, which is what I'm after.
>For that matter, does anyone know of a way to get postfix to do alias
>expansion and remove duplicate recipients, either as an option or
>I'm trying to get rid of sendmail, but now people are starting to complain
>about receiving multiples of emails because they were sent to multiple
>aliases that the people are on. :\
procmail can match per header and/or body, on your first post I started to
think how to md5sum the body with formail et al, but decide it would be
This might come in handy, called from a dot-qmail line:
setlock ./.qmailmsgid.cache sh -c "! formail -D 8192 ./.qmailmsgid.cache </dev/stdin || exit 99"
#Date: Sat, 20 Sep 2003 16:18:29 +0800
#From: Adrian Ho <aho-djb-qmail at 03s.net>
#Subject: Re: remove duplicates with dot-qmail
#To: qmail at list.cr.yp.to
#run formail under the aegis of a locking program like daemontools'
# | setlock ./.qmailmsgid.cache sh -c "! formail -D 8192 ./.qmailmsgid.cache || exit 99"
If you rotate the msgid cache every day, resent messages will get
through the next day... but I think you need to work out the aliases
George Georgalis, Architect and administrator, Linux services. IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george at galis.org
Key fingerprint = 5415 2738 61CF 6AE1 E9A7 9EF0 0186 503B 9831 1631
More information about the KPLUG-List