I was looking for an easy way to do duplicate filtering using qmail for a mailing list you all know and love. The only sample that google was finding for me involved a perl script and MD5 signatures. Accurate, yet slow. I'd rather not slow down or complicate things. So, I wanted to use the tried and true formail dupe filter generally used with procmail.
|preline formail -D8192
.formail-msgid-blah && exit 99 || exit 0
And now, for the next person who has to find this solution, some keywords: dupe, duplicate, filter, dupe filter, email, Message-Id, formail, procmail.
I will now put this into production, and hope it doesn't fail horribly.