At school I am on multiple email lists based upon my classification. Unfortunately the school does not have the list server configured to ensure that only one copy of any given message is delivered to a user. So when administrators send messages to list1, list2 and list3 all at once I get three copies of the same email!

This has bugged me for so long and I have put off finding a way to filter it because I figured it would be pain. But it wasn’t! All you need is a new procmail recipe like the following:

:0 Whc:
msgid.lock | formail -D 4096 $PMDIR/idcache
:0 a:

Make sure $HOME/.procmail exists before expecting this to work!

This tidbit was thanks to the Sysadmin Ramblings blog.