Yeah, I use procmail for this:
# From Ahmon on 2/8/19
# This creates a little database of already-seen Message-Id and will not
# redeliver a message with an already-seen Message-Id.
:0 Wh: msgid.lock
| formail -D 8192 ~/mail/msgid.cache
On Sat, Sep 19, 2020 at 6:07 AM spaceman <spaceman@antispaceman.com> wrote:
Michael Richardson wrote:
Due to the way that IETF lists and aliases work, I often get two, three
sometimes four copies of an email. I attach a mh-e view of a thread
below.
I really want to just keep the copy that went through the list, because
that's the one that went into the public archive, and replies will work
better on that version.
I might be completely off the bat here, but wouldn’t something like
formail (part of procmail) solve the probem of duplicates instead of
trying to hack a system of perl.
If you need to take account of messageid and listid it might not
help. Although you could run it on a per list basis with a different
cache (i.e. list of message ids) for each list.
Regards,
spaceman